diff options
author | masashi.g <masashi.g@gmail.com> | 2016-11-12 22:56:19 +0900 |
---|---|---|
committer | Shigeki Ohtsu <ohtsu@ohtsu.org> | 2016-11-18 18:21:16 +0900 |
commit | 99277952b4881fbb65d9a7dc03fc9a3c5cc0290e (patch) | |
tree | 9af39f9677b8c5f1a577e9d734a631fcd721ca61 /test/parallel | |
parent | 30bf123e41b3a4027aaec37464b471c01dcb2d94 (diff) | |
download | node-new-99277952b4881fbb65d9a7dc03fc9a3c5cc0290e.tar.gz |
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')
-rw-r--r-- | test/parallel/test-stream2-push.js | 2 |
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); }); } |