]> git.ipfire.org Git - thirdparty/apache/httpd.git/commitdiff
Fix occasional pytest failures
authorRainer Jung <rjung@apache.org>
Thu, 4 Apr 2024 22:48:03 +0000 (22:48 +0000)
committerRainer Jung <rjung@apache.org>
Thu, 4 Apr 2024 22:48:03 +0000 (22:48 +0000)
in modules/http2/test_800_websockets.py
(test_h2_800_04_non_ws_resource and
test_h2_800_09b_unsupported) due to
additional RST messages.

Backport of r1916808 from trunk.

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

test/modules/http2/test_800_websockets.py

index 5b46da8edbce9718207e605a42a8a42702678b57..9d6bf3a7cd731867446996ca5497ab1c098a4faa 100644 (file)
@@ -175,7 +175,7 @@ class TestWebSockets:
     def test_h2_800_04_non_ws_resource(self, env: H2TestEnv, ws_server):
         r, infos, frames = ws_run(env, path='/alive.json')
         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 to a URL path that sends a delayed HTTP response body
@@ -215,7 +215,7 @@ class TestWebSockets:
         r, infos, frames = ws_run(env, path='/ws/echo/',
                                   authority=f'test1.{env.http_tld}:{env.http_port}')
         assert r.exit_code == 0, f'{r}'
-        assert infos == ['[1] :status: 501', '[1] EOF'], f'{r}'
+        assert infos == ['[1] :status: 501', '[1] EOF'] or infos == ['[1] :status: 501', '[1] EOF', '[1] RST'], f'{r}'
 
     # CONNECT and exchange a PING
     def test_h2_800_10_ws_ping(self, env: H2TestEnv, ws_server):