Skip to content

ref(nextjs): Change integration test timings to be less flaky #3949

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Sep 1, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions packages/nextjs/test/integration/next-env.d.ts
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
/// <reference types="next" />
/// <reference types="next/types/global" />
/// <reference types="next/image-types/global" />

// NOTE: This file should not be edited
// see https://nextjs.org/docs/basic-features/typescript for more information.
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ module.exports = async ({ page, url, requests }) => {
errors: 0,
});

await sleep(100);
await sleep(250);

await waitForAll([
page.click('a#alsoHealthy'),
Expand All @@ -24,15 +24,15 @@ module.exports = async ({ page, url, requests }) => {
errors: 0,
});

await sleep(100);
await sleep(250);

expectSession(requests.sessions[2], {
init: true,
status: 'ok',
errors: 0,
});

await sleep(100);
await sleep(250);

await waitForAll([
page.click('a#healthy'),
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ module.exports = async ({ page, url, requests }) => {
},
});

await sleep(100);
await sleep(250);

await page.click('a#alsoHealthy');
await page.waitForRequest(isTransactionRequest);
Expand All @@ -33,7 +33,7 @@ module.exports = async ({ page, url, requests }) => {
},
});

await sleep(100);
await sleep(250);

await page.click('a#healthy');
await page.waitForRequest(isTransactionRequest);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@ module.exports = async ({ url: urlBase, argv }) => {
);

await getAsync(url);
await sleep(100);
await sleep(250);

assert.ok(capturedErrorRequest.isDone(), 'Did not intercept expected error request');
assert.ok(capturedTransactionRequest.isDone(), 'Did not intercept expected transaction request');
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ module.exports = async ({ url: urlBase, argv }) => {
);

await getAsync(url);
await sleep(100);
await sleep(250);

assert.ok(capturedRequest.isDone(), 'Did not intercept expected request');
};
2 changes: 1 addition & 1 deletion packages/nextjs/test/integration/test/server/tracing200.js
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ module.exports = async ({ url: urlBase, argv }) => {
);

await getAsync(url);
await sleep(100);
await sleep(250);

assert.ok(capturedRequest.isDone(), 'Did not intercept expected request');
};
2 changes: 1 addition & 1 deletion packages/nextjs/test/integration/test/server/tracing500.js
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ module.exports = async ({ url: urlBase, argv }) => {
);

await getAsync(url);
await sleep(100);
await sleep(250);

assert.ok(capturedRequest.isDone(), 'Did not intercept expected request');
};
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ module.exports = async ({ url: urlBase, argv }) => {
);

await getAsync(url);
await sleep(100);
await sleep(250);

assert.ok(capturedRequest.isDone(), 'Did not intercept expected request');
};