From 1bd8b28b9f1fb879419878a8ab414fcfc54c3d20 Mon Sep 17 00:00:00 2001 From: MURAKAMI Masahiko Date: Sat, 12 Nov 2016 17:04:42 +0900 Subject: [PATCH] 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 Reviewed-By: Shigeki Ohtsu Reviewed-By: Colin Ihrig Reviewed-By: Anna Henningsen --- test/parallel/test-stream-unshift-empty-chunk.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/test/parallel/test-stream-unshift-empty-chunk.js b/test/parallel/test-stream-unshift-empty-chunk.js index 99c2e8b7520144..477f5c4be56bac 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); }); };