-
-
Notifications
You must be signed in to change notification settings - Fork 1.6k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
tests(e2e): Remove await timeout in nest e2e tests #13243
Conversation
size-limit report 📦
|
|
||
@Get('flush') | ||
async flush() { | ||
flush(); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
m: It may be worth to await the flush() call. Then we can be sure when we await the fetch call, that the flush went fully through.
@@ -65,7 +65,7 @@ test('Does not send HttpExceptions to Sentry', async ({ baseURL }) => { | |||
await transactionEventPromise400; | |||
await transactionEventPromise500; | |||
|
|||
await new Promise(resolve => setTimeout(resolve, 10000)); | |||
await fetch(`${baseURL}/flush`); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
await fetch(`${baseURL}/flush`); | |
await (await fetch(`${baseURL}/flush`)).text(); |
Let's await the full response body to ensure the endpoint completed. Same for the others.
Adding a separate flush endpoint that flushes the client in the application so that we can remove the timeout await and speed up tests.