Skip to content

Commit 15597f9

Browse files
antonisclaude
andcommitted
fix(e2e): Restore strict HTTP spans assertion
Revert the relaxation of the HTTP spans check from >= 1 back to exactly 2. The other fixes (simulator warm-up, wait_for_boot, clearState, per-flow retries) address the actual flakiness; weakening this assertion would permanently hide regressions where one tracing layer stops producing spans. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
1 parent 97d17ea commit 15597f9

1 file changed

Lines changed: 3 additions & 5 deletions

File tree

samples/react-native/e2e/tests/captureSpaceflightNewsScreenTransaction/captureSpaceflightNewsScreenTransaction.test.ts

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -131,18 +131,16 @@ describe('Capture Spaceflight News Screen Transaction', () => {
131131
);
132132
});
133133

134-
it('contains articles requests spans', () => {
135-
// This test ensures we are tracing requests on different layers
134+
it('contains exactly two articles requests spans', () => {
135+
// This test ensures we are tracing requests multiple times on different layers
136136
// fetch > xhr > native
137-
// On slow CI VMs, not all HTTP span layers may complete within the transaction,
138-
// so we check for at least one HTTP span.
139137

140138
const item = getFirstNewsEventItem();
141139
const spans = item?.[1].spans;
142140

143141
const httpSpans = spans?.filter(
144142
span => span.data?.['sentry.op'] === 'http.client',
145143
);
146-
expect(httpSpans?.length ?? 0).toBeGreaterThanOrEqual(1);
144+
expect(httpSpans).toHaveLength(2);
147145
});
148146
});

0 commit comments

Comments
 (0)