Skip to content

Commit ce1df3e

Browse files
authored
test(nextjs): Adapt slow test (#14403)
1 parent d49f1cb commit ce1df3e

File tree

2 files changed

+3
-2
lines changed

2 files changed

+3
-2
lines changed
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
export const dynamic = 'force-dynamic';
22

33
export default async function SuperSlowPage() {
4-
await new Promise(resolve => setTimeout(resolve, 10000));
4+
await new Promise(resolve => setTimeout(resolve, 5000));
55
return null;
66
}

dev-packages/e2e-tests/test-applications/nextjs-app-dir/tests/transactions.test.ts

+2-1
Original file line numberDiff line numberDiff line change
@@ -125,13 +125,14 @@ test('Should set not_found status for server actions calling notFound()', async
125125
test('Will not include spans in pageload transaction with faulty timestamps for slow loading pages', async ({
126126
page,
127127
}) => {
128+
test.slow();
128129
const pageloadTransactionEventPromise = waitForTransaction('nextjs-app-dir', transactionEvent => {
129130
return (
130131
transactionEvent?.contexts?.trace?.op === 'pageload' && transactionEvent?.transaction === '/very-slow-component'
131132
);
132133
});
133134

134-
await page.goto('/very-slow-component');
135+
await page.goto('/very-slow-component', { timeout: 11000 });
135136

136137
const pageLoadTransaction = await pageloadTransactionEventPromise;
137138

0 commit comments

Comments
 (0)