-
Notifications
You must be signed in to change notification settings - Fork 29.8k
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
Flaky test-stream-readable-unpipe-resume
#54133
Comments
I can reproduce on Ubuntu. diff --git a/test/parallel/test-stream-readable-unpipe-resume.js b/test/parallel/test-stream-readable-unpipe-resume.js
index b40f724bcc..3eeae52f5f 100644
--- a/test/parallel/test-stream-readable-unpipe-resume.js
+++ b/test/parallel/test-stream-readable-unpipe-resume.js
@@ -13,7 +13,9 @@ const transformStream = new stream.Transform({
})
});
-readStream.on('end', common.mustCall());
+readStream.on('end', common.mustCall(function () {
+ console.log('end');
+}));
readStream
.pipe(transformStream)
This is yet another case (see #52550 (comment)) where the test correctly finishes (note "end" in the output) but the process does not exit. |
I wish we were able to reproduce these more reliably, because I don't know how to debug something that only happens once or twice every 10k runs! |
It might be only a coincidence or a reduced failure rate, but even in this case I get no failures with the |
Hypothetically, as a short-term solution, we could call - readStream.on('end', common.mustCall());
+ readStream.on('end', common.mustCall(() => process.exit())); |
@RedYetiDev it does not help, see #52964 (comment). |
Insterestingly, it seems to not fail if you change the line to: readStream.on('end', common.mustCall(() => queueMicrotask(process.exit))); I ran 10,000 runs with this change: 0 failures Although this could be a coincidence? |
Yes, I think so. For example, this diff --git a/test/parallel/test-net-write-fully-async-hex-string.js b/test/parallel/test-net-write-fully-async-hex-string.js
index 37b5cd75c1..b37f2acefc 100644
--- a/test/parallel/test-net-write-fully-async-hex-string.js
+++ b/test/parallel/test-net-write-fully-async-hex-string.js
@@ -30,3 +30,7 @@ const server = net.createServer(common.mustCall(function(conn) {
writeLoop();
}));
}));
+
+server.on('close', function () {
+ queueMicrotask(process.exit);
+});
makes no difference. |
This whole issue is strange. I wonder what task is hanging the process 🤔 |
Test
test-stream-readable-unpipe-resume
Platform
Linux x64
Console output
Build links
Additional information
No response
The text was updated successfully, but these errors were encountered: