Skip to content

Commit

Permalink
Remove time check in connection pool spec
Browse files Browse the repository at this point in the history
There isn't any sleeps involved here to check for concurrent vs
sequential operation, so there is no reason to check for time
elapsed.  I've seen this spec fail for old Ruby versions during
high concurrent load (parallel testing) due to this, and it seems
best to remove the check.
  • Loading branch information
jeremyevans committed May 30, 2023
1 parent 7b4b30e commit 748c989
Showing 1 changed file with 0 additions and 2 deletions.
2 changes: 0 additions & 2 deletions spec/core/connection_pool_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -365,7 +365,6 @@ def pool._acquire(*)
@pool.disconnect
b = @icpp

time = Time.now
cc = {}
threads = []
results = []
Expand All @@ -387,7 +386,6 @@ def pool._acquire(*)
5.times{|i| q.pop}
results.sort.must_equal (1..5).to_a
threads.each(&:join)
(Time.now - time).must_be :<, 0.75

threads.each{|t| t.wont_be :alive?}
cc.size.must_equal 5
Expand Down

0 comments on commit 748c989

Please sign in to comment.