Skip to content
Permalink
Browse files
fix tileloader test
  • Loading branch information
vcloarec authored and nyalldawson committed Jan 11, 2022
1 parent a51ffad commit 65debd18341bbe55870ca92a97225a605a2dfc84
Showing with 7 additions and 1 deletion.
  1. +7 −1 tests/src/core/testqgstiledownloadmanager.cpp
@@ -86,6 +86,7 @@ void TestQgsTileDownloadManager::testOneRequest()
spy.wait();
QCOMPARE( spy.count(), 1 );
QVERIFY( !r->data().isEmpty() );
QVERIFY( r->error() == QNetworkReply::NoError );

QVERIFY( !manager.hasPendingRequests() );

@@ -157,7 +158,9 @@ void TestQgsTileDownloadManager::testOneRequestTwice()
QCOMPARE( spy1.count(), 1 );
QCOMPARE( spy2.count(), 1 );
QVERIFY( !r1->data().isEmpty() );
QVERIFY( r1->error() == QNetworkReply::NoError );
QVERIFY( !r2->data().isEmpty() );
QVERIFY( r2->error() == QNetworkReply::NoError );

QVERIFY( !manager.hasPendingRequests() );

@@ -194,6 +197,7 @@ void TestQgsTileDownloadManager::testOneRequestTwiceAndEarlyDelete()
spy.wait();
QCOMPARE( spy.count(), 1 );
QVERIFY( !r2->data().isEmpty() );
QVERIFY( r2->error() == QNetworkReply::NoError );

QVERIFY( !manager.hasPendingRequests() );

@@ -222,7 +226,7 @@ void TestQgsTileDownloadManager::testOneRequestFailure()
QSignalSpy spy( r.get(), &QgsTileDownloadManagerReply::finished );
spy.wait();
QCOMPARE( spy.count(), 1 );
QVERIFY( r->data().isEmpty() );
QVERIFY( r->error() != QNetworkReply::NoError );

QVERIFY( !manager.hasPendingRequests() );

@@ -260,7 +264,9 @@ void TestQgsTileDownloadManager::testTwoRequests()
QCOMPARE( spy1.count(), 1 );
QCOMPARE( spy2.count(), 1 );
QVERIFY( !r1->data().isEmpty() );
QVERIFY( r1->error() == QNetworkReply::NoError );
QVERIFY( !r2->data().isEmpty() );
QVERIFY( r2->error() == QNetworkReply::NoError );

QVERIFY( !manager.hasPendingRequests() );

0 comments on commit 65debd1

Please sign in to comment.