Skip to content

Commit

Permalink
Fix server restart test on Puma 3.12.1
Browse files Browse the repository at this point in the history
Since puma/puma#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.
  • Loading branch information
y-yagi committed Mar 22, 2019
1 parent b4079b1 commit 1008a0c
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
4 changes: 2 additions & 2 deletions Gemfile.lock
Expand Up @@ -347,8 +347,8 @@ GEM
powerpack (0.1.1)
psych (2.2.4)
public_suffix (3.0.2)
puma (3.11.4)
puma (3.11.4-java)
puma (3.12.1)
puma (3.12.1-java)
que (0.14.3)
qunit-selenium (0.0.4)
selenium-webdriver
Expand Down
4 changes: 2 additions & 2 deletions railties/test/application/server_test.rb
Expand Up @@ -44,13 +44,13 @@ def teardown
pid = nil

begin
pid = Process.spawn("#{app_path}/bin/rails server -P tmp/dummy.pid", in: slave, out: slave, err: slave)
pid = Process.spawn("#{app_path}/bin/rails server -b localhost -P tmp/dummy.pid", in: slave, out: slave, err: slave)
assert_output("Listening", master)

rails("restart")

assert_output("Restarting", master)
assert_output("Inherited", master)
assert_output("tcp://localhost:3000", master)
ensure
kill(pid) if pid
end
Expand Down

0 comments on commit 1008a0c

Please sign in to comment.