Skip to content

Commit

Permalink
test_integration.erb - fix intermittent test (#1924)
Browse files Browse the repository at this point in the history
Fixes test_sigterm_closes_listeners_on_forked_servers

When the test was added in PR #1802, it used the rackup/1second.ru file, which provided a fixed one second delay.

PR #1903 removed the 1second.ru file and added a sleep.ru file, which allowed variable timing.  But, the 'sleep1' path was added to only one of the test's two connect calls.

The test has passed most of the time, but intermittently fails.  This adds the 1 second delay to the 2nd connect call, which should make it stable.
  • Loading branch information
MSP-Greg authored and nateberkopec committed Sep 5, 2019
1 parent 9efac9e commit ce45845
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion test/test_integration.rb
Original file line number Diff line number Diff line change
Expand Up @@ -267,7 +267,7 @@ def test_sigterm_closes_listeners_on_forked_servers
mutex.synchronize { condition_variable.wait(mutex, 1.5) }

begin
s = connect
s = connect "sleep1"
read_body(s)
next_replies << :success
rescue Errno::ECONNRESET
Expand Down

0 comments on commit ce45845

Please sign in to comment.