-
Notifications
You must be signed in to change notification settings - Fork 86
test: wait for background work to finish in integration tests #2851
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
test: wait for background work to finish in integration tests #2851
Conversation
})) as LambdaResponse | ||
|
||
await invocationPromise |
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.
possibly instead of awaiting here we should return this promise, but before https://github.com/netlify/serverless-functions-api/pull/358 landed we were basically waiting for stream to close here and we were blocking stream closing to ensure background work
making change to return this promise as part of results instead of awaiting would like require test adjustments, so I think it's better to restore previous behavior
📊 Package size report No changes
Unchanged files
🤖 This report was automatically generated by pkg-size-action |
Description
Since
waitUntil
was shipped, our integration test'sinvokeFunction
was not awaiting background work which resulted in some flakiness - specifically visible on Windows runners. This restore previous behaviorRelevant links (GitHub issues, etc.) or a picture of cute animal
https://linear.app/netlify/issue/FRB-1714/flaky-test-purge-api-is-not-used-when-unstable-cache-cache-entry-gets