summaryrefslogtreecommitdiff
path: root/test/testunit/test_parallel.rb
diff options
context:
space:
mode:
authorsorah <sorah@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2011-06-15 23:06:00 +0000
committersorah <sorah@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2011-06-15 23:06:00 +0000
commitea11cf5d7f902609912652ad74586334638b4945 (patch)
treef74a879562d46e9fad06a21a0940fc9c5c89bd29 /test/testunit/test_parallel.rb
parent6e125382d7af727f70063a8f5e5959744865c193 (diff)
* 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
Diffstat (limited to 'test/testunit/test_parallel.rb')
-rw-r--r--test/testunit/test_parallel.rb11
1 files changed, 9 insertions, 2 deletions
diff --git a/test/testunit/test_parallel.rb b/test/testunit/test_parallel.rb
index 2f114bb..7a2e9ae 100644
--- a/test/testunit/test_parallel.rb
+++ b/test/testunit/test_parallel.rb
@@ -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