]> git.ipfire.org Git - thirdparty/apache/httpd.git/commitdiff
Fix occasional pytest failures
authorRainer Jung <rjung@apache.org>
Sat, 6 Apr 2024 10:28:21 +0000 (10:28 +0000)
committerRainer Jung <rjung@apache.org>
Sat, 6 Apr 2024 10:28:21 +0000 (10:28 +0000)
in modules/http2/test_800_websockets.py
(test_h2_800_03_not_found and
test_h2_800_05_non_ws_delay_resource) due to
additional RST messages.

Backport of r1916830 from trunk.

git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/branches/2.4.x@1916831 13f79535-47bb-0310-9956-ffa450edef68

test/modules/http2/test_800_websockets.py

index 9d6bf3a7cd731867446996ca5497ab1c098a4faa..52af1a3ae139b83bf2fbf0bc1d0e1b8244f488a3 100644 (file)
@@ -168,7 +168,7 @@ class TestWebSockets:
     def test_h2_800_03_not_found(self, env: H2TestEnv, ws_server):
         r, infos, frames = ws_run(env, path='/does-not-exist')
         assert r.exit_code == 0, f'{r}'
-        assert infos == ['[1] :status: 404', '[1] EOF'], f'{r}'
+        assert infos == ['[1] :status: 404', '[1] EOF'] or infos == ['[1] :status: 404', '[1] EOF', '[1] RST'], f'{r}'
 
     # CONNECT to a URL path that is a normal HTTP file resource
     # we do not want to receive the body of that
@@ -183,7 +183,7 @@ class TestWebSockets:
     def test_h2_800_05_non_ws_delay_resource(self, env: H2TestEnv, ws_server):
         r, infos, frames = ws_run(env, path='/h2test/error?body_delay=100ms')
         assert r.exit_code == 0, f'{r}'
-        assert infos == ['[1] :status: 502', '[1] EOF'], f'{r}'
+        assert infos == ['[1] :status: 502', '[1] EOF'] or infos == ['[1] :status: 502', '[1] EOF', '[1] RST'], f'{r}'
         assert frames == b''
 
     # CONNECT missing the sec-webSocket-version header