Bug #6882

parallel test crashes when unknown exception is occured in a test

Added by Usaku NAKAMURA almost 3 years ago. Updated almost 3 years ago.

[ruby-dev:46054]
Status:Closed
Priority:Normal
Assignee:Usaku NAKAMURA
ruby -v:ruby 2.0.0dev (2012-08-16 trunk 36711) Backport:

Description

test-allを-j付きで実行していると、例えばrdocあたりがバグっていて
RDoc::Errorあたりでテストに失敗した場合、masterはRDoc::Errorという
例外を知らないわけですが、にもかかわらずMarshal.loadしようとするので
master自体がクラッシュしてしまいます。

worker側からは、masterが知ってる例外が何かを知る方法はおそらくないので、
全てのエラー時の例外を適当にラップして渡すか、そもそも例外をMashal.dump
するのをやめるか、のいずれかの方法しかないような気がします。

後者は大変めんどくさいのですが、前者はやってみたらできたのでパッチを
添付します。
実際のレポート表示に使われるメッセージは例外オブジェクトから組み立ててる
わけじゃなくてworker側のメッセージを利用してるようなので、この程度で問題
なさそうに見えます。

test.diff Magnifier (3.01 KB) Usaku NAKAMURA, 08/16/2012 04:54 PM


Related issues

Related to Ruby trunk - Bug #6897: With --no-retry option parallel test-all result Closed 08/20/2012

Associated revisions

Revision 36730
Added by Shota Fukumori almost 3 years ago

  • lib/test/unit.rb, lib/test/unit/parallel.rb: generate error message (String) in parallel.rb instead of marshalling Exception. Fixes [Bug #6882]

Revision 36730
Added by Shota Fukumori almost 3 years ago

  • lib/test/unit.rb, lib/test/unit/parallel.rb: generate error message (String) in parallel.rb instead of marshalling Exception. Fixes [Bug #6882]

Revision 36746
Added by Usaku NAKAMURA almost 3 years ago

  • test/testunit/tests_for_parallel/ptest_forth.rb: added a test case
    which causes an error.

  • test/testunit/test_parallel.rb: follow above change.
    see [Bug #6882]

Revision 36746
Added by Usaku NAKAMURA almost 3 years ago

  • test/testunit/tests_for_parallel/ptest_forth.rb: added a test case
    which causes an error.

  • test/testunit/test_parallel.rb: follow above change.
    see [Bug #6882]

Revision 36749
Added by Usaku NAKAMURA almost 3 years ago

  • 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]

Revision 36749
Added by Usaku NAKAMURA almost 3 years ago

  • 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]

Revision 38059
Added by Usaku NAKAMURA over 2 years ago

  • lib/test/unit/parallel.rb (Test::Unit::Worker.run): wrap LoadError because it's Gem::LoadError sometimes. see [Bug #6882]

Revision 38059
Added by Usaku NAKAMURA over 2 years ago

  • lib/test/unit/parallel.rb (Test::Unit::Worker.run): wrap LoadError because it's Gem::LoadError sometimes. see [Bug #6882]

History

#1 Updated by Shota Fukumori almost 3 years ago

  • Status changed from Assigned to Closed
  • % Done changed from 0 to 100

This issue was solved with changeset r36730.
Usaku, thank you for reporting this issue.
Your contribution to Ruby is greatly appreciated.
May Ruby be with you.


  • lib/test/unit.rb, lib/test/unit/parallel.rb: generate error message (String) in parallel.rb instead of marshalling Exception. Fixes [Bug #6882]

#2 Updated by Usaku NAKAMURA almost 3 years ago

  • Status changed from Closed to Assigned

これっぽっちも直ってないのでreopen

#3 Updated by Usaku NAKAMURA almost 3 years ago

  • Status changed from Assigned to Closed

This issue was solved with changeset r36746.
Usaku, thank you for reporting this issue.
Your contribution to Ruby is greatly appreciated.
May Ruby be with you.


  • test/testunit/tests_for_parallel/ptest_forth.rb: added a test case
    which causes an error.

  • test/testunit/test_parallel.rb: follow above change.
    see [Bug #6882]

#4 Updated by Shota Fukumori almost 3 years ago

  • Status changed from Closed to Assigned
  • Assignee changed from Shota Fukumori to Usaku NAKAMURA

sorry for late reply, go ahead.

#5 Updated by Usaku NAKAMURA almost 3 years ago

  • Status changed from Assigned to Closed

順序前後。もう入れました。

Also available in: Atom PDF