Skip to content

Commit

Permalink
test: use setImmediate() in test of stream2
Browse files Browse the repository at this point in the history
use setImmediate() insted of setTimeout()
 in test of stream2 push.
The test is in test/parallel/test-stream2-push.js

Fixes: nodejs/code-and-learn#58
PR-URL: #9583
Reviewed-By: Colin Ihrig <[email protected]>
Reviewed-By: Anna Henningsen <[email protected]>
Reviewed-By: Luigi Pinca <[email protected]>
Reviewed-By: Shigeki Ohtsu <[email protected]>
  • Loading branch information
mganeko authored and MylesBorins committed Dec 20, 2016
1 parent 8345ffb commit 57cc5cb
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion test/parallel/test-stream2-push.js
Original file line number Diff line number Diff line change
Expand Up @@ -111,7 +111,7 @@ function end() {
source.emit('end');
assert(!reading);
writer.end(stream.read());
setTimeout(function() {
setImmediate(function() {
assert(ended);
});
}

0 comments on commit 57cc5cb

Please sign in to comment.