Project

General

Profile

Actions

Bug #4466

closed

test_should_run_all_without_any_leaks somtimes fails

Added by nagachika (Tomoyuki Chikanaga) over 13 years ago. Updated over 13 years ago.

Status:
Closed
Target version:
ruby -v:
ruby 1.9.3dev (2011-03-04 trunk 31020) [i686-linux]
Backport:
[ruby-dev:43300]

Description

=begin
Linux 上で test/testunit/test_parallel.rb が時々以下の Failure になります。

  1. Failure:
    test_should_run_all_without_any_leaks(TestParallel::TestParallel) [/opt/ruby-trunk/src/ruby-trunk/test/testunit/test_parallel.rb:156]:
    Expected /^.+SF.+F.*$/ to match "Run options: -j t2\n\n# Running ptests:\n\n..SFF..\nRetrying...\n\n.SF.\n\n\n\nFinished ptests in 0.068964s, 101.5022 tests/s, 43.5010 assertions/s.\n\n 1) Skipped:\nptest_always_skip(TestE) [/opt/ruby-trunk/src/ruby-trunk/test/testunit/tests_for_parallel/test_forth.rb:10]:\nSkipped, no message given\n\n 2) Failure:\nptest_always_fail(TestE) [/opt/ruby-trunk/src/ruby-trunk/test/testunit/tests_for_parallel/test_forth.rb:14]:\n<0> expected but was\n<1>.\n\n7 tests, 3 assertions, 1 failures, 0 errors, 1 skips\n".

このテストが実行している子テストのテストケースの順番が入れ替わることがあるのに対応していないみたいです。
".SF" と "F" という塊があることを確認すれば良いのであれば以下のような変更でどうでしょうか。

Index: test/testunit/test_parallel.rb

--- test/testunit/test_parallel.rb (revision 31020)
+++ test/testunit/test_parallel.rb (working copy)
@@ -153,7 +153,7 @@
def test_should_run_all_without_any_leaks
spawn_runner
buf = timeout(10){@test_out.read}

  •  assert_match(/^\.+SF\.+F\.*$/,buf)
    
  •  assert_match(/^(\.+SF\.*F|\.*F\.*\.+SF)\.*$/,buf)
    

    end

    def test_should_retry_failed_on_workers

=end

Updated by sorah (Sorah Fukumori) over 13 years ago

  • Category changed from test to lib
  • Status changed from Open to Assigned

=begin
sora_hです。

なるほど。それコミットしてしまって良いです。

パッチを感謝します。 :)

--sora_h
=end

Updated by sorah (Sorah Fukumori) over 13 years ago

  • Status changed from Assigned to Closed

=begin
It seems fixed at r31023 (committed by nagachika).
Closing.
=end

Actions

Also available in: Atom PDF

Like0
Like0Like0