Skip to content

ci(cloudhealthcare, dataproc, postgres): fix multiple integration test failures#2602

Merged
duwenxin99 merged 7 commits intomainfrom
fix-healthcare
Mar 2, 2026
Merged

ci(cloudhealthcare, dataproc, postgres): fix multiple integration test failures#2602
duwenxin99 merged 7 commits intomainfrom
fix-healthcare

Conversation

@duwenxin99
Copy link
Copy Markdown
Contributor

@duwenxin99 duwenxin99 commented Mar 2, 2026

  • Make the DICOM stores test self-contained and not using prepopulated test data
  • Make sure the responses from list DICOM tool are status OK but do not check for specific result due to pagination not supported. The list result is limited to the first 100 items, so the wanted entry is not guaranteed to be in the returned result.

@duwenxin99 duwenxin99 requested a review from a team as a code owner March 2, 2026 15:33
@gemini-code-assist
Copy link
Copy Markdown
Contributor

Summary of Changes

Hello, I'm Gemini Code Assist1! I'm currently reviewing this pull request and will post my feedback shortly. In the meantime, here's a summary to help you and other reviewers quickly get up to speed!

This pull request addresses issues in the Cloud Healthcare integration tests by correcting how DICOM store paths and IDs are passed to test functions. It also introduces a new utility to programmatically upload dummy DICOM data, ensuring that DICOM store-related tests have the necessary data to run successfully.

Highlights

  • DICOM Store Path Correction: The runListDICOMStoresToolInvokeTest function was updated to dynamically format the DICOM store path using fmt.Sprintf, ensuring the correct path is used during testing.
  • DICOM Store Metrics ID Fix: The runGetDICOMStoreMetricsToolInvokeTest function was modified to use the correct dicomStoreID variable, resolving an issue where an incorrect store ID was being used.
  • Dummy DICOM Data Upload: A new helper function, uploadDummyDICOM, was introduced to programmatically upload sample DICOM instances to the DICOM store during test setup, ensuring data availability for DICOM-related tests.
Changelog
  • tests/cloudhealthcare/cloud_healthcare_integration_test.go
    • Corrected the DICOM store path formatting in runListDICOMStoresToolInvokeTest.
    • Updated the DICOM store ID used in runGetDICOMStoreMetricsToolInvokeTest.
    • Implemented uploadDummyDICOM to facilitate DICOM data population for tests.
Activity
  • No specific activity (comments, reviews, progress) has been recorded for this pull request yet.
Using Gemini Code Assist

The full guide for Gemini Code Assist can be found on our documentation page, here are some quick tips.

Invoking Gemini

You can request assistance from Gemini at any point by creating a comment using either /gemini <command> or @gemini-code-assist <command>. Below is a summary of the supported commands on the current page.

Feature Command Description
Code Review /gemini review Performs a code review for the current pull request in its current state.
Pull Request Summary /gemini summary Provides a summary of the current pull request in its current state.
Comment @gemini-code-assist Responds in comments when explicitly tagged, both in pull request comments and review comments.
Help /gemini help Displays a list of available commands.

Customization

To customize Gemini Code Assist for GitHub experience, repository maintainers can create a configuration file and/or provide a custom code review style guide (such as PEP-8 for Python) by creating and adding files to a .gemini/ folder in the base of the repository. Detailed instructions can be found here.

Limitations & Feedback

Gemini Code Assist may make mistakes. Please leave feedback on any instances where its feedback is incorrect or counter productive. You can react with 👍 and 👎 on @gemini-code-assist comments. If you're interested in giving your feedback about your experience with Gemini Code Assist for Github and other Google products, sign up here.

You can also get AI-powered code generation, chat, as well as code reviews directly in the IDE at no cost with the Gemini Code Assist IDE Extension.

Footnotes

  1. Review the Privacy Notices, Generative AI Prohibited Use Policy, Terms of Service, and learn how to configure Gemini Code Assist in GitHub here. Gemini can make mistakes, so double check it and use code with caution.

Copy link
Copy Markdown
Contributor

@gemini-code-assist gemini-code-assist bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Code Review

This pull request aims to fix integration tests for Cloud Healthcare. The changes include correcting the store ID used for DICOM metrics tests, making list assertions more robust, and adding data population for DICOM stores during test setup.

My review has identified a few areas for improvement:

  • The newly populated DICOM data is not being used by the search-related tests, which still point to a pre-populated store. This seems to be an incomplete fix.
  • There's an inconsistency in how list operations are tested for FHIR and DICOM stores.
  • There's a minor error handling issue in the new uploadDummyDICOM helper function.

I've added specific comments with suggestions for each of these points.

Comment thread tests/cloudhealthcare/cloud_healthcare_integration_test.go
Comment thread tests/cloudhealthcare/cloud_healthcare_integration_test.go Outdated
Comment thread tests/cloudhealthcare/cloud_healthcare_integration_test.go Outdated
@duwenxin99 duwenxin99 enabled auto-merge (squash) March 2, 2026 17:39
@duwenxin99
Copy link
Copy Markdown
Contributor Author

/gcbrun

@duwenxin99 duwenxin99 changed the title ci(cloudhealthcare): fix Cloud Healthcare integration tests ci(cloudhealthcare, dataproc, postgres): fix multiple flakey integration tests Mar 2, 2026
Make sure all empty results are initialized array instead of nil array
to fix:
`
dataproc_integration_test.go:431: unexpected clusters: got [], want []
`

Test log:
https://pantheon.corp.google.com/cloud-build/builds;region=us-central1/48a4c6fc-d5c5-4eba-8184-b8e21954f62f;step=45?e=13802955&mods=logs_tg_staging&project=toolbox-testing-438616
Add schema cleanup routine based on timestamp at the beginning of the
test. Add timestamp to schema name.
@duwenxin99 duwenxin99 changed the title ci(cloudhealthcare, dataproc, postgres): fix multiple flakey integration tests ci(cloudhealthcare, dataproc, postgres): fix multiple integration test failures Mar 2, 2026
@duwenxin99 duwenxin99 merged commit a60bb95 into main Mar 2, 2026
18 checks passed
@duwenxin99 duwenxin99 deleted the fix-healthcare branch March 2, 2026 22:30
NirajNandre pushed a commit to NirajNandre/genai-toolbox-fork that referenced this pull request Mar 24, 2026
…is#2602)

- Make the DICOM stores test self-contained and not using prepopulated
test data
- Make sure the responses from list DICOM tool are status OK but do not
check for specific result due to pagination not supported. The list
result is limited to the first 100 items, so the wanted entry is not
guaranteed to be in the returned result.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants