Open bbozo opened 8 years ago
Update, checking around the failing code, I noticed the part of the code that tests if fibers are broken so I tried the #around
mode and did:
DatabaseCleaner.clean_with(:truncation)
DatabaseCleaner.strategy = :transaction
class UnitTest < MiniTest::Spec
around do |tests|
DatabaseCleaner.cleaning(&tests)
end
end
now I get non-deterministic (on all tests, every time):
FiberError: double resume
/home/bbozo/.rvm/gems/ruby-2.2.4/gems/minitest-around-0.3.2/lib/minitest/around/spec.rb:23:in `resume'
/home/bbozo/.rvm/gems/ruby-2.2.4/gems/minitest-around-0.3.2/lib/minitest/around/spec.rb:23:in `block in around'
/home/bbozo/.rvm/gems/ruby-2.2.4/gems/minitest-around-0.3.2/lib/minitest/around/spec.rb:32:in `instance_exec'
/home/bbozo/.rvm/gems/ruby-2.2.4/gems/minitest-around-0.3.2/lib/minitest/around/spec.rb:32:in `block (2 levels) in after'
/home/bbozo/.rvm/gems/ruby-2.2.4/gems/minitest-around-0.3.2/lib/minitest/around/spec.rb:32:in `block (2 levels) in after'
/home/bbozo/.rvm/gems/ruby-2.2.4/gems/minitest-5.8.4/lib/minitest/test.rb:113:in `block (4 levels) in run'
/home/bbozo/.rvm/gems/ruby-2.2.4/gems/minitest-5.8.4/lib/minitest/test.rb:205:in `capture_exceptions'
/home/bbozo/.rvm/gems/ruby-2.2.4/gems/minitest-5.8.4/lib/minitest/test.rb:112:in `block (3 levels) in run'
/home/bbozo/.rvm/gems/ruby-2.2.4/gems/minitest-5.8.4/lib/minitest/test.rb:111:in `each'
/home/bbozo/.rvm/gems/ruby-2.2.4/gems/minitest-5.8.4/lib/minitest/test.rb:111:in `block (2 levels) in run'
/home/bbozo/.rvm/gems/ruby-2.2.4/gems/minitest-5.8.4/lib/minitest/test.rb:256:in `time_it'
/home/bbozo/.rvm/gems/ruby-2.2.4/gems/minitest-5.8.4/lib/minitest/test.rb:104:in `block in run'
/home/bbozo/.rvm/gems/ruby-2.2.4/gems/minitest-5.8.4/lib/minitest.rb:331:in `on_signal'
/home/bbozo/.rvm/gems/ruby-2.2.4/gems/minitest-5.8.4/lib/minitest/test.rb:276:in `with_info_handler'
/home/bbozo/.rvm/gems/ruby-2.2.4/gems/minitest-5.8.4/lib/minitest/test.rb:103:in `run'
/home/bbozo/.rvm/gems/ruby-2.2.4/gems/minitest-around-0.3.2/lib/minitest/around/unit.rb:11:in `run'
/home/bbozo/.rvm/gems/ruby-2.2.4/gems/minitest-5.8.4/lib/minitest.rb:778:in `run_one_method'
/home/bbozo/.rvm/gems/ruby-2.2.4/gems/minitest-5.8.4/lib/minitest/parallel.rb:32:in `block (2 levels) in start'
It fails non-deterministically, line 46 in
test_helpers.rb
is:this is going in unit tests, so no parallel thread wacky stuff going on like with the integration tests. I'm using
database_cleaner (1.5.3)
, let me know if I can assist more