mirror of
https://github.com/discourse/discourse.git
synced 2025-02-25 18:55:32 -06:00
DEV: Retry when Net::HTTP throws EOFError (#10921)
Might fix an inconsistent issue when running tests in CI.
This commit is contained in:
parent
5b2da4ab07
commit
caa58a4bd1
@ -86,7 +86,7 @@ task "qunit:test", [:timeout, :qunit_path] do |_, args|
|
|||||||
puts "Warming up Rails server"
|
puts "Warming up Rails server"
|
||||||
begin
|
begin
|
||||||
Net::HTTP.get(uri)
|
Net::HTTP.get(uri)
|
||||||
rescue Errno::ECONNREFUSED, Errno::EADDRNOTAVAIL, Net::ReadTimeout
|
rescue Errno::ECONNREFUSED, Errno::EADDRNOTAVAIL, Net::ReadTimeout, EOFError
|
||||||
sleep 1
|
sleep 1
|
||||||
retry unless elapsed() > 60
|
retry unless elapsed() > 60
|
||||||
puts "Timed out. Can not connect to forked server!"
|
puts "Timed out. Can not connect to forked server!"
|
||||||
|
Loading…
Reference in New Issue
Block a user