Skip to content

Commit

Permalink
Merge pull request #51148 from yahonda/increase_timeout_for_assert_ou…
Browse files Browse the repository at this point in the history
…tput_2

Increase assert_output timeout for `FullStackConsoleTest` and `ApplicationTests::ServerTest`
  • Loading branch information
yahonda committed Feb 21, 2024
2 parents be0661c + 790c9c5 commit 3528b9d
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 6 deletions.
2 changes: 1 addition & 1 deletion railties/test/application/console_test.rb
Original file line number Diff line number Diff line change
Expand Up @@ -121,7 +121,7 @@ def teardown
def write_prompt(command, expected_output = nil)
@primary.puts command
assert_output command, @primary
assert_output expected_output, @primary if expected_output
assert_output expected_output, @primary, 100 if expected_output
assert_output "> ", @primary
end

Expand Down
10 changes: 5 additions & 5 deletions railties/test/application/server_test.rb
Original file line number Diff line number Diff line change
Expand Up @@ -29,12 +29,12 @@ def teardown

Bundler.with_original_env do
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)
assert_output("Listening", primary, 100)

rails("restart")

assert_output("Restarting", primary)
assert_output("Listening", primary)
assert_output("Restarting", primary, 100)
assert_output("Listening", primary, 100)
ensure
kill(pid) if pid
end
Expand All @@ -59,8 +59,8 @@ def teardown

Bundler.with_original_env do
pid = Process.spawn("bin/rails server -b localhost", chdir: app_path, in: replica, out: primary, err: replica)
assert_output("Hello world", primary)
assert_output("Listening", primary)
assert_output("Hello world", primary, 100)
assert_output("Listening", primary, 100)
ensure
kill(pid) if pid
end
Expand Down

0 comments on commit 3528b9d

Please sign in to comment.