From: Rainer Jung Date: Thu, 9 Mar 2023 22:59:20 +0000 (+0000) Subject: Make test more robust, log might have a short delay. X-Git-Tag: 2.5.0-alpha2-ci-test-only~68 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=959bd494525598d9bd7670e211df6b771a2d4bbb;p=thirdparty%2Fapache%2Fhttpd.git Make test more robust, log might have a short delay. git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1908228 13f79535-47bb-0310-9956-ffa450edef68 --- diff --git a/test/modules/http2/test_004_post.py b/test/modules/http2/test_004_post.py index da1f96efa9d..16e9a0c9c93 100644 --- a/test/modules/http2/test_004_post.py +++ b/test/modules/http2/test_004_post.py @@ -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])