ruby-changes:24698
From: usa <ko1@a...>
Date: Tue, 21 Aug 2012 10:57:33 +0900 (JST)
Subject: [ruby-changes:24698] usa:r36749 (trunk): * test/unit/test.rb (Test::Unit::ProxyError): new exception class to
usa 2012-08-21 10:57:19 +0900 (Tue, 21 Aug 2012) New Revision: 36749 http://svn.ruby-lang.org/cgi-bin/viewvc.cgi?view=rev&revision=36749 Log: * test/unit/test.rb (Test::Unit::ProxyError): new exception class to wrap exceptions raised in workers in parallel test mode. * test/unit/parallel.rb (Test::Unit::Worker#puke): use above warpper exception. [Bug #6882] [ruby-dev:46054] Modified files: trunk/ChangeLog trunk/lib/test/unit/parallel.rb trunk/lib/test/unit.rb Index: ChangeLog =================================================================== --- ChangeLog (revision 36748) +++ ChangeLog (revision 36749) @@ -1,3 +1,12 @@ +Tue Aug 21 10:52:08 2012 NAKAMURA Usaku <usa@r...> + + * test/unit/test.rb (Test::Unit::ProxyError): new exception class to + wrap exceptions raised in workers in parallel test mode. + + * test/unit/parallel.rb (Test::Unit::Worker#puke): use above warpper + exception. + [Bug #6882] [ruby-dev:46054] + Tue Aug 21 10:40:06 2012 Koichi Sasada <ko1@a...> * test_continuation.rb (tracing_with_thread_set_trace_func): Index: lib/test/unit/parallel.rb =================================================================== --- lib/test/unit/parallel.rb (revision 36748) +++ lib/test/unit/parallel.rb (revision 36749) @@ -155,7 +155,7 @@ end def puke(klass, meth, e) - @partial_report << [klass.name, meth, e] + @partial_report << [klass.name, meth, e.is_a?(MiniTest::Assertion) ? e : ProxyError.new(e)] super end end Index: lib/test/unit.rb =================================================================== --- lib/test/unit.rb (revision 36748) +++ lib/test/unit.rb (revision 36749) @@ -824,6 +824,15 @@ new(*args).run end end + + class ProxyError < StandardError + def initialize(ex) + @message = ex.message + @backtrace = ex.backtrace + end + + attr_accessor :message, :backtrace + end end end -- ML: ruby-changes@q... Info: http://www.atdot.net/~ko1/quickml/