From 7306033603e6cfdc0f09e001f5bffc005d3b73d9 Mon Sep 17 00:00:00 2001 From: Tony Kelman Date: Thu, 4 Aug 2016 07:28:31 -0700 Subject: [PATCH] Fix #17805, spawn test failure on Windows introduced by #17522 (cherry picked from commit a3f288ce54ccf66ffaebb7d31574b1ed552e0045) ref #17815 --- test/spawn.jl | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/test/spawn.jl b/test/spawn.jl index 0040630cf2016..7fa04587e3b28 100644 --- a/test/spawn.jl +++ b/test/spawn.jl @@ -287,7 +287,12 @@ let out = Pipe(), echo = `$exename --startup-file=no -e 'print(STDOUT, " 1\t", r @test_throws ArgumentError write(out, "now closed error") @test isreadable(out) @test !iswritable(out) - is_windows() && Base.process_events(false) # should be enough steps to fully propagate EOF now + if is_windows() + # WINNT kernel does not provide a fast mechanism for async propagation + # of EOF for a blocking stream, so just wait for it to catch up. + # This shouldn't take much more than 32ms. + Base.wait_close(out) + end @test !isopen(out) end wait(ready) # wait for writer task to be ready before using `out`