DEV: allow qunit:test to run concurrently

Previously we were fighting on pid file which makes it hard to run multiple
This commit is contained in:
Sam Saffron 2020-08-05 16:57:12 +10:00
parent ee10002e20
commit e8328968bb
No known key found for this signature in database
GPG Key ID: B9606168D2FFD9F5
1 changed files with 2 additions and 2 deletions

View File

@ -47,7 +47,7 @@ task "qunit:test", [:timeout, :qunit_path] do |_, args|
{
"RAILS_ENV" => "test",
"SKIP_ENFORCE_HOSTNAME" => "1",
"UNICORN_PID_PATH" => "#{Rails.root}/tmp/pids/unicorn_test.pid", # So this can run alongside development
"UNICORN_PID_PATH" => "#{Rails.root}/tmp/pids/unicorn_test_#{port}.pid", # So this can run alongside development
"UNICORN_PORT" => port.to_s,
"UNICORN_SIDEKIQS" => "0"
},
@ -89,7 +89,7 @@ task "qunit:test", [:timeout, :qunit_path] do |_, args|
rescue Errno::ECONNREFUSED, Errno::EADDRNOTAVAIL, Net::ReadTimeout
sleep 1
retry unless elapsed() > 60
puts "Timed out. Can no connect to forked server!"
puts "Timed out. Can not connect to forked server!"
exit 1
end
puts "Rails server is warmed up"