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>
This commit is contained in:
parent
23996976cf
commit
0c4b2779ff
@ -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(),
|
||||
|
Loading…
Reference in New Issue
Block a user