From 1008a0cdcb2a2939f406622e0e4b9c7446e1bdd3 Mon Sep 17 00:00:00 2001 From: "yuuji.yaginuma" Date: Fri, 22 Mar 2019 09:13:21 +0900 Subject: [PATCH] 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. --- Gemfile.lock | 4 ++-- railties/test/application/server_test.rb | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/Gemfile.lock b/Gemfile.lock index b35668b6b93c1..b3695f6c7db94 100644 --- a/Gemfile.lock +++ b/Gemfile.lock @@ -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 diff --git a/railties/test/application/server_test.rb b/railties/test/application/server_test.rb index f3a7e00a4db29..932e9cca4e1d6 100644 --- a/railties/test/application/server_test.rb +++ b/railties/test/application/server_test.rb @@ -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