diff options
author | Timur Pocheptsov <timur.pocheptsov@qt.io> | 2019-09-10 09:04:17 +0200 |
---|---|---|
committer | Timur Pocheptsov <timur.pocheptsov@qt.io> | 2019-09-25 14:46:28 +0200 |
commit | 13e0a36626bd75e631dd9536e795a494432b1945 (patch) | |
tree | f3a427c5d8ca42c06aed6d23b84c722750329c85 /tests/benchmarks/network/access | |
parent | 3bf3964b3789a97c5baccb81c683725decd740c2 (diff) |
Retire SPDY protocol implementation (Qt6)
As it was superseded by HTTP/2. Bye, Speedy. Since it's Qt 6,
we also fix the attribute's enumerator to fit our coding
convention with HTTP2AllowedAttribute becoming Http2AllowedAttribute,
and the same for HTTP2WasUsedAttribute.
tst_qnetworkreply in 'benchmark' directory of qtbase/tests
was updated - we have the logic they tested in preConnectEncrypted
in tst_http2 now.
Manual qnetworkreply test was updated (instead of SPDY in NPN failure
we can use H2, the second test was deleted - again, auto-tested in
tst_http2).
Change-Id: I559c140c333ddf72664911c6e275b1d0d2b980a9
Task-number: QTBUG-78255
Reviewed-by: MÃ¥rten Nordheim <marten.nordheim@qt.io>
Diffstat (limited to 'tests/benchmarks/network/access')
-rw-r--r-- | tests/benchmarks/network/access/qnetworkreply/tst_qnetworkreply.cpp | 34 |
1 files changed, 3 insertions, 31 deletions
diff --git a/tests/benchmarks/network/access/qnetworkreply/tst_qnetworkreply.cpp b/tests/benchmarks/network/access/qnetworkreply/tst_qnetworkreply.cpp index c182ef7ebf..6dd7eaee6b 100644 --- a/tests/benchmarks/network/access/qnetworkreply/tst_qnetworkreply.cpp +++ b/tests/benchmarks/network/access/qnetworkreply/tst_qnetworkreply.cpp @@ -544,15 +544,10 @@ void tst_qnetworkreply::echoPerformance() void tst_qnetworkreply::preConnectEncrypted() { QFETCH(int, sleepTime); - QFETCH(QSslConfiguration, sslConfiguration); - bool spdyEnabled = !sslConfiguration.isNull(); - QString hostName = QLatin1String("www.google.com"); QNetworkAccessManager manager; QNetworkRequest request(QUrl("https://" + hostName)); - if (spdyEnabled) - request.setAttribute(QNetworkRequest::SpdyAllowedAttribute, true); // make sure we have a full request including // DNS lookup, TCP and SSL handshakes @@ -578,12 +573,7 @@ void tst_qnetworkreply::preConnectEncrypted() manager.clearAccessCache(); // now try to make the connection beforehand - if (spdyEnabled) { - request.setAttribute(QNetworkRequest::SpdyAllowedAttribute, true); - manager.connectToHostEncrypted(hostName, 443, sslConfiguration); - } else { - manager.connectToHostEncrypted(hostName); - } + manager.connectToHostEncrypted(hostName); QTestEventLoop::instance().enterLoopMSecs(sleepTime); // now make another request and hopefully use the existing connection @@ -591,8 +581,6 @@ void tst_qnetworkreply::preConnectEncrypted() QNetworkReply *preConnectReply = normalResult.first; QVERIFY(!QTestEventLoop::instance().timeout()); QVERIFY(preConnectReply->error() == QNetworkReply::NoError); - bool spdyWasUsed = preConnectReply->attribute(QNetworkRequest::SpdyWasUsedAttribute).toBool(); - QCOMPARE(spdyEnabled, spdyWasUsed); qint64 preConnectElapsed = preConnectResult.second; qDebug() << request.url().toString() << "full request:" << normalElapsed << "ms, pre-connect request:" << preConnectElapsed << "ms, difference:" @@ -605,27 +593,11 @@ void tst_qnetworkreply::preConnectEncrypted_data() { #ifndef QT_NO_OPENSSL QTest::addColumn<int>("sleepTime"); - QTest::addColumn<QSslConfiguration>("sslConfiguration"); - // start a new normal request after preconnecting is done - QTest::newRow("HTTPS-2secs") << 2000 << QSslConfiguration(); + QTest::newRow("HTTPS-2secs") << 2000; // start a new normal request while preconnecting is in-flight - QTest::newRow("HTTPS-100ms") << 100 << QSslConfiguration(); - - QSslConfiguration spdySslConf = QSslConfiguration::defaultConfiguration(); - QList<QByteArray> nextProtocols = QList<QByteArray>() - << QSslConfiguration::NextProtocolSpdy3_0 - << QSslConfiguration::NextProtocolHttp1_1; - spdySslConf.setAllowedNextProtocols(nextProtocols); - -#if defined(QT_BUILD_INTERNAL) && !defined(QT_NO_SSL) && OPENSSL_VERSION_NUMBER >= 0x1000100fL && !defined(OPENSSL_NO_TLSEXT) && !defined(OPENSSL_NO_NEXTPROTONEG) - // start a new SPDY request while preconnecting is done - QTest::newRow("SPDY-2secs") << 2000 << spdySslConf; - - // start a new SPDY request while preconnecting is in-flight - QTest::newRow("SPDY-100ms") << 100 << spdySslConf; -#endif // defined (QT_BUILD_INTERNAL) && !defined(QT_NO_SSL) ... + QTest::newRow("HTTPS-100ms") << 100; #endif // QT_NO_OPENSSL } |