mirror of
https://github.com/mastodon/mastodon.git
synced 2024-11-18 20:39:32 +00:00
Make request_pool_spec tests more robust (#28610)
This commit is contained in:
parent
1bc5a52139
commit
157fc69954
|
@ -33,14 +33,12 @@ describe RequestPool do
|
|||
|
||||
subject
|
||||
|
||||
threads = Array.new(3) do
|
||||
threads = Array.new(5) do
|
||||
Thread.new do
|
||||
2.times do
|
||||
subject.with('http://example.com') do |http_client|
|
||||
http_client.get('/').flush
|
||||
# Nudge scheduler to yield and exercise the full pool
|
||||
sleep(0)
|
||||
end
|
||||
subject.with('http://example.com') do |http_client|
|
||||
http_client.get('/').flush
|
||||
# Nudge scheduler to yield and exercise the full pool
|
||||
sleep(0.01)
|
||||
end
|
||||
end
|
||||
end
|
||||
|
|
Loading…
Reference in a new issue