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); }); }