Project

General

Profile

Actions

Bug #6882

closed

parallel test crashes when unknown exception is occured in a test

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

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

Description

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

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

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


Files

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

Related issues 1 (0 open1 closed)

Related to Ruby master - Bug #6897: With --no-retry option parallel test-all resultClosedsorah (Sorah Fukumori)08/20/2012Actions
Actions #1

Updated by sorah (Sorah Fukumori) about 12 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] [ruby-dev:46054]

Updated by usa (Usaku NAKAMURA) about 12 years ago

  • Status changed from Closed to Assigned

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

Actions #3

Updated by usa (Usaku NAKAMURA) about 12 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]

Updated by sorah (Sorah Fukumori) about 12 years ago

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

sorry for late reply, go ahead.

Updated by usa (Usaku NAKAMURA) about 12 years ago

  • Status changed from Assigned to Closed

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

Actions

Also available in: Atom PDF

Like0
Like0Like0Like0Like0Like0