diff options
author | Liang Qi <liang.qi@qt.io> | 2018-05-08 20:43:45 +0200 |
---|---|---|
committer | Liang Qi <liang.qi@qt.io> | 2018-05-08 20:43:45 +0200 |
commit | b5a956601f369e961d6863126f8facc61bb6df1f (patch) | |
tree | 25e4021518b254ef76c410244dd6581432bf285f /tests/auto/network/access | |
parent | 290f953253afc5935382525cd4b72e091865cab5 (diff) | |
parent | 1b7337d23dbc767ba482d9051180f10d77052913 (diff) |
Merge remote-tracking branch 'origin/5.11' into dev
Conflicts:
src/plugins/sqldrivers/sqlite/qsql_sqlite.cpp
tests/auto/corelib/io/qresourceengine/qresourceengine_test.pro
Change-Id: I3169f709cc2a1b75007cb23c02c4c79b74feeb04
Diffstat (limited to 'tests/auto/network/access')
-rw-r--r-- | tests/auto/network/access/qftp/tst_qftp.cpp | 2 | ||||
-rw-r--r-- | tests/auto/network/access/qnetworkreply/tst_qnetworkreply.cpp | 11 |
2 files changed, 6 insertions, 7 deletions
diff --git a/tests/auto/network/access/qftp/tst_qftp.cpp b/tests/auto/network/access/qftp/tst_qftp.cpp index 1620c2ade6..6e18e1a663 100644 --- a/tests/auto/network/access/qftp/tst_qftp.cpp +++ b/tests/auto/network/access/qftp/tst_qftp.cpp @@ -2078,8 +2078,6 @@ void tst_QFtp::doneSignal() if (QTestEventLoop::instance().timeout()) QFAIL("Network operation timed out"); - QTest::qWait(200); - QCOMPARE(spy.count(), 1); QCOMPARE(spy.first().first().toBool(), false); } diff --git a/tests/auto/network/access/qnetworkreply/tst_qnetworkreply.cpp b/tests/auto/network/access/qnetworkreply/tst_qnetworkreply.cpp index 69bd78a4f0..0ef3dc0b61 100644 --- a/tests/auto/network/access/qnetworkreply/tst_qnetworkreply.cpp +++ b/tests/auto/network/access/qnetworkreply/tst_qnetworkreply.cpp @@ -7816,13 +7816,14 @@ void tst_QNetworkReply::closeDuringDownload() QFETCH(QUrl, url); QNetworkRequest request(url); QNetworkReply* reply = manager.get(request); - connect(reply, SIGNAL(readyRead()), &QTestEventLoop::instance(), SLOT(exitLoop())); - QTestEventLoop::instance().enterLoop(10); - QVERIFY(!QTestEventLoop::instance().timeout()); - connect(reply, SIGNAL(finished()), &QTestEventLoop::instance(), SLOT(exitLoop())); + QSignalSpy readyReadSpy(reply, &QNetworkReply::readyRead); + QVERIFY(readyReadSpy.wait(10000)); + QSignalSpy destroySpy(reply, &QObject::destroyed); reply->close(); reply->deleteLater(); - QTest::qWait(1000); //cancelling ftp takes some time, this avoids a warning caused by test's cleanup() destroying the connection cache before the abort is finished + // Wait for destruction to avoid a warning caused by test's cleanup() + // destroying the connection cache before the abort is finished + QVERIFY(destroySpy.wait()); } void tst_QNetworkReply::ftpAuthentication_data() |