tests(spanner): avoid table name collisions in tests - #18001
Merged
Conversation
Contributor
There was a problem hiding this comment.
Code Review
This pull request reorganizes imports in test_suite_14.py and renames generic test table names (from "t" to more descriptive, unique names like "t_literal_round_trip_spanner", "t_nullable_reflection", etc.) across the test suite to prevent potential table name collisions. There are no review comments, so I have no feedback to provide.
chalmerlowe
marked this pull request as ready for review
August 5, 2026 14:29
sakthivelmanii
approved these changes
Aug 5, 2026
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 join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
Fix Spanner Test Flakes: Avoid Generic Table Names
Problem
The
sqlalchemy-spannertest suite occasionally fails withDuplicate name in schema: t.errors. This happens because multiple tests use the generic table namet. In a shared database environment, or due to buffered DDL statements in Spanner (which are non-transactional), a table from a previous test might still exist when a new test tries to create it.Solution
Renamed the generic table name
tto more specific names in several tests and fixtures to avoid collisions.tests/conftest.py, renamedttot_literal_round_trip_spanner.tests/test_suite_14.py:ttot_nullable_reflectionintest_nullable_reflection.ttot_type_round_tripin_type_round_trip.ttot_percent_signsinEscapingTest.ttot_do_numericinNumericTest.Notes to Reviewers
These changes are purely in test code and aim to improve test stability by eliminating shared resource name collisions.