Skip to content
This repository has been archived by the owner on Jan 15, 2024. It is now read-only.

Commit

Permalink
fix pool_spec
Browse files Browse the repository at this point in the history
  • Loading branch information
arthurnn committed Sep 27, 2013
1 parent 0c6c261 commit d886831
Showing 1 changed file with 7 additions and 3 deletions.
10 changes: 7 additions & 3 deletions spec/moped/connection/pool_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -174,22 +174,26 @@

context "when reaping does not free any new connections" do

let!(:thread_one) do
let(:thread_one) do
Thread.new do
pool.checkout
sleep(3)
end
end

let!(:thread_two) do
let(:thread_two) do
Thread.new do
pool.checkout
sleep(1)
pool.checkout
sleep(3)
end
end

before do
thread_one
end

after do
thread_one.join
end

Expand Down

0 comments on commit d886831

Please sign in to comment.