Commit 2164795
fix(browser-tests): fix flaky sessions route-lifecycle test by replacing timeout-based approach with sequential waitForSession
The test was flaky because getMultipleSentryEnvelopeRequests starts a 4000ms timeout
before page.goto, so the timeout could expire before all 4 session envelopes arrived.
Replaced with the robust sequential waitForSession pattern (used in start-session,
initial-scope, user tests) that deterministically waits for each session individually.
Co-Authored-By: Claude <noreply@anthropic.com>
Agent-Logs-Url: https://github.com/getsentry/sentry-javascript/sessions/443b2c75-cf14-4a37-8212-6a532959da82
Co-authored-by: Lms24 <8420481+Lms24@users.noreply.github.com>1 parent a269c24 commit 2164795
File tree
1 file changed
+15
-12
lines changed- dev-packages/browser-integration-tests/suites/sessions/route-lifecycle
1 file changed
+15
-12
lines changedLines changed: 15 additions & 12 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1 | 1 | | |
2 | | - | |
3 | 2 | | |
4 | | - | |
| 3 | + | |
5 | 4 | | |
6 | 5 | | |
7 | 6 | | |
8 | 7 | | |
9 | 8 | | |
10 | 9 | | |
11 | | - | |
12 | | - | |
13 | | - | |
14 | | - | |
15 | | - | |
| 10 | + | |
| 11 | + | |
| 12 | + | |
16 | 13 | | |
17 | | - | |
18 | | - | |
19 | | - | |
| 14 | + | |
20 | 15 | | |
| 16 | + | |
| 17 | + | |
| 18 | + | |
21 | 19 | | |
| 20 | + | |
22 | 21 | | |
23 | | - | |
| 22 | + | |
| 23 | + | |
| 24 | + | |
24 | 25 | | |
25 | | - | |
| 26 | + | |
| 27 | + | |
| 28 | + | |
26 | 29 | | |
27 | 30 | | |
0 commit comments