summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorStefan Eissing <icing@apache.org>2023-05-02 11:12:25 +0000
committerStefan Eissing <icing@apache.org>2023-05-02 11:12:25 +0000
commit705cec61bee1d1bddd7f80a315861608d3476d74 (patch)
tree672853917a9998f3ee6bef592b7cadbcbdc922dd
parent67a0bc26e5253a1858a1b632fd0dbcd9c59d93ac (diff)
downloadhttpd-705cec61bee1d1bddd7f80a315861608d3476d74.tar.gz
tests, make test_h2_106_02 more robust
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1909567 13f79535-47bb-0310-9956-ffa450edef68
-rw-r--r--test/modules/http2/test_106_shutdown.py14
1 files changed, 10 insertions, 4 deletions
diff --git a/test/modules/http2/test_106_shutdown.py b/test/modules/http2/test_106_shutdown.py
index b119292b72..4d0efaae7c 100644
--- a/test/modules/http2/test_106_shutdown.py
+++ b/test/modules/http2/test_106_shutdown.py
@@ -63,7 +63,13 @@ class TestShutdown:
assert env.apache_restart() == 0
url = env.mkurl("https", "test1", "/index.html")
for i in range(7):
- r = env.curl_get(url, options=['-vvv'])
- assert r.exit_code == 0, f"failed on {i}. request: {r.stdout} {r.stderr}"
- assert r.response["status"] == 200
- assert "HTTP/2" == r.response["protocol"] \ No newline at end of file
+ r = env.curl_get(url, options=['-v'])
+ # requests should succeed, but rarely connections get closed
+ # before the response is received
+ if r.exit_code == 55:
+ # curl send error
+ assert r.response is None
+ else:
+ assert r.exit_code == 0, f"failed on {i}. request: {r.stdout} {r.stderr}"
+ assert r.response["status"] == 200
+ assert "HTTP/2" == r.response["protocol"] \ No newline at end of file