Skip to content

Isolate the Sentry interceptor tests from each other - #415

Open
DABH wants to merge 1 commit into
mainfrom
sentry-test-isolation
Open

DABH wants to merge 1 commit into
mainfrom
sentry-test-isolation

Conversation

@DABH

@DABH DABH commented Nov 12, 2026 •

Copy link
Copy Markdown
Contributor

This PR isolates the two Sentry interceptor tests from each other. They shared one workflow ID (sentry-workflow-id) and one task queue (sentry-task-queue), while sentry_sdk.init reused the global scopes...

...but the tests afaict were written to assume independence.

Therefore, each test now uses its own workflow ID and task queue, the fixture clears the global, isolation, and current scopes before sentry_sdk.init and closes the client afterwards, and the tag assertions use the generated values. Both tests pass repeatedly on Python 3.12 against the local dev server and the time-skipping server; the module still skips itself on 3.14, where the Sentry SDK is unsupported.

Both tests shared one workflow ID and one task queue, and the Sentry
client and scopes carried over between them, so a worker or breadcrumb
from the first test could show up in the second. Each test now gets its
own IDs and a fresh client with cleared scopes.
@DABH
DABH force-pushed the sentry-test-isolation branch from 37cd65b to f45c629 Compare November 13, 2026 18:33
@DABH
DABH enabled auto-merge (squash) November 13, 2026 19:27
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.

1 participant