Fix Rinda test teardown for omitted tests
New test failures on MINGW appeared after c2e37c8ff7da395f33fae546d9ae9e2408fc9236. 1) Error: Rinda::TupleSpaceProxyTest#test_00_template: NoMethodError: undefined method `stop_service' for nil:NilClass D:/a/ruby/ruby/src/test/rinda/test_rinda.rb:516:in `teardown' 2) Error: Rinda::TupleSpaceProxyTest#test_ruby_talk_264062: NoMethodError: undefined method `stop_service' for nil:NilClass D:/a/ruby/ruby/src/test/rinda/test_rinda.rb:516:in `teardown' Teardown happens even when the test is omitted. See: https://github.com/ruby/ruby/runs/7058984522
This commit is contained in:
parent
d3d5ef0cca
commit
49d5921550
@ -497,6 +497,7 @@ class TupleSpaceProxyTest < Test::Unit::TestCase
|
|||||||
|
|
||||||
def setup
|
def setup
|
||||||
if RUBY_PLATFORM.match?(/mingw/) && ENV['MSYSTEM'] == 'UCRT64'
|
if RUBY_PLATFORM.match?(/mingw/) && ENV['MSYSTEM'] == 'UCRT64'
|
||||||
|
@omitted = true
|
||||||
omit 'This test seems to randomly hang on GitHub Actions MinGW UCRT64'
|
omit 'This test seems to randomly hang on GitHub Actions MinGW UCRT64'
|
||||||
end
|
end
|
||||||
super
|
super
|
||||||
@ -506,6 +507,9 @@ class TupleSpaceProxyTest < Test::Unit::TestCase
|
|||||||
@server = DRb.start_service("druby://localhost:0")
|
@server = DRb.start_service("druby://localhost:0")
|
||||||
end
|
end
|
||||||
def teardown
|
def teardown
|
||||||
|
return if @omitted
|
||||||
|
@omitted = false
|
||||||
|
|
||||||
# implementation-dependent
|
# implementation-dependent
|
||||||
@ts_base.instance_eval{
|
@ts_base.instance_eval{
|
||||||
if th = @keeper
|
if th = @keeper
|
||||||
|
Loading…
x
Reference in New Issue
Block a user