Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Signed-off-by: Timo Glastra timo@animo.id
This PR adds
--forceExit --bail
to the test script when running in CI. It won't necesarily fix the issues we have with flaky tests, but it should fix the tests keeping running even though a timeout has occurred. The--bail
means it will also stop tests after one test has failed instead of continuing running.Ideally we don't use
--forceExit
as it's discouraged by Jest and you should gracefully exit. However, I've been doing tests with minimal setups and I think the issue of not exiting is because of the Indy SDK doing tasks while the test times out, and that prevents from a graceful exit. I'm not sure this is the case, but this is my current feeling.I've tried migrating to vitest over jest as it has way better logging and feels quicker / simpler (that's how I discovered the test issues have something to do with the indy-sdk). However, vite doesn't support decorators at the moment (well, esbuild doesn't) so we can't switch at the moment.
I hope these changes will at least give us more insights into which tests are causing the flakyness