Repository navigation
Conversation
This branch has not been deployed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
Summary:
stopMetroServerin Fantom's global teardown races the Metro server'scloseagainst a 5 secondsetTimeout, but never clears that timer whenclosewins. The pending timer keeps Node's event loop alive, so everyyarn fantomrun hangs for about 5 seconds after the summary and Jest prints "Jest did not exit one second after the test run has completed". This clears the timer once the race settles.Fixes #59699
Changelog:
[INTERNAL] [FIXED] - Clear Fantom's Metro shutdown timer once the server closes
Test Plan:
Ran the same close-vs-timeout race against a plain Node
httpserver: withoutclearTimeoutthe process exits about 5 s after teardown returns, with it the process exits right away.yarn flow check,eslintandprettierpass on the file. I don't have Fantom's tester built locally, so I didn't runyarn fantomitself.