This repository was archived by the owner on Jun 8, 2026. It is now read-only.
test: unit test case fix#1057
Merged
Merged
Conversation
harshachinta
approved these changes
Jan 7, 2024
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Problem: Unit tests in
test_spanner.pywere behaving unexpectedly. For ex, when unit testtest_transaction_should_use_transaction_id_returned_by_first_readwas run on local as single test it fails with below errorbut when it is run combined with other tests it succeeds. The above error showed that the difference was in
transaction_tagthat gets passed throughrequest_options.Reason: Python does not enforce immutability, leading to an unexpected situation where an object, assigned as
REQUEST_OPTIONS = RequestOptions(), was anticipated to behave as a constant across all test cases.However, it was found that this object was being modified, causing inconsistencies in the test cases. Varied behaviors were observed when executing a single test case compared to running the entire file.