Skip to content

Commit f92c512

Browse files
committed
clean up timing algo
1 parent 9945932 commit f92c512

File tree

2 files changed

+3
-1
lines changed

2 files changed

+3
-1
lines changed

packages/remix/test/integration/app/routes/scope-bleed/$id.tsx

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,9 @@ import { json, LoaderFunction } from '@remix-run/node';
33
import * as Sentry from '@sentry/remix';
44

55
export const loader: LoaderFunction = async ({ params: { id } }) => {
6+
await new Promise(resolve => setTimeout(resolve, parseInt(id || '', 10) * 1000 - 1000));
67
Sentry.setTag(`tag${id}`, id);
8+
await new Promise(resolve => setTimeout(resolve, 1000));
79

810
return json({ test: 'test' });
911
};

packages/remix/test/integration/test/server/loader.test.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -143,7 +143,7 @@ describe.each(['builtin', 'express'])('Remix API Loaders with adapter = %s', ada
143143
await Promise.all(
144144
Array.from(Array(5).keys()).map(async (id: number) => {
145145
const url = `${baseURL}/scope-bleed/${id}`;
146-
await new Promise(resolve => setTimeout(resolve, 5000 - id * 1000));
146+
await new Promise(resolve => setTimeout(resolve, 5000 - id * 1000 - 1000));
147147
const envelope = await getEnvelopeRequest(url);
148148
const transaction = envelope[2];
149149

0 commit comments

Comments
 (0)