summaryrefslogtreecommitdiffstats
path: root/tests/auto/network/access/qnetworkreply
Commit message (Collapse)AuthorAgeFilesLines
...
* tst_QNetworkReply try stabilize autoDeleteReplies testsMårten Nordheim2022-04-291-2/+6
| | | | | | | | | | | | | | | | | | The http test data hasn't always been stable but for some reason it fails far more than usual. Originally the domain was a non-existing one, because it would then work on any machine (even if not in CI) and would finish() (with error) after failing to look up the domain in DNS. However, some machines in CI, for some reason, take too long to do this and end up failing the test. So, we change the URL to point to the network server in CI. This should, at the very least, finish quickly when running in CI. Pick-to: 6.3 6.2 5.15 Fixes: QTBUG-102952 Change-Id: I3b3f6fa23acf78fefdb69ff9ae7722f15e5f1736 Reviewed-by: Timur Pocheptsov <timur.pocheptsov@qt.io>
* QHttp: Fix handling of redirect loaded from cacheMårten Nordheim2022-04-271-0/+59
| | | | | | | | | | | | | | | In some situations when loading a redirect from cache which would lead to a real request we would not emit the finished() signal because the replyFinished function has a pre-condition that the response did not originate from the cache. However, after the initial redirect was loaded from the cache we never unset the 'loadingFromCache' boolean, so it was still true after the request had been made to the real target. Pick-to: 6.2 6.3 5.15 Change-Id: I015a2ebae4af4bd17392182c3951e875a7b353c4 Reviewed-by: Edward Welbourne <edward.welbourne@qt.io> Reviewed-by: Timur Pocheptsov <timur.pocheptsov@qt.io>
* QNetworkReply: update decompress error message and handlingMårten Nordheim2022-04-271-1/+34
| | | | | | | | | | | The error message was quite vague since it would then not require any additional translations. However, in hindsight this was a mistake since now developers just thought their downloads were being corrupted. Pick-to: 6.2 6.3 Fixes: QTBUG-101942 Change-Id: Ie9af42510ca027d15248e5bcf21e836e709898d9 Reviewed-by: Timur Pocheptsov <timur.pocheptsov@qt.io>
* Replace uses of _qs with _s in testsSona Kurazyan2022-04-071-4/+6
| | | | | | Task-number: QTBUG-101408 Change-Id: If092a68828a1e8056259cf90d035d9a87989244b Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
* Tests: Do not depend on transitive includesFabian Kosmale2022-03-171-0/+2
| | | | | Change-Id: Ibc6a948480a904913a5427e6408d4d296784fb4f Reviewed-by: Sona Kurazyan <sona.kurazyan@qt.io>
* Deprecate {QString, QByteArray}::count()Sona Kurazyan2022-03-121-9/+9
| | | | | | | | | | | | And remove their uses. [ChangeLog][QtCore][Deprecation Notice] Deprecated QString::count() and QByteArray::count() that take no parameters, to avoid confusion with the algorithm overloads of the same name. They can be replaced by size() or length() methods. Change-Id: I6541e3235ab58cf750d89568d66d3b1d9bbd4a04 Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* QHttp: Move the emission of requestSentMårten Nordheim2022-02-181-7/+22
| | | | | | | | | | | Moved to after the header is actually written, not just generated. For requests with data (put/post) we may have to wait for a callback before the data to write is available. Since we then delay writing the header as well it would be disingenuous to emit requestSent(). Pick-to: 6.3 Change-Id: I76c2d40ca48faaa1f6730ce8b3d5a8a4c3156f8f Reviewed-by: Timur Pocheptsov <timur.pocheptsov@qt.io>
* QAbstractSocket: Don't pretend pause and resume is a stackMårten Nordheim2022-02-091-2/+0
| | | | | | | | | | | | | | | | It only stores one layer of state, and pausing twice in a row will just overwrite the previous state. This doesn't happen often but can happen, especially on Windows if a certificate needs to be looked up in the system certificate stores (socket gets paused) and then a recoverable error occurs in QNAM (socket gets paused again). Fixes: QTBUG-100362 Fixes: QTBUG-63196 Fixes: QTBUG-98476 Pick-to: 6.3 6.2 5.15 Change-Id: Ie524c48e11b6fa8010b78cc1bf3931efe2ce3351 Reviewed-by: Edward Welbourne <edward.welbourne@qt.io> Reviewed-by: Timur Pocheptsov <timur.pocheptsov@qt.io>
* Blacklist putWithServerClosingConnectionImmediately on WindowsFabian Kosmale2022-02-021-0/+2
| | | | | | | Task-number: QTBUG-100362 Change-Id: Ib09aec5ea03867163d476a2c92562bc949fc1b1a Reviewed-by: André de la Rocha <andre.rocha@qt.io> Reviewed-by: Mårten Nordheim <marten.nordheim@qt.io>
* QNetworkReply: rename socketConnecting to socketStartedConnectingMårten Nordheim2022-01-311-2/+2
| | | | | | | | | From the API review. Pick-to: 6.3 Change-Id: Ic05737db79327e7811fcd974a70914b837e06601 Reviewed-by: Timur Pocheptsov <timur.pocheptsov@qt.io> Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
* Remove unused .qrc filesJoerg Bornemann2022-01-171-5/+0
| | | | | | | | Task-number: QTBUG-94446 Change-Id: I136d8b4ab070a832866aa50b5701fc6bd863df8a Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org> Reviewed-by: Alexey Edelev <alexey.edelev@qt.io> Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
* Silence compiler warning from int/size_t mismatchVolker Hilsheimer2021-10-071-1/+1
| | | | | | | Amends 4757b93b0ef149a3564582a45589f731755c4236. Change-Id: I678785cd61dbdecb3b1e7e68c7daf9f18cad4d02 Reviewed-by: Mårten Nordheim <marten.nordheim@qt.io>
* Compile autotests for IntegrityTatiana Borisova2021-09-201-0/+6
| | | | | | | | | - process environment/DNS are OFF for INTEGRITY Task-number: QTBUG-96176 Pick-to: 6.2 Change-Id: I189a97f88c96a428586c31a66b8d250e04482900 Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
* tst_QNetworkReply: Remove and suppress one debug messageMårten Nordheim2021-09-011-1/+4
| | | | | | | | | There's not much context to the URLs being printed, so remove the message. And suppress the message coming from the MiniHttpServer Change-Id: Ie2025ac717657ed0f2f0163bd0af22e12a49b30f Reviewed-by: Edward Welbourne <edward.welbourne@qt.io> Reviewed-by: Timur Pocheptsov <timur.pocheptsov@qt.io>
* Test QNetworkAccessCache insertions with varying expiry timesMårten Nordheim2021-09-011-0/+106
| | | | | | | | | The insertions are sorted by when they expire. So, we test the various orders to insert entries. Fixes: QTBUG-95959 Change-Id: I1e8d7f4c77dce5eae3d4bfa5101f296c3eea1961 Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
* QNAM: Allow to configure when connections to a host are torn downMarkus Goetz2021-07-271-0/+52
| | | | | | | | | | | | This introduces a new attribute that allows behavior to keep the TCP connection(s) to a HTTP1/HTTP2 host longer or shorter than the default of 120 seconds. Note that the server might still close the connection earlier. Fixes: QTBUG-20726 Fixes: QTBUG-91440 Change-Id: I7da64230a78c642c12c0ddbe6b678cf17c3aafde Reviewed-by: Mårten Nordheim <marten.nordheim@qt.io>
* QLocalSocket/Win: do not close the device on disconnectFromServer()Alex Trotsenko2021-07-241-4/+0
| | | | | | | | | | | | | It's the user's privilege to do so when they want to finish reading the QIODevice. Moreover, this is the only difference between close() and disconnectFromServer(). [ChangeLog][QtNetwork][Important Behavior Changes] The Windows implementation of QLocalSocket::disconnectFromServer() no longer calls close(), which is consistent with the behavior on Unix. Change-Id: Ie9ce20c60259a2b08f5254b719355bd7be9b17cd Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@gmx.de>
* QNetworkReply: Add two new signalsMarkus Goetz2021-07-201-0/+55
| | | | | | | | | | | These signals allow monitoring where in the HTTP1/HTTP2 flow a request is currently in. Fixes: QTBUG-71698 Fixes: QTBUG-18766 Change-Id: Icc2fe435afc9f680fa7a76c32731e25fcdfeb4b4 Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org> Reviewed-by: Mårten Nordheim <marten.nordheim@qt.io>
* QNetworkRequest: Rename (set)minimumArchiveBombSizeMårten Nordheim2021-07-021-2/+2
| | | | | | | | | To (set)decompressedSafetyCheckThreshold, as suggested on the API review. Task-number: QTBUG-94407 Change-Id: Iffc52691022939ae46703de8a0416355487b716f Reviewed-by: Timur Pocheptsov <timur.pocheptsov@qt.io> Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
* Fix compiler warning from unused parameterVolker Hilsheimer2021-06-231-1/+1
| | | | | Change-Id: I227b7188eddbad024dcced908c894925cee56591 Reviewed-by: Mårten Nordheim <marten.nordheim@qt.io>
* Prefer QFAIL("Informative message") over QVERIFY(false)Edward Welbourne2021-06-141-3/+2
| | | | | Change-Id: I706b0aedfa870452331a8c2c488d55b279ee452a Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* QNetworkReply: Decompress when readingMårten Nordheim2021-06-125-3/+1515
| | | | | | | | | | | Rather than when the data is received. Source compatibility is achieved through double-decompressing the data. This lets us know how many bytes are available just as before but without having the uncompressed data left in memory. Fixes: QTBUG-83269 Change-Id: I352bd09581614c582e4628243e2a0e895ba4946b Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
* tst_QNetworkReply::ignoreSslErrorsList, use the right errorTimur Pocheptsov2021-06-081-10/+8
| | | | | | | | The error that the actual runtime will encounter, and not the one that compile-time ifdefs will (potentially) erroneously select. Change-Id: I8ef4c34bcb8b3e568bc39f8c8ea6bfb7732f9e27 Reviewed-by: Mårten Nordheim <marten.nordheim@qt.io>
* QNetworkRequest: Add API to set a minimum archive bomb sizeMårten Nordheim2021-05-311-2/+1
| | | | | | Fixes: QTBUG-91870 Change-Id: Ia23e8b8bcfdf65a91fe57e739242a355c681c9e6 Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
* Fix auto-tests that are fooled by the presence of more than one pluginTimur Pocheptsov2021-05-271-75/+74
| | | | | | | | | | | | | | | It's possible that Qt is built with OpenSSL and some other backend. The ifdefs generated are not mutually exclusive anymore, as it was in the past. So tests should rely on the actual backend they have working at runtime. In the process of fixing the auto-tests, modernized feature #if-ery and some associated compilation issues. Fixes: QTBUG-92875 Change-Id: I2be1b924d506fd36dc4e2c6c9158b5023ff87f32 Reviewed-by: Mårten Nordheim <marten.nordheim@qt.io> Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
* Fix BASE argument of qt_add_resourcesJoerg Bornemann2021-05-181-4/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The BASE argument of qt_add_resources now denotes the root point of the alias of the file. Before, BASE was merely prepended to every file that got passed to qt_add_resources. Old behavior: qt_add_resources(app "images" PREFIX "/" BASE "../shared" FILES "images/button.png") Alias is "../shared/images/button.png", and pro2cmake generated QT_RESOURCE_ALIAS assignments to fix this. New behavior: qt_add_resources(app "images" PREFIX "/" BASE "../shared" FILES "../shared/images/button.png") The alias is "images/button.png". No extra QT_RESOURCE_ALIAS assignment is needed. The new behavior is in effect for user projects and for Qt repositories that define QT_USE_FIXED_QT_ADD_RESOURCE_BASE. Qt repositories will be ported one by one to this new behavior. Then the old code path can be removed. Pick-to: 6.1 Task-number: QTBUG-86726 Change-Id: Ib895edd4df8e97b54badadd9a1c34408beff131f Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
* Blacklist tst_qnetworkreply::ioHttpRedirectMultipartPost on LinuxAllan Sandfeld Jensen2021-05-121-2/+1
| | | | | | | | | | Already blacklisted on the other linux versions, but is failing on SLES now in 5.15 Pick-to: 6.1 5.15 Change-Id: I267908adf94ede51e5520aa2cb806b394fb0438e Reviewed-by: Tarja Sundqvist <tarja.sundqvist@qt.io> Reviewed-by: Mårten Nordheim <marten.nordheim@qt.io>
* Fix linking on Windows when SSL is not configuredVolker Hilsheimer2021-04-261-1/+4
| | | | | | | | The qt_ForceTlsSecurityLevel symbol is not defined if SSL is not configured, so don't use it in the QNetworkReply test if it's not. Change-Id: Id3110a1997fea1648b48bfc411e90e7efe306678 Reviewed-by: Timur Pocheptsov <timur.pocheptsov@qt.io>
* Move plugin code from QtNetwork to qtbase/pluginsTimur Pocheptsov2021-04-221-52/+57
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | All TLS (and non-TLS) backends that QSsl classes rely on are now in plugins/tls (as openssl, securetransport, schannel and certonly plugins). For now, I have to disable some tests that were using OpenSSL calls - this to be refactored/re-thought. These include: qsslsocket auto-test (test-case where we work with private keys), qsslkey auto-test (similar to qsslsocket - test-case working with keys using OpenSSL calls). qasn1element moved to plugins too, so its auto-test have to be re-thought. Since now we can have more than one working TLS-backend on a given platform, the presence of OpenSSL also means I force this backend as active before running tests, to make sure features implemented only in OpenSSL-backend are tested. OCSP auto test is disabled for now, since it heavily relies on OpenSSL symbols (to be refactored). [ChangeLog][QtNetwork][QSslSocket] QSslSocket by default prefers 'openssl' backend if it is available. [ChangeLog][QtNetwork][QSslSocket] TLS-backends are not mutually exclusive anymore, depending on a platform, more than one TLS backend can be built. E.g., configuring Qt with -openssl does not prevent SecureTransport or Schannel plugin from being built. Fixes: QTBUG-91928 Change-Id: I4c05e32f10179066bee3a518bdfdd6c4b15320c3 Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org> Reviewed-by: Edward Welbourne <edward.welbourne@qt.io> Reviewed-by: Mårten Nordheim <marten.nordheim@qt.io>
* tests: remove unnecessary skips for qemuSamuli Piippo2021-01-282-13/+0
| | | | | | | QEMU sysroots are now root owned. Change-Id: Id829cb5debc449efee929ef83876e6ffbf78332c Reviewed-by: Assam Boudjelthia <assam.boudjelthia@qt.io>
* Remove .prev_CMakeLists.txt filesJoerg Bornemann2021-01-122-69/+0
| | | | | | | | | | Those serve no purpose anymore, now that the .pro files are gone. Task-number: QTBUG-88742 Change-Id: I39943327b8c9871785b58e9973e4e7602371793e Reviewed-by: Cristian Adam <cristian.adam@qt.io> Reviewed-by: Edward Welbourne <edward.welbourne@qt.io> Reviewed-by: Kai Koehne <kai.koehne@qt.io>
* Remove the qmake project filesJoerg Bornemann2021-01-073-28/+0
| | | | | | | | | | | | | | | | Remove the qmake project files for most of Qt. Leave the qmake project files for examples, because we still test those in the CI to ensure qmake does not regress. Also leave the qmake project files for utils and other minor parts that lack CMake project files. Task-number: QTBUG-88742 Change-Id: I6cdf059e6204816f617f9624f3ea9822703f73cc Reviewed-by: Edward Welbourne <edward.welbourne@qt.io> Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org> Reviewed-by: Kai Koehne <kai.koehne@qt.io>
* Replace QtTest headers with QTestDavid Skoland2020-12-221-1/+10
| | | | | | | | | | | Complete search and replace of QtTest and QtTest/QtTest with QTest, as QtTest includes the whole module. Replace all such instances with correct header includes. See Jira task for more discussion. Fixes: QTBUG-88831 Change-Id: I981cfae18a1cabcabcabee376016b086d9d01f44 Pick-to: 6.0 Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
* tst_qnetworkreply: unblacklist putWithServerClosingConnectionImmediatelyMårten Nordheim2020-12-072-4/+3
| | | | | | | | | | | | Looking at grafana it rarely fails in dev so unblacklisting it. Though it is a little more flaky after switching to http 2 by default because then we only have one channel and more requests end up queued in the same channel, which will get errored out when the server disconnects. Task-number: QTBUG-88943 Change-Id: If5d6335864ce6bbc35f519b2c6d7068e4181afd2 Reviewed-by: Timur Pocheptsov <timur.pocheptsov@qt.io>
* tst_qnetworkreply: unblacklist various testsMårten Nordheim2020-12-071-18/+0
| | | | | | | | | | | | | | | | | | | headFromHttp hasn't been flaky since 5.14 times according to grafana, does not fail locally. Same situation with ioHttpRedirect as above. ioHttpRedirectMultipartPost has not failed on Windows since october 2019, assumed stable now. backgroundRequestInterruption no longer exists. ioPostToHttpFromSocket would fail in debug MSVC builds but was fixed in 710886fbdd993c3a618ea8bc8b59fbb3e18cfbf0. Task-number: QTBUG-88943 Change-Id: Ida640179ef15a3452291745e4e94a71a385f57ae Reviewed-by: Timur Pocheptsov <timur.pocheptsov@qt.io>
* tst_qnetworkreply: stabilize and unblacklist getFromHttpIntoBuffer2Mårten Nordheim2020-12-042-8/+7
| | | | | | | | | | | | | | The test in general is fine, but it was making an assumption that the first 5 readyRead emissions would never result in the whole message being received. In certain scenarios with slowdown however it was still possible that we would receive the whole message after just a few readyReady emissions. While I didn't check it's most likely due to a mechanic in the QNetworkReply machinery where we suppress some emissions if we know there's more data just about to be available. Task-number: QTBUG-88943 Change-Id: I0cf06edb34d4e86cc8a42c0f1cd7e8c35765f6ee Reviewed-by: Timur Pocheptsov <timur.pocheptsov@qt.io>
* tst_qnetworkreply: cleanup BLACKLISTTimur Pocheptsov2020-12-022-19/+27
| | | | | | | | | | | | Which contains a lot of 'macos'/'osx' black-listed auto-tests. They mostly fail with SecureTransport (on BigSur) because SecTrustEvaluate() does not like our old certificate. Instead, since SecureTransport is deprecated anyway and we are not planning to develop it in future, skip the related auto-test depending on QT_CONFIG(securetransport). Task-number: QTBUG-88943 Change-Id: I5f6cb7b2d0ea15c445603c1ff3e1700f123c28d1 Reviewed-by: Mårten Nordheim <marten.nordheim@qt.io>
* Unblacklist tst_qnetworkreply getFromHttpMårten Nordheim2020-12-021-3/+0
| | | | | | | | | It was blacklisted due to the issue there. The issue is resolved, but the blacklist stayed. Task-number: QTBUG-88943 Change-Id: I7d9a660a17c1463dd8b654752ed5787fe5f5af24 Reviewed-by: Timur Pocheptsov <timur.pocheptsov@qt.io>
* Http2: Remove errored-out requests from queueMårten Nordheim2020-12-021-12/+0
| | | | | | | | | | | | | | | | | | The requests will remove themselves once they get deleted but since the deletion is done through a _queued_ invokeMethod to 'deleteLater' we will call QHttpNetworkConnection::_q_startNextRequest first which may end up starting a reconnect of the TCP socket which we had the error on. In this specific instance it manifested as a race condition where we either don't get a proxyAuthorizationRequired signal at all (it was emitted while we didn't have any valid replies), or we get the signal emitted too late and it gets emitted on whatever the next reply was. Task-number: QTBUG-88417 Pick-to: 5.15 6.0 Change-Id: If3f8ececc5550f1868c90124559cb8e3029646d8 Reviewed-by: Timur Pocheptsov <timur.pocheptsov@qt.io>
* Blacklist authenticationCacheAfterCancel on Ubuntu 20.04Alexandru Croitor2020-11-241-0/+4
| | | | | | | | | | | | | | It flaky fails integrations. Amends 2b49b01aa3467173f0be9252cfa50b41a311dd57 Task-number: QTBUG-88417 Change-Id: I6aad6ee7a70e580da64e75f69e8c9cab1cb78cd7 Reviewed-by: Andreas Buhr <andreas.buhr@qt.io> Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io> Reviewed-by: Mårten Nordheim <marten.nordheim@qt.io> (cherry picked from commit 143d619ba33c693fbbf9fbc3587921a44ae87435) Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
* Blacklist authenticationCacheAfterCancel on Ubuntu 20.04Andreas Buhr2020-11-131-0/+5
| | | | | | | | | | The test authenticationCacheAfterCancel was the only one to fail in recent COIN runs. This patch blacklists it on Ubuntu 20.04. Task-number: QTBUG-88417 Change-Id: Idc85499da82336d291d9a90ecb941810a0e6c935 Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org> Reviewed-by: Mårten Nordheim <marten.nordheim@qt.io>
* Another round of replacing 0 with nullptrAllan Sandfeld Jensen2020-10-071-3/+3
| | | | | | | | | This time based on grepping to also include documentation, tests and examples previously missed by the automatic tool. Change-Id: Ied1703f4bcc470fbc275f759ed5b7c588a5c4e9f Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org> Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
* CMake: Regenerate projects to use new qt_internal_ APIAlexandru Croitor2020-09-234-6/+6
| | | | | | | | | | | Modify special case locations to use the new API as well. Clean up some stale .prev files that are not needed anymore. Clean up some project files that are not used anymore. Task-number: QTBUG-86815 Change-Id: I9947da921f98686023c6bb053dfcc101851276b5 Reviewed-by: Joerg Bornemann <joerg.bornemann@qt.io> Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
* QDecompressHelper: limit decompression ratioMårten Nordheim2020-09-221-0/+4
| | | | | | | | To avoid potential decompression bombs. This is implemented with just a simple check that the ratio doesn't pass some hardcoded preset. Change-Id: I17246f0f43e73280cdb35a8f03d65885f5678ad6 Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* CMake Build: Add qtnetwork docker testserver supportCristian Adam2020-09-171-0/+1
| | | | | | | | | | | | | | | qt_add_test supports now QT_TEST_SERVER_LIST, which will add the test servers as docker test fixtures. The docker server will be started before the test is run, and stopped after the test is run. Running the tests in parallel is not supported. Docker tests are currently only supported on Linux hosts. Task-number: QTBUG-85034 Change-Id: If3cefe05c5dec19c14b05d2fa8b01a0b6d95e259 Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
* QSsl: workaround a 'very secure' OpenSSL version (CentOS 8.x et al)Timur Pocheptsov2020-09-121-0/+10
| | | | | | | | | | | | | CentOS it seems not only backported some OpenSSL 3 functions, but also raised the default security level to 2, making some of our keys (and MDs?) 'too weak' and failing auto-tests here and there as a result. For our auto-test we lower the level to 1, as it is expected to be. Fixes: QTBUG-86336 Pick-to: 5.15 Change-Id: I7062a1b292e8b60eb9c2b2e82bd002f09f9da603 Reviewed-by: Mårten Nordheim <marten.nordheim@qt.io>
* tst_QNetworkReply: Avoid race in ioGetFromHttpWithAuthMårten Nordheim2020-09-111-1/+5
| | | | | | | | | | | | | | | | | | | | | Our authentication code is race-y by design: 1. When two requests are fired off and queued at the same time in the same QHttpNetworkConnection then if one of them encounters "authentication required" then it will copy whatever credentials it got to all the other channels in the connection. This is likely what the first part of the test is testing. 2. If a later request is fired off and it includes credentials in the url then the newly included credentials should be used instead of the cached ones. The race here can occurr when one socket either takes too long to connect or the connected signal is not received early enough. Then the first socket is used for both requests and then we can hit case #2 when the url contains credentials. Pick-to: 5.15 Change-Id: I646a5378d8c1256b2de98b51912953df29f68cb2 Reviewed-by: Timur Pocheptsov <timur.pocheptsov@qt.io>
* Remove most compiler warnings about missing overridesLars Knoll2020-09-111-30/+30
| | | | | | | | | | | | Remove around 1000 compiler warnings about missing overrides in our auto tests. This significantly reduce the compiler warning noise in our auto tests, so that one can actually better see the real problems inbetween. Change-Id: Id0c04dba43fcaf55d8cd2b5c6697358857c31bf9 Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
* Remove QFtp sources etc. in favor of alternate distributionMårten Nordheim2020-08-271-95/+102
| | | | | | | | | | | | While we initially wanted to just disable the functionality the way it is currently built forces people to do a full build of Qt just to enable it. Instead of doing this half-measure let's just remove the code completely from QtBase and rather prepare QtNetwork to handle being a plugin that can be compiled at any time. Task-number: QTBUG-80340 Change-Id: I19155c8c167cf932088f01b2a9706d0e7ab792d1 Reviewed-by: Alex Blasche <alexander.blasche@qt.io>
* tst_qnetworkreply: Extend httpConnectionCount to test HTTP/2 and TLSMårten Nordheim2020-08-241-7/+46
| | | | | | | | | HTTP/2 is only used initially before it transitions to using HTTP/1.1, and in this case the amount of connections established should also reach 6. Change-Id: I300e171e46c846df1730c07469ea85a51cecfb63 Reviewed-by: Timur Pocheptsov <timur.pocheptsov@qt.io>