-
-
Notifications
You must be signed in to change notification settings - Fork 4.8k
Setup integration tests #5466
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
Merged
Merged
Setup integration tests #5466
Conversation
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
6db0e32 to
a933b52
Compare
If for any reason the integration tests fail, then it will run forever on CI (~2hours or something). The `--forceExit` is not ideal but it will prevent long running processes.
We were never properly waiting for the command to finish.
06479d7 to
fe1b3b1
Compare
In CI, when an AbortController gets aborted an error is thrown (AbortError). If we don't catch it properly then it will "leak" and the test will fail.
b4e8345 to
904abb9
Compare
This will cancel other builds when one fails, it will also separate the output per integration which can be useful especially now that we are still figuring things out.
Debouncing for 200ms means that if another message comes in within those 200ms we delay the execution of the callback.
904abb9 to
383a47e
Compare
608f525 to
4b85cdc
Compare
4b85cdc to
217c3b2
Compare
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.
Finally got the integration tests working on CI! Turns out that there are a few gotchas... fs events are not really reliable, because if you stream to a file, then the first time you touch the file you immediately get a change even if the file is not finished yet. Instead we now use polling and the
awaitWriteFinishoptions from chokidar with thestabilityThresholdset to a pretty high number to be very sure!For a few integrations we look at the terminal output (stdout/stderr), and rely on a message like
done in, that way we don't have to rely on the extra polling time of the output. This results in faster tests, which is always nice to see. There is a catch though, turns out that webpack-4 and webpack-5 write thesuccessfully compiled inmessage, before it is fully done writing to disk.