Fix test to read output locale independent
authorDaniel Leidert <daniel.leidert@wgdd.de>
Thu, 6 Feb 2020 10:24:24 +0000 (11:24 +0100)
committerPeter Michael Green <plugwash@raspbian.org>
Thu, 13 Feb 2025 15:24:52 +0000 (15:24 +0000)
The test fails if run in a non-English environment.

Forwarded: https://github.com/puma/puma/issues/2149

Gbp-Pq: Name 0013-fix-test-term-not-accepts-new-connections.patch

test/test_integration_single.rb

index aa71c013b08f6a513dfc107fcda22a2c7dc6f657..d44562cf9134602d6bd014f21f28032f8c298e1f 100644 (file)
@@ -121,7 +121,7 @@ class TestIntegrationSingle < TestIntegration
     assert wait_for_server_to_include('Gracefully stopping') # wait for server to begin graceful shutdown
 
     # Invoke a request which must be rejected
-    _stdin, _stdout, rejected_curl_stderr, rejected_curl_wait_thread = Open3.popen3("curl #{HOST}:#{@tcp_port}")
+    _stdin, _stdout, rejected_curl_stderr, rejected_curl_wait_thread = Open3.popen3({ "LC_ALL" => "C" }, "curl http://#{HOST}:#{@tcp_port}")
 
     assert nil != Process.getpgid(@server.pid) # ensure server is still running
     assert nil != Process.getpgid(curl_wait_thread[:pid]) # ensure first curl invocation still in progress