Skip to content

Commit 47cde7b

Browse files
committed
Test stabilization
1 parent 1ba4f88 commit 47cde7b

File tree

3 files changed

+3
-7
lines changed

3 files changed

+3
-7
lines changed

spec/concurrent/atomic/condition_spec.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -284,7 +284,7 @@ module Concurrent
284284
mutex.synchronize { subject.broadcast }
285285

286286
threads.each do |t|
287-
expect(t.join(0.1)).to eq t
287+
expect(t.join(5)).to eq t
288288
end
289289
end
290290
end

spec/concurrent/atomic/cyclic_barrier_spec.rb

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -37,11 +37,8 @@ module Concurrent
3737

3838
context 'with waiting threads' do
3939
it 'should be equal to the waiting threads count' do
40-
Thread.new { barrier.wait }
41-
Thread.new { barrier.wait }
42-
43-
sleep(0.1)
44-
40+
threads = [Thread.new { barrier.wait }, Thread.new { barrier.wait }]
41+
Thread.pass until threads.all? { |t| t.status == 'sleep' }
4542
expect(barrier.number_waiting).to eq 2
4643
end
4744
end

spec/concurrent/synchronized_object_spec.rb

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -120,7 +120,6 @@ def ns_initialize
120120
expect(subject.size).to eq 2
121121
expect(subject.members).to eq [:a, :b]
122122
expect(subject.each.to_a).to eq [[:a, 1], [:b, 'a']]
123-
expect(subject.inspect).to match /#<Concurrent::AB:0x[\da-f]+ (@a=1|@b="a"), (@a=1|@b="a")>/
124123
end
125124

126125
specify 'equality' do

0 commit comments

Comments
 (0)