Skip to content

Commit

Permalink
test/http: decrease test runs from 20 to 3 to decrease test time
Browse files Browse the repository at this point in the history
  • Loading branch information
fAuernigg committed Nov 20, 2024
1 parent 760f1d3 commit b8b6f59
Showing 1 changed file with 8 additions and 8 deletions.
16 changes: 8 additions & 8 deletions test/http.c
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
enum large_body_test {
REQ_BODY_CHUNK_SIZE = 26 * 42,
REQ_BODY_SIZE = REQ_BODY_CHUNK_SIZE * 480 - 26,
REQ_HTTP_REQUESTS = 2
REQ_HTTP_REQUESTS = 3
};

enum {
Expand Down Expand Up @@ -514,6 +514,12 @@ static int test_http_loop_base(bool secure, const char *met, bool http_conn,
dconf.cache_ttl_max = 1800;
dconf.getaddrinfo = dnsc_getaddrinfo_enabled(dnsc);

if (dns_set_conf_test) {
err = dnsc_conf_set(dnsc, &dconf);
if (err)
goto out;
}

err = http_client_alloc(&cli, dnsc);
if (err)
goto out;
Expand Down Expand Up @@ -590,19 +596,13 @@ static int test_http_loop_base(bool secure, const char *met, bool http_conn,
sa_port(&srv),
t.cert_auth ? "auth/" : "");

for (i = 1; i <= 10*REQ_HTTP_REQUESTS; i++) {
for (i = 1; i <= REQ_HTTP_REQUESTS; i++) {
t.i_req_body = 0;

err = http_client_set_config(cli, &hconf);
if (err)
goto out;

if (dns_set_conf_test) {
err = dnsc_conf_set(dnsc, &dconf);
if (err)
goto out;
}

t.clen = put ? REQ_BODY_SIZE :
2 * strlen("abcdefghijklmnopqrstuvwxyz");

Expand Down

0 comments on commit b8b6f59

Please sign in to comment.