Make request_pool_spec tests more robust (#28610)
Some checks failed
Ruby Linting / lint (push) Has been cancelled
YML Linting / lint (push) Has been cancelled
Test one step migrations / pre_job (push) Has been cancelled
Test two step migrations / pre_job (push) Has been cancelled
Ruby Testing / build (production) (push) Has been cancelled
Ruby Testing / build (test) (push) Has been cancelled
Test one step migrations / test (14-alpine) (push) Has been cancelled
Test one step migrations / test (15-alpine) (push) Has been cancelled
Test two step migrations / test (14-alpine) (push) Has been cancelled
Test two step migrations / test (15-alpine) (push) Has been cancelled
Ruby Testing / test (1, .ruby-version) (push) Has been cancelled
Ruby Testing / test (1, 3.1) (push) Has been cancelled
Ruby Testing / test (1, 3.3) (push) Has been cancelled
Ruby Testing / test (2, .ruby-version) (push) Has been cancelled
Ruby Testing / test (2, 3.1) (push) Has been cancelled
Ruby Testing / test (2, 3.3) (push) Has been cancelled
Ruby Testing / test (3, .ruby-version) (push) Has been cancelled
Ruby Testing / test (3, 3.1) (push) Has been cancelled
Ruby Testing / test (3, 3.3) (push) Has been cancelled
Ruby Testing / test (4, .ruby-version) (push) Has been cancelled
Ruby Testing / test (4, 3.1) (push) Has been cancelled
Ruby Testing / test (4, 3.3) (push) Has been cancelled
Ruby Testing / End to End testing (.ruby-version) (push) Has been cancelled
Ruby Testing / End to End testing (3.1) (push) Has been cancelled
Ruby Testing / End to End testing (3.3) (push) Has been cancelled
Ruby Testing / Testing search (.ruby-version) (push) Has been cancelled
Ruby Testing / Testing search (3.1) (push) Has been cancelled
Ruby Testing / Testing search (3.3) (push) Has been cancelled

This commit is contained in:
Claire 2024-01-08 13:29:05 +01:00
parent b0ef64243d
commit bd78330a24

View File

@ -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