Skip to content

Commit e4c7c0d

Browse files
committed
Revert "try timeout sol"
This reverts commit 1607304.
1 parent 1607304 commit e4c7c0d

File tree

2 files changed

+11
-15
lines changed

2 files changed

+11
-15
lines changed

dev-packages/node-integration-tests/suites/tracing/vercelai/scenario-express-error.mjs

Lines changed: 9 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -62,23 +62,19 @@ async function run() {
6262
const server = createServer(app);
6363

6464
// Start server and make request
65-
server.listen(0, async () => {
65+
server.listen(0, () => {
6666
const port = server.address()?.port;
6767
// eslint-disable-next-line no-console
6868
console.log(JSON.stringify({ port }));
6969

70-
try {
71-
// Make the request that will trigger the error
72-
const response = await fetch(`http://localhost:${port}/api/chat`);
73-
await response.json(); // Consume the response
74-
} catch (error) {
75-
// Expected to fail due to the tool error, but we still want to capture it
76-
}
77-
78-
// Give time for Sentry to process and send the error
79-
setTimeout(() => {
80-
server.close();
81-
}, 1000);
70+
// Make the request that will trigger the error
71+
fetch(`http://localhost:${port}/api/chat`)
72+
.then(() => {
73+
server.close();
74+
})
75+
.catch(() => {
76+
server.close();
77+
});
8278
});
8379
}
8480

dev-packages/node-integration-tests/suites/tracing/vercelai/test.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -458,7 +458,7 @@ describe('Vercel AI integration', () => {
458458
expect(errorTraceId).toMatch(/^[a-f0-9]{32}$/);
459459

460460
expect(errorTraceId).toBe(transactionTraceId);
461-
}, 30000);
461+
});
462462
});
463463

464464
createEsmAndCjsTests(__dirname, 'scenario-express-error.mjs', 'instrument-with-pii.mjs', (createRunner, test) => {
@@ -504,6 +504,6 @@ describe('Vercel AI integration', () => {
504504
expect(errorTraceId).toMatch(/^[a-f0-9]{32}$/);
505505

506506
expect(errorTraceId).toBe(transactionTraceId);
507-
}, 30000);
507+
});
508508
});
509509
});

0 commit comments

Comments
 (0)