Skip to content

Commit

Permalink
test: Fix flakey integration test (#13253)
Browse files Browse the repository at this point in the history
  • Loading branch information
lforst authored Aug 6, 2024
1 parent b0d4926 commit 8fb3f24
Showing 1 changed file with 11 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,17 @@ app.get('/test/error/:id', (req, res) => {

Sentry.captureException(new Error(`This is an exception ${id}`));

res.send({});
setTimeout(() => {
// We flush to ensure we are sending exceptions in a certain order
Sentry.flush(3000).then(
() => {
res.send({});
},
() => {
res.send({});
},
);
}, 1000);
});

Sentry.setupExpressErrorHandler(app);
Expand Down

0 comments on commit 8fb3f24

Please sign in to comment.