Skip to content

fix(tests): Fix flaky test_cross_trace_query_with_spans_and_logs#109572

Merged
smanes-sentry merged 1 commit intomasterfrom
sarajmanes/exp-760-flaky-test-test_cross_trace_query_with_spans_and_logs
Feb 27, 2026
Merged

fix(tests): Fix flaky test_cross_trace_query_with_spans_and_logs#109572
smanes-sentry merged 1 commit intomasterfrom
sarajmanes/exp-760-flaky-test-test_cross_trace_query_with_spans_and_logs

Conversation

@smanes-sentry
Copy link
Contributor

@smanes-sentry smanes-sentry commented Feb 27, 2026

Problem

The test was using midnight as a timestamp, which caused timing-related flakiness depending on when the test ran relative to day boundaries.

Fix

Updated the failing test and related tests to use non-midnight timestamps so results are stable regardless of execution time.

Fixes GH-106681

@linear
Copy link

linear bot commented Feb 27, 2026

@smanes-sentry smanes-sentry marked this pull request as ready for review February 27, 2026 17:40
@smanes-sentry smanes-sentry requested review from a team as code owners February 27, 2026 17:40
Copy link
Member

@wmak wmak left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

small comment, but non-blocking. LGTM ty

Copy link
Contributor

@cursor cursor bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Cursor Bugbot has reviewed your changes and found 1 potential issue.

Bugbot Autofix is OFF. To automatically fix reported issues with cloud agents, enable autofix in the Cursor dashboard.

Fixing the flakiness in the tests due to timing issues. Updated tests (failed and others) to not use midnight as timestamp to avoid flakiness
Move common timestamps to one variable in setUp
@smanes-sentry smanes-sentry force-pushed the sarajmanes/exp-760-flaky-test-test_cross_trace_query_with_spans_and_logs branch from 037f709 to 5087dd4 Compare February 27, 2026 20:59
@smanes-sentry smanes-sentry merged commit 272a5d9 into master Feb 27, 2026
70 checks passed
@smanes-sentry smanes-sentry deleted the sarajmanes/exp-760-flaky-test-test_cross_trace_query_with_spans_and_logs branch February 27, 2026 21:51
jan-auer added a commit that referenced this pull request Mar 2, 2026
…ept-encoding

* origin/master: (63 commits)
  fix(api): Add missing cursor query parameter to paginated endpoint OpenAPI schemas (#109642)
  docs(sentry-apps): Add sentryAppId to sentry-app-installations API schema (#109628)
  feat(occurrences on eap): Implement double reads from EAP in organization events trace API endpoint (#109391)
  feat(occurrences on eap): Implement double reads from EAP for reprocessing2 flow (#109345)
  feat(ci): report backend test fails (#109543)
  feat(seer): Add signed viewer context header to Seer API requests (#109626)
  devenv: cleanup devenv-managed uv (#109617)
  feat(seer): Iterate on the instructions at the top of seer settings pages (#109586)
  ref(seer): Add typed wrappers for remaining Seer API callsites (#109607)
  feat(preprod): Make snapshots endpoint org scoped (#109575)
  chore: capture exception (#109620)
  fix(formatting): run ruff format (#109618)
  feat(preprod): Create admin gated recompare snapshots endpoint (#109546)
  feat(cells): expand locality/cell distinction (#109538)
  feat(cells): add db migration for synapse (#109615)
  feat(preprod): Add public install-details endpoint and shared utilities (#109583)
  fix(tests): Fix flaky test_cross_trace_query_with_spans_and_logs (#109572)
  fix(grouping): Resolve mypy possibly-undefined errors in grouphash caching (#109602)
  fix(dashboards): Default axisRange to auto for existing widgets in builder (#109598)
  fix(billing): Fix category display names in pending changes (#109612)
  ...
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.

Flaky test: test_cross_trace_query_with_spans_and_logs

2 participants