Skip to content
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

Wait for the next event loop iteration when loading WASM #1086

Merged
merged 1 commit into from
Mar 28, 2018

Conversation

fathyb
Copy link
Contributor

@fathyb fathyb commented Mar 28, 2018

The test should load a wasm file in parallel with a dynamic JS import was failing randomly since #981 was merged, this fixes it.

Combined with #1068 the tests should be reliable again.

Copy link
Member

@devongovett devongovett left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is really strange, not sure I fully understand. Isn't fs.readFile async already? Seems to fix the problem though...

@devongovett devongovett merged commit fb47244 into master Mar 28, 2018
@devongovett devongovett deleted the fathy/fix-flacky-wasm-tests branch March 28, 2018 16:27
@fathyb
Copy link
Contributor Author

fathyb commented Mar 28, 2018

Honestly I don't fully understand it either, I did it from a gut feeling that the parent isn't loaded and it worked.

Even weirder: replace setImmediate with process.nextTick and it doesn't work. Could've made sense if we weren't using readFile but like you said fs.readFile is already async.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants