Skip to content

Commit 7c2df8e

Browse files
authored
test(node): Increase flush interval of session tests. (#6877)
1 parent 7005646 commit 7c2df8e

File tree

2 files changed

+4
-4
lines changed

2 files changed

+4
-4
lines changed

packages/node-integration-tests/suites/sessions/server.ts

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -22,9 +22,9 @@ let flusherIntervalId = flusher?._intervalId;
2222
clearInterval(flusherIntervalId);
2323

2424
// @ts-ignore: need access to `_intervalId`
25-
flusherIntervalId = flusher?._intervalId = setInterval(() => flusher?.flush(), 1000);
25+
flusherIntervalId = flusher?._intervalId = setInterval(() => flusher?.flush(), 2000);
2626

27-
setTimeout(() => clearInterval(flusherIntervalId), 2000);
27+
setTimeout(() => clearInterval(flusherIntervalId), 4000);
2828

2929
app.get('/test/success', (_req, res) => {
3030
res.send('Success!');
@@ -36,7 +36,7 @@ app.get('/test/success_next', (_req, res, next) => {
3636
});
3737

3838
app.get('/test/success_slow', async (_req, res) => {
39-
await new Promise(res => setTimeout(res, 500));
39+
await new Promise(res => setTimeout(res, 50));
4040

4141
res.send('Success!');
4242
});

packages/remix/test/integration/test/client/manualtracing.test.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ test('should report a manually created / finished transaction.', async ({ page }
1414
expect(manualTransactionEnvelope.start_timestamp).toBeDefined();
1515
expect(manualTransactionEnvelope.timestamp).toBeDefined();
1616

17-
expect(pageloadEnvelope.contexts?.trace.op).toBe('pageload');
17+
expect(pageloadEnvelope.contexts?.trace?.op).toBe('pageload');
1818
expect(pageloadEnvelope.tags?.['routing.instrumentation']).toBe('remix-router');
1919
expect(pageloadEnvelope.type).toBe('transaction');
2020
expect(pageloadEnvelope.transaction).toBe('routes/manual-tracing/$id');

0 commit comments

Comments
 (0)