1
0
Fork 0
mirror of https://github.com/ruby/ruby.git synced 2022-11-09 12:17:21 -05:00

* test/testunit/test_parallel.rb(test_ignore_tzero): Test for r32109.

* test/testunit/tests_for_parallel/test_third.rb: Use another way to
  detect that test is running on worker. This fixes sometimes
  TestParallel failing.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@32110 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
sorah 2011-06-15 23:06:00 +00:00
parent 6e125382d7
commit ea11cf5d7f
3 changed files with 18 additions and 3 deletions

View file

@ -1,3 +1,11 @@
Thu Jun 16 07:58:01 2011 Shota Fukumori <sorah@tubusu.net>
* test/testunit/test_parallel.rb(test_ignore_tzero): Test for r32109.
* test/testunit/tests_for_parallel/test_third.rb: Use another way to
detect that test is running on worker. This fixes sometimes
TestParallel failing.
Thu Jun 16 07:20:06 2011 Shota Fukumori <sorah@tubusu.net>
* lib/test/unit.rb(Test::Unit::Runner#_run_parallel): Ignore -j0

View file

@ -140,8 +140,15 @@ module TestParallel
end
end
#def test_childs
#end
def test_ignore_jzero
@test_out, o = IO.pipe
@test_pid = spawn(*@options[:ruby], TESTS+"/runner.rb",
"-j","0", out: File::NULL, err: o)
o.close
timeout(10) {
assert_match(/Error: parameter of -j option should be greater than 0/,@test_out.read)
}
end
def test_should_run_all_without_any_leaks
spawn_runner

View file

@ -3,7 +3,7 @@ require_relative "misc.rb"
class TestD < TestCaseForParallelTest
def ptest_fail_at_worker
if MiniTest::Unit.output != STDOUT
if /test\/unit\/parallel\.rb/ =~ $0
assert_equal(0,1)
end
end