]> git.ipfire.org Git - thirdparty/apache/httpd.git/commitdiff
Make test more robust, log might have a short delay.
authorRainer Jung <rjung@apache.org>
Fri, 10 Mar 2023 09:12:58 +0000 (09:12 +0000)
committerRainer Jung <rjung@apache.org>
Fri, 10 Mar 2023 09:12:58 +0000 (09:12 +0000)
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/branches/2.4.x@1908244 13f79535-47bb-0310-9956-ffa450edef68

test/modules/http2/test_004_post.py

index 97f05e252f368ba0b7e181d7d1e2856866f734a7..44f31d2cd230c5bdeb0cb43119397c5e6b3defcd 100644 (file)
@@ -5,6 +5,7 @@ import json
 import os
 import re
 import sys
+import time
 
 import pytest
 
@@ -173,6 +174,8 @@ CustomLog logs/test_004_30 issue_203
         r = env.curl_get(url, 5, options=["--http2", "-H", "Range: bytes=0-{0}".format(chunk-1)])
         assert 206 == r.response["status"]
         assert chunk == len(r.response["body"].decode('utf-8'))
+        # Wait for log completeness
+        time.sleep(1)
         # now check what response lengths have actually been reported
         lines = open(logfile).readlines()
         log_h2_full = json.loads(lines[-3])