Skip to content

Commit

Permalink
Distributed,test: filter out startup failure debugging info from STDOUT
Browse files Browse the repository at this point in the history
  • Loading branch information
vtjnash committed Nov 14, 2017
1 parent 7e421c1 commit e63fd8a
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions test/distributed_exec.jl
Original file line number Diff line number Diff line change
Expand Up @@ -1153,12 +1153,20 @@ append!(testruns, [
])

for (addp_testf, expected_errstr, env) in testruns
old_stdout = STDOUT
stdout_out, stdout_in = redirect_stdout()
stdout_txt = @schedule filter!(readlines(stdout_out)) do s
return !startswith(s, "\tFrom failed worker startup:\t")
end
try
withenv(env...) do
addp_testf()
end
error("Unexpected")
catch ex
redirect_stdout(old_stdout)
close(stdout_in)
@test isempty(wait(stdout_txt))
@test isa(ex, CompositeException)
@test ex.exceptions[1].ex.msg == expected_errstr
end
Expand Down

0 comments on commit e63fd8a

Please sign in to comment.