1
0
Fork 0
mirror of https://github.com/rails/rails.git synced 2022-11-09 12:12:34 -05:00

Fix server restart test on Puma 3.12.1

Since https://github.com/puma/puma/pull/1700, the default host is
correctly used. So `localhost` is used instead of `0.0.0.0`.

As a result, the log output on restart is changed, and the restart test
fails on Puma 3.12.1.
https://travis-ci.org/rails/rails/jobs/509239592#L2303-L2305

Specify binding explicitly to avoid being affected by Puma changes.
This commit is contained in:
yuuji.yaginuma 2019-03-22 07:49:38 +09:00
parent 382a9563a3
commit efb706daad
2 changed files with 4 additions and 4 deletions

View file

@ -356,8 +356,8 @@ GEM
powerpack (0.1.2)
psych (3.0.3)
public_suffix (3.0.3)
puma (3.12.0)
puma (3.12.0-java)
puma (3.12.1)
puma (3.12.1-java)
que (0.14.3)
qunit-selenium (0.0.4)
selenium-webdriver

View file

@ -30,13 +30,13 @@ module ApplicationTests
pid = nil
Bundler.with_original_env do
pid = Process.spawn("bin/rails server -P tmp/dummy.pid", chdir: app_path, in: replica, out: replica, err: replica)
pid = Process.spawn("bin/rails server -b localhost -P tmp/dummy.pid", chdir: app_path, in: replica, out: replica, err: replica)
assert_output("Listening", primary)
rails("restart")
assert_output("Restarting", primary)
assert_output("Inherited", primary)
assert_output("tcp://localhost:3000", primary)
ensure
kill(pid) if pid
end