From 51d08f94cfc01a3f39f39a228e405c2f26cb9684 Mon Sep 17 00:00:00 2001 From: Michael Zanetti Date: Wed, 8 Feb 2023 19:45:14 +0100 Subject: [PATCH] Stabilize logging tests --- tests/auto/logging/testlogging.cpp | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/tests/auto/logging/testlogging.cpp b/tests/auto/logging/testlogging.cpp index 6c735a8f..60aaecd6 100644 --- a/tests/auto/logging/testlogging.cpp +++ b/tests/auto/logging/testlogging.cpp @@ -389,9 +389,11 @@ void TestLogging::actionLog() // wait for the outgoing data // 3 packets: ExecuteAction reply, LogDatabaseUpdated signal and LogEntryAdded signal - clientSpy.wait(500); - if (clientSpy.count() < 3) { - clientSpy.wait(500); + while (clientSpy.count() < 3) { + bool success = clientSpy.wait(); + if (!success) { + break; + } } QVariantList logEntryAddedVariants = checkNotifications(clientSpy, "Logging.LogEntryAdded");