From 67effe421490e76696533c7804650e98df596d0a Mon Sep 17 00:00:00 2001 From: Adriaan de Groot Date: Wed, 14 Apr 2021 13:04:40 +0200 Subject: [PATCH] [netinstall] check in test that loading did not time out --- src/modules/netinstall/Tests.cpp | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/modules/netinstall/Tests.cpp b/src/modules/netinstall/Tests.cpp index 090355470..392faa34a 100644 --- a/src/modules/netinstall/Tests.cpp +++ b/src/modules/netinstall/Tests.cpp @@ -397,9 +397,13 @@ ItemTests::testUrlFallback() // Now give the loader time to complete QEventLoop loop; connect( &c, &Config::statusReady, &loop, &QEventLoop::quit ); + QSignalSpy spy( &c, &Config::statusReady ); QTimer::singleShot( std::chrono::seconds(1), &loop, &QEventLoop::quit ); loop.exec(); + // Check it didn't time out + QCOMPARE( spy.count(), 1 ); + // Check YAML-loading results QCOMPARE( smash( c.statusCode() ), status ); QCOMPARE( c.model()->rowCount(), count ); }