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 <cjihrig@gmail.com>
Reviewed-By: Anna Henningsen <anna@addaleax.net>
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
Reviewed-By: Shigeki Ohtsu <ohtsu@ohtsu.org>
  • Loading branch information
mganeko authored and shigeki committed Nov 18, 2016
1 parent 30bf123 commit 9927795
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 9927795

Please sign in to comment.