Skip to content

Commit 72bbefb

Browse files
committed
fix flakyness
1 parent 2c2bcb2 commit 72bbefb

File tree

2 files changed

+7
-0
lines changed
  • packages/browser-integration-tests/suites/replay/largeMutations

2 files changed

+7
-0
lines changed

packages/browser-integration-tests/suites/replay/largeMutations/defaultOptions/test.ts

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,7 @@ sentryTest(
1111
}
1212

1313
const reqPromise0 = waitForReplayRequest(page, 0);
14+
const reqPromise0b = waitForReplayRequest(page, 1);
1415

1516
await page.route('https://dsn.ingest.sentry.io/**/*', route => {
1617
return route.fulfill({
@@ -23,7 +24,10 @@ sentryTest(
2324
const url = await getLocalTestPath({ testDir: __dirname });
2425

2526
await page.goto(url);
27+
await forceFlushReplay();
2628
const res0 = await reqPromise0;
29+
await reqPromise0b;
30+
// A second request is sent right after initial snapshot, we want to wait for that to settle before we continue
2731

2832
const reqPromise1 = waitForReplayRequest(page);
2933

packages/browser-integration-tests/suites/replay/largeMutations/mutationLimit/test.ts

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,7 @@ sentryTest(
1111
}
1212

1313
const reqPromise0 = waitForReplayRequest(page, 0);
14+
const reqPromise0b = waitForReplayRequest(page, 1);
1415

1516
await page.route('https://dsn.ingest.sentry.io/**/*', route => {
1617
return route.fulfill({
@@ -24,6 +25,8 @@ sentryTest(
2425

2526
await page.goto(url);
2627
const res0 = await reqPromise0;
28+
await reqPromise0b;
29+
// A second request is sent right after initial snapshot, we want to wait for that to settle before we continue
2730

2831
const reqPromise1 = waitForReplayRequest(page);
2932

0 commit comments

Comments
 (0)