summaryrefslogtreecommitdiff
path: root/test/parallel/test-stream-unshift-empty-chunk.js
diff options
context:
space:
mode:
authorMURAKAMI Masahiko <fossamagna2@gmail.com>2016-11-12 17:04:42 +0900
committerShigeki Ohtsu <ohtsu@ohtsu.org>2016-11-13 15:00:03 +0900
commit8a78fcb345c7005e2dc14bbe0367b28081b9e853 (patch)
tree679bfd3ea0a47a68454002e9f73ac17a9f22956a /test/parallel/test-stream-unshift-empty-chunk.js
parenta3dd9430c74b025531bf2128f56938294539e6da (diff)
downloadandroid-node-v8-8a78fcb345c7005e2dc14bbe0367b28081b9e853.tar.gz
android-node-v8-8a78fcb345c7005e2dc14bbe0367b28081b9e853.tar.bz2
android-node-v8-8a78fcb345c7005e2dc14bbe0367b28081b9e853.zip
test: change from setTimeout to setImmediate
This is a part of Code And Learn at NodeFest 2016 Challenge Fixes: https://github.com/nodejs/code-and-learn/issues/58 PR-URL: https://github.com/nodejs/node/pull/9578 Reviewed-By: Yosuke Furukawa <yosuke.furukawa@gmail.com> Reviewed-By: Shigeki Ohtsu <ohtsu@ohtsu.org> Reviewed-By: Colin Ihrig <cjihrig@gmail.com> Reviewed-By: Anna Henningsen <anna@addaleax.net>
Diffstat (limited to 'test/parallel/test-stream-unshift-empty-chunk.js')
-rw-r--r--test/parallel/test-stream-unshift-empty-chunk.js2
1 files changed, 1 insertions, 1 deletions
diff --git a/test/parallel/test-stream-unshift-empty-chunk.js b/test/parallel/test-stream-unshift-empty-chunk.js
index 99c2e8b752..477f5c4be5 100644
--- a/test/parallel/test-stream-unshift-empty-chunk.js
+++ b/test/parallel/test-stream-unshift-empty-chunk.js
@@ -11,7 +11,7 @@ var nChunks = 10;
var chunk = Buffer.alloc(10, 'x');
r._read = function(n) {
- setTimeout(function() {
+ setImmediate(function() {
r.push(--nChunks === 0 ? null : chunk);
});
};