(chore) fix flaky test (hopefully) #2064
Merged
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.
#2007
Our typescript-related tests usually time out because the typescript's internal building takes too long. This makes the test frequently fail in less performant machines and in
test.only
during development. This PR moves the internal building to thebefore
hook with a 5000ms timeout. After moving the building out, most of the tests should be able to finish within 1s. So I also dropped the snapshot test timeout back to default. If we want to test potential performance degradation, we could also drop the timeout to 1500ms or even 1000ms in CI.The performance test also fails quite frequently. GitHub CI runner probably isn't isolated enough, so the hardware performance fluctuates significantly. I changed it to benchmark first and then used the result to run the perf test.