diff --git a/spec/concurrent/atomic/cyclic_barrier_spec.rb b/spec/concurrent/atomic/cyclic_barrier_spec.rb index 3a2bb2426..8ed899d67 100644 --- a/spec/concurrent/atomic/cyclic_barrier_spec.rb +++ b/spec/concurrent/atomic/cyclic_barrier_spec.rb @@ -71,6 +71,7 @@ module Concurrent end start_latch.wait(1) + repeat_until_success { expect(barrier.number_waiting).to eq 1 } barrier.reset expect(barrier).not_to be_broken diff --git a/spec/concurrent/edge/erlang_actor_spec.rb b/spec/concurrent/edge/erlang_actor_spec.rb index ed94607dc..5ab7c4e48 100644 --- a/spec/concurrent/edge/erlang_actor_spec.rb +++ b/spec/concurrent/edge/erlang_actor_spec.rb @@ -918,7 +918,7 @@ end specify "timing out" do - skip('flaky on truffleruby') if Concurrent.on_truffleruby? + skip('flaky on truffleruby and jruby') if Concurrent.on_truffleruby? || Concurrent.on_jruby? count_down = Concurrent::CountDownLatch.new body = { on_thread: -> { m = receive; count_down.wait; reply m }, diff --git a/spec/spec_helper.rb b/spec/spec_helper.rb index 2a8fbc54a..d191183f6 100644 --- a/spec/spec_helper.rb +++ b/spec/spec_helper.rb @@ -53,7 +53,7 @@ def requires=(paths) config.after :each do while defined?(@created_threads) && @created_threads && (thread = (@created_threads.pop(true) rescue nil)) thread.kill - thread_join = thread.join(1.0) + thread_join = thread.join(10.0) expect(thread_join).not_to be_nil, thread.inspect end end