Bug #9767 ยป 0001-test-all-parallel-fails-if-a-test-is-skipped-after-r.patch
| lib/test/unit/parallel.rb | ||
|---|---|---|
|
end
|
||
|
def puke(klass, meth, e) # :nodoc:
|
||
|
if e.is_a?(MiniTest::Skip)
|
||
|
new_e = MiniTest::Skip.new(e.message)
|
||
|
new_e.set_backtrace(e.backtrace)
|
||
|
e = new_e
|
||
|
end
|
||
|
@partial_report << [klass.name, meth, e.is_a?(MiniTest::Assertion) ? e : ProxyError.new(e)]
|
||
|
super
|
||
|
end
|
||
| test/testunit/test_parallel.rb | ||
|---|---|---|
|
def test_done
|
||
|
timeout(10) do
|
||
|
@worker_in.puts "run #{TESTS}/ptest_forth.rb test"
|
||
|
6.times { @worker_out.gets }
|
||
|
7.times { @worker_out.gets }
|
||
|
buf = @worker_out.gets
|
||
|
assert_match(/^done (.+?)$/, buf)
|
||
| ... | ... | |
|
result = Marshal.load($1.chomp.unpack("m")[0])
|
||
|
assert_equal(4, result[0])
|
||
|
assert_equal(5, result[0])
|
||
|
assert_equal(2, result[1])
|
||
|
assert_kind_of(Array,result[2])
|
||
|
assert_kind_of(Array,result[3])
|
||
| ... | ... | |
|
assert_kind_of(Array,result[2][1])
|
||
|
assert_kind_of(MiniTest::Assertion,result[2][0][2])
|
||
|
assert_kind_of(MiniTest::Skip,result[2][1][2])
|
||
|
assert_kind_of(Exception, result[2][2][2])
|
||
|
assert_kind_of(MiniTest::Skip,result[2][2][2])
|
||
|
assert_kind_of(Exception, result[2][3][2])
|
||
|
assert_equal(result[5], "TestE")
|
||
|
end
|
||
|
end
|
||
| ... | ... | |
|
def test_should_run_all_without_any_leaks
|
||
|
spawn_runner
|
||
|
buf = timeout(10){@test_out.read}
|
||
|
assert_match(/^[SFE\.]{8}$/,buf)
|
||
|
assert_match(/^[SFE\.]{9}$/,buf)
|
||
|
end
|
||
|
def test_should_retry_failed_on_workers
|
||
| test/testunit/tests_for_parallel/ptest_forth.rb | ||
|---|---|---|
|
assert_equal(0,1)
|
||
|
end
|
||
|
def test_skip_after_unknown_error
|
||
|
begin
|
||
|
raise UnknownError, "unknown error"
|
||
|
rescue
|
||
|
skip "after raise"
|
||
|
end
|
||
|
end
|
||
|
def test_unknown_error
|
||
|
raise UnknownError, "unknown error"
|
||
|
end
|
||