summaryrefslogtreecommitdiff
path: root/test
diff options
context:
space:
mode:
authorStefan Eissing <icing@apache.org>2022-04-14 11:37:30 +0000
committerStefan Eissing <icing@apache.org>2022-04-14 11:37:30 +0000
commit53bf99ea9a2746775ce1b9a85131dc05d00f4726 (patch)
treeaaa0c2051eaacb801ece674636ff1b3766face20 /test
parentb13978eddd1b975ec6fd581a88fc1f7519dabeb6 (diff)
downloadhttpd-53bf99ea9a2746775ce1b9a85131dc05d00f4726.tar.gz
*) test/core: using rate periods for creating new connections
over time. git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1899846 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'test')
-rw-r--r--test/modules/core/test_002_restarts.py20
1 files changed, 11 insertions, 9 deletions
diff --git a/test/modules/core/test_002_restarts.py b/test/modules/core/test_002_restarts.py
index 1f0ad43f3f..3b7f1e07ac 100644
--- a/test/modules/core/test_002_restarts.py
+++ b/test/modules/core/test_002_restarts.py
@@ -31,21 +31,23 @@ MaxConnectionsPerChild 0
assert env.apache_restart() == 0
def test_core_002_01(self, env):
- connections = 8
- n = connections * 10
+ clients = 6
+ total_requests = clients * 10
+ conn_per_client = 5
url = env.mkurl("https", "cgi", "/delay.py")
- args = [env.h2load, f"--connect-to=localhost:{env.https_port}", "--h1",
- "-n", str(n), "-c", str(connections),
+ args = [env.h2load, f"--connect-to=localhost:{env.https_port}",
+ "--h1", # use only http/1.1
+ "-n", str(total_requests), # total # of requests to make
+ "-c", str(conn_per_client * clients), # total # of connections to make
+ "-r", str(clients), # connections at a time
+ "--rate-period", "2", # create conns every 2 sec
url,
]
r = env.run(args)
assert 0 == r.exit_code
r = env.h2load_status(r)
assert r.results["h2load"]["requests"] == {
- "total": n, "started": n, "done": n, "succeeded": n
+ "total": total_requests, "started": total_requests,
+ "done": total_requests, "succeeded": total_requests
}, f"{r.stdout}"
- assert n == r.results["h2load"]["status"]["2xx"]
- assert 0 == r.results["h2load"]["status"]["3xx"]
- assert 0 == r.results["h2load"]["status"]["4xx"]
- assert 0 == r.results["h2load"]["status"]["5xx"]