提交 0ecb32c8 编写于 作者: A Aaron Patterson

make sure exceptions are marshalable when returning test results

this should fix the error where isolation tests raise an exception and
we just get a marshal error
上级 023aca27
......@@ -41,7 +41,23 @@ def run_in_isolation(&blk)
pid = fork do
read.close
yield
write.puts [Marshal.dump(self.dup)].pack("m")
begin
if error?
failures.map! { |e|
begin
Marshal.dump e
e
rescue TypeError
ex = Exception.new e.message
ex.set_backtrace e.backtrace
Minitest::UnexpectedError.new ex
end
}
end
result = Marshal.dump(self.dup)
end
write.puts [result].pack("m")
exit!
end
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册