tests(spanner): update prerelease_deps nox session to match system tests#16764
tests(spanner): update prerelease_deps nox session to match system tests#16764
prerelease_deps nox session to match system tests#16764Conversation
b102cea to
8df400c
Compare
prerelease_deps nox session to match system tests
8df400c to
4e9ac1b
Compare
4e9ac1b to
d4acf6f
Compare
8cc5f29 to
766c6d3
Compare
|
/gemini review |
There was a problem hiding this comment.
Code Review
This pull request refactors the system test execution in noxfile.py to support separate sync and async test runs and improves test discovery. Additionally, it updates test_list_instances to compare instance names rather than objects, preventing failures due to server-side metadata differences. Feedback suggests centralizing common environment variables to reduce duplication and utilizing defined path variables instead of hardcoded strings in the test execution logic.
| @@ -675,24 +681,75 @@ def prerelease_deps(session, protobuf_implementation, database_dialect): | |||
| run_system = False | |||
|
|
|||
| if run_system: | |||
There was a problem hiding this comment.
The environment variables for the test runs are duplicated multiple times in this block. Consider defining a common test_env dictionary at the start of the if run_system: block to improve maintainability and reduce redundancy, adhering to the rule of removing duplicate lines of code.
References
- Remove duplicate lines of code to keep the codebase clean and avoid redundancy.
Co-authored-by: gemini-code-assist[bot] <176961590+gemini-code-assist[bot]@users.noreply.github.com>
Co-authored-by: gemini-code-assist[bot] <176961590+gemini-code-assist[bot]@users.noreply.github.com>
This PR fixes 2 failing tests which appear in #16762
In the system test presubmit
Kokoro System Tests, the assertion is too strict. Protobuf objects may fail equality (==) if one has extra metadata populated by the server that the other lacks. If the server fills in a default field in one response but not another, the assertion fails even if the ID is identical.The other failure only appears in the
Kokoro Pre-release Tests. Updating theprerelease_depsnox session to match the system test session resolves the issue.