From 57cc5cb27779ebeb4c1363065859d6717943eef7 Mon Sep 17 00:00:00 2001 From: "masashi.g" Date: Sat, 12 Nov 2016 22:56:19 +0900 Subject: [PATCH] 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 Reviewed-By: Anna Henningsen Reviewed-By: Luigi Pinca Reviewed-By: Shigeki Ohtsu --- test/parallel/test-stream2-push.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/test/parallel/test-stream2-push.js b/test/parallel/test-stream2-push.js index e4603e688ecf55..a9c624ea79f112 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); }); }