-
Notifications
You must be signed in to change notification settings - Fork 1.3k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
CI: Some tests about signal handlers sometimes fail #4063
Comments
I'm not sure, but I remember this issue started after the following fix. |
I'm guessing that the issue is related to require 'bundler/inline'
gemfile do
source 'https://rubygems.org'
gem 'rr'
gem 'test-unit'
gem 'test-unit-rr'
end
class SampleTest < ::Test::Unit::TestCase
def test_a
dont_allow(mock!).foo
end
def test_b
ObjectSpace.each_object { |obj|
obj.class
}
end
end
However, if it applied require 'bundler/inline'
gemfile do
source 'https://rubygems.org'
gem 'rr'
gem 'test-unit'
gem 'test-unit-rr'
end
class SampleTest < ::Test::Unit::TestCase
def test_a
mock!.foo.never
end
def test_b
ObjectSpace.each_object {|obj|
obj.class
}
end
end
|
The reason this occurs only occasionally is probably because the object applied If the object is alived, looks for me it appears to be causing problems. |
@Watson1978 Thanks!! require 'bundler/inline'
gemfile do
source 'https://rubygems.org'
gem 'rr'
gem 'test-unit'
gem 'test-unit-rr'
end
class SampleTest < ::Test::Unit::TestCase
def test_a
dont_allow!.foo
end
def test_b
ObjectSpace.each_object do |obj|
obj.class
end
end
end $ ruby test.rb
Loaded suite test
Started
F
====================================================================================================================================================================
Failure: test_b(SampleTest):
Called 1 time.
Expected 0 times.
test.rb:16:in `block in test_b'
13:
14: def test_b
15: ObjectSpace.each_object do |obj|
=> 16: obj.class
17: end
18: end
19: end
test.rb:15:in `each_object'
test.rb:15:in `test_b'
====================================================================================================================================================================
Finished in 0.003105795 seconds.
--------------------------------------------------------------------------------------------------------------------------------------------------------------------
2 tests, 0 assertions, 1 failures, 0 errors, 0 pendings, 0 omissions, 0 notifications
50% passed
--------------------------------------------------------------------------------------------------------------------------------------------------------------------
643.96 tests/s, 0.00 assertions/s |
It appears that @Watson1978 Could you please send an issue to https://github.com/rr/rr? |
Maybe, I think |
Hmm, I'm concerned about this |
Describe the bug
test_cont_in_main_process_signal_handlers
andtest_cont_in_supervisor_signal_handler
ofSupervisorTest
sometimes fail.This is similar to 0d126de
To Reproduce
I can't reproduce this on my local yet.
In CI, sometimes these tests fail on Ubuntu.
Expected behavior
The tests always succeed.
Your Environment
Your Configuration
Your Error Log
Additional context
No response
The text was updated successfully, but these errors were encountered: