aboutsummaryrefslogtreecommitdiff
path: root/test/parallel/test-stream2-push.js
diff options
context:
space:
mode:
authormasashi.g <masashi.g@gmail.com>2016-11-12 22:56:19 +0900
committerShigeki Ohtsu <ohtsu@ohtsu.org>2016-11-18 18:21:16 +0900
commit99277952b4881fbb65d9a7dc03fc9a3c5cc0290e (patch)
tree9af39f9677b8c5f1a577e9d734a631fcd721ca61 /test/parallel/test-stream2-push.js
parent30bf123e41b3a4027aaec37464b471c01dcb2d94 (diff)
downloadandroid-node-v8-99277952b4881fbb65d9a7dc03fc9a3c5cc0290e.tar.gz
android-node-v8-99277952b4881fbb65d9a7dc03fc9a3c5cc0290e.tar.bz2
android-node-v8-99277952b4881fbb65d9a7dc03fc9a3c5cc0290e.zip
test: use setImmediate() in test of stream2
use setImmediate() insted of setTimeout() in test of stream2 push. The test is in test/parallel/test-stream2-push.js Fixes: https://github.com/nodejs/code-and-learn/issues/58 PR-URL: https://github.com/nodejs/node/pull/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>
Diffstat (limited to 'test/parallel/test-stream2-push.js')
-rw-r--r--test/parallel/test-stream2-push.js2
1 files changed, 1 insertions, 1 deletions
diff --git a/test/parallel/test-stream2-push.js b/test/parallel/test-stream2-push.js
index a7ff95e748..445a186715 100644
--- a/test/parallel/test-stream2-push.js
+++ b/test/parallel/test-stream2-push.js
@@ -111,7 +111,7 @@ function end() {
source.emit('end');
assert(!reading);
writer.end(stream.read());
- setTimeout(function() {
+ setImmediate(function() {
assert(ended);
});
}