Project

General

Profile

Bug #6882

parallel test crashes when unknown exception is occured in a test

Added by usa (Usaku NAKAMURA) over 5 years ago. Updated about 5 years ago.

Status:
Closed
Priority:
Normal
Target version:
ruby -v:
ruby 2.0.0dev (2012-08-16 trunk 36711)
[ruby-dev:46054]

Description

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

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

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

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

Related issues

Related to Ruby trunk - Bug #6897: With --no-retry option parallel test-all resultClosed2012-08-20

Associated revisions

Revision 36730
Added by sorah (Sorah Fukumori) about 5 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 sorah (Sorah Fukumori) about 5 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 sorah (Sorah Fukumori) about 5 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 sorah (Sorah Fukumori) about 5 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 usa (Usaku NAKAMURA) about 5 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 usa (Usaku NAKAMURA) about 5 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 usa (Usaku NAKAMURA) about 5 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 usa (Usaku NAKAMURA) about 5 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 usa (Usaku NAKAMURA) about 5 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 usa (Usaku NAKAMURA) about 5 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 usa (Usaku NAKAMURA) about 5 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 usa (Usaku NAKAMURA) about 5 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 usa (Usaku NAKAMURA) almost 5 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 usa (Usaku NAKAMURA) almost 5 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 usa (Usaku NAKAMURA) almost 5 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 usa (Usaku NAKAMURA) almost 5 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 sorah (Sorah Fukumori) about 5 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 [ruby-dev:46059] Updated by usa (Usaku NAKAMURA) about 5 years ago

  • Status changed from Closed to Assigned

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

#3 Updated by usa (Usaku NAKAMURA) about 5 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 [ruby-dev:46062] Updated by sorah (Sorah Fukumori) about 5 years ago

  • Status changed from Closed to Assigned
  • Assignee changed from sorah (Sorah Fukumori) to usa (Usaku NAKAMURA)

sorry for late reply, go ahead.

#5 [ruby-dev:46063] Updated by usa (Usaku NAKAMURA) about 5 years ago

  • Status changed from Assigned to Closed

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

Also available in: Atom PDF