[SYNPY-1905] Fix problematic integration test - #1448
Open
andrewelamb wants to merge 3 commits into
Open
Conversation
BryanFauble
approved these changes
Aug 19, 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.
Problem:
test_tables_pandasintests/integration/synapseclient/deprecated/test_tables.pyfails intermittently in CI with a DataFrame shape mismatch (SYNPY-1905):The queried table has 20 rows instead of the expected 5 — exactly 4x. Example failure: PR #1440 CI run.
Root cause: the test creates its schema with the fixed name "Nifty Table" inside the shared per-worker project, and
syn.storeuses create-or-update semantics. When the test fails once for a transient reason, pytest-rerunfailures (--reruns 3) re-runs it, and each attempt finds the existing table from the previous attempt and appends 5 more rows instead of creating a fresh table. The retries can never pass — 1 initial run + 3 reruns accumulate 4 × 5 = 20 rows, turning a one-off flake into a guaranteed failure.Solution:
"Nifty Table " + str(uuid.uuid4())), matching the naming pattern already used by other tests in this file. Each rerun now creates a fresh, empty table, so a retry can actually succeed.schedule_for_cleanupfixture. The cleanup list is processed at session teardown regardless of test outcome, so uniquely named tables left by failed attempts are also deleted (previously the test relied solely on the project fixture teardown).No production code is affected. Note this test lives in the deprecated test module that is slated for removal after the v5.0.0 release, so this is a minimal fix to stop the flakiness until then.
Testing:
pre-commit run --files tests/integration/synapseclient/deprecated/test_tables.pypasses (ruff, black, isort, bandit).