DEV: Retry when Net::HTTP throws EOFError (#10921)

Might fix an inconsistent issue when running tests in CI.
This commit is contained in:
Penar Musaraj 2020-10-14 11:55:26 -04:00 committed by GitHub
parent 5b2da4ab07
commit caa58a4bd1
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 1 additions and 1 deletions

View File

@ -86,7 +86,7 @@ task "qunit:test", [:timeout, :qunit_path] do |_, args|
puts "Warming up Rails server"
begin
Net::HTTP.get(uri)
rescue Errno::ECONNREFUSED, Errno::EADDRNOTAVAIL, Net::ReadTimeout
rescue Errno::ECONNREFUSED, Errno::EADDRNOTAVAIL, Net::ReadTimeout, EOFError
sleep 1
retry unless elapsed() > 60
puts "Timed out. Can not connect to forked server!"