Skip to content

fix(tests): Use explicit region override in snowflake ID tests#110774

Merged
mchen-sentry merged 2 commits intomasterfrom
mingchen/di-1711-snowflake-test-fix
Mar 16, 2026
Merged

fix(tests): Use explicit region override in snowflake ID tests#110774
mchen-sentry merged 2 commits intomasterfrom
mingchen/di-1711-snowflake-test-fix

Conversation

@mchen-sentry
Copy link
Member

@mchen-sentry mchen-sentry commented Mar 16, 2026

Two snowflake tests (test_generate_correct_ids, test_generate_correct_ids_with_region_sequence) hardcode expected snowflake values assuming region_snowflake_id=0. Under xdist, workers use worker_num + 1 instead, breaking the assertions.

Fix: Wrap both tests in override_regions with an explicit Cell("test-region", 0, ...) so the region's snowflake ID is deterministic regardless of the test environment's default region configuration.

Two snowflake tests hardcode expected values assuming region_snowflake_id=0.
Under xdist, workers use worker_num+1 instead, breaking the assertions.
Wrap in override_regions with an explicit Cell so expected values are
deterministic regardless of the test environment's default region config.
@linear-code
Copy link

linear-code bot commented Mar 16, 2026

@mchen-sentry mchen-sentry enabled auto-merge (squash) March 16, 2026 20:09
@mchen-sentry mchen-sentry merged commit 17c7d3e into master Mar 16, 2026
51 checks passed
@mchen-sentry mchen-sentry deleted the mingchen/di-1711-snowflake-test-fix branch March 16, 2026 20:18
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.

2 participants