Skip to content

Commit

Permalink
Tidy up test.
Browse files Browse the repository at this point in the history
  • Loading branch information
ioquatix committed Aug 5, 2024
1 parent eeb6c41 commit 77c3e51
Showing 1 changed file with 5 additions and 7 deletions.
12 changes: 5 additions & 7 deletions test/async/pool/controller.rb
Original file line number Diff line number Diff line change
Expand Up @@ -273,21 +273,19 @@
expect(pool).not.to be(:active?)
end

it "warns if closing while a resource is acquired" do
it "waits for connection to be released" do
events = []

events << :acquire
resource = pool.acquire

child = Async do |task|
events << :acquire
resource = pool.acquire

sleep 0.1
task.yield

events << :release
pool.release(resource)
end

sleep 0.1

events << :close
pool.close
events << :closed
Expand Down

0 comments on commit 77c3e51

Please sign in to comment.