Skip to content

Commit

Permalink
Fix Timeout Errors when reading responses (puma#2746)
Browse files Browse the repository at this point in the history
  • Loading branch information
MSP-Greg authored and JuanitoFatas committed Sep 9, 2022
1 parent 0bc6739 commit 0e69a82
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 1 deletion.
2 changes: 2 additions & 0 deletions test/helpers/integration.rb
Original file line number Diff line number Diff line change
Expand Up @@ -165,6 +165,8 @@ def read_body(connection, time_out = 10)
sleep 0.01
end
end
rescue Timeout::Error
flunk "response read_body timeout error"
end

# gets worker pids from @server output
Expand Down
2 changes: 1 addition & 1 deletion test/test_integration_cluster.rb
Original file line number Diff line number Diff line change
Expand Up @@ -540,7 +540,7 @@ def thread_run_step(replies, delay, sleep_time, step, mutex, refused, unix: fals
begin
sleep delay
s = connect "sleep#{sleep_time}-#{step}", unix: unix
body = read_body(s)
body = read_body(s, 15)
if body[/\ASlept /]
mutex.synchronize { replies[step] = :success }
else
Expand Down

0 comments on commit 0e69a82

Please sign in to comment.