summaryrefslogtreecommitdiffstats
path: root/tests/auto/network
diff options
context:
space:
mode:
authorMårten Nordheim <marten.nordheim@qt.io>2023-10-06 13:36:00 +0200
committerMårten Nordheim <marten.nordheim@qt.io>2023-10-06 17:40:23 +0000
commit0c4b2779ff1c41bbcae33960313d764a91757596 (patch)
tree9d1a9bd32a70df2f90366987a42f06f48d1e9dfa /tests/auto/network
parent23996976cfe79e5f9845a09e26c177d14470c897 (diff)
tst_http2::redirect: reduce length of test
By fixing how many requests we are expecting to _finish_. Since the nRequests variable is only decreased once a request is finished, we only actually expect 1. No matter how many times it gets redirected. This was the slowest test-function in the test, clocking in at 10 seconds. Now it's sub 500ms. Pick-to: 6.6 6.5 Change-Id: I544360f0928466c1bc0fbc6806952ccec588d131 Reviewed-by: Timur Pocheptsov <timur.pocheptsov@qt.io>
Diffstat (limited to 'tests/auto/network')
-rw-r--r--tests/auto/network/access/http2/tst_http2.cpp3
1 files changed, 2 insertions, 1 deletions
diff --git a/tests/auto/network/access/http2/tst_http2.cpp b/tests/auto/network/access/http2/tst_http2.cpp
index 1b0c074a6e..bcb94ac439 100644
--- a/tests/auto/network/access/http2/tst_http2.cpp
+++ b/tests/auto/network/access/http2/tst_http2.cpp
@@ -1244,7 +1244,7 @@ void tst_Http2::redirect()
QVERIFY(serverPort != 0);
- nRequests = 1 + maxRedirects;
+ nRequests = 1;
auto originalUrl = requestUrl(defaultConnectionType());
auto url = originalUrl;
@@ -1272,6 +1272,7 @@ void tst_Http2::redirect()
runEventLoop();
STOP_ON_FAILURE
+ QCOMPARE(nRequests, 0);
if (success) {
QCOMPARE(reply->error(), QNetworkReply::NoError);
QCOMPARE(reply->url().toString(),