Make request_pool_spec tests more robust (#28610)

pull/34029/head
Claire 1 year ago
parent bfc7c379b7
commit 3a1c880283

@ -33,14 +33,12 @@ describe RequestPool do
subject subject
threads = Array.new(3) do threads = Array.new(5) do
Thread.new do Thread.new do
2.times do subject.with('http://example.com') do |http_client|
subject.with('http://example.com') do |http_client| http_client.get('/').flush
http_client.get('/').flush # Nudge scheduler to yield and exercise the full pool
# Nudge scheduler to yield and exercise the full pool sleep(0.01)
sleep(0)
end
end end
end end
end end

Loading…
Cancel
Save