From af2ba798a0f6ea760ee929b435a69293807cbb65 Mon Sep 17 00:00:00 2001 From: Carlo Teubner Date: Fri, 14 Jun 2024 20:22:55 +0100 Subject: [PATCH] TestGui: testTotp: use QTRY_COMPARE That test failed, presumably because of inherent raciness: https://ci.keepassxc.org/buildConfiguration/KeePassXC_MacOS/248424?expandBuildDeploymentsSection=false&hideTestsFromDependencies=false&hideProblemsFromDependencies=false&expandBuildChangesSection=true&expandBuildProblemsSection=true&showLog=248423_1081_942&logFilter=debug&logView=flowAware Paper over the raciness by using QTRY_COMPARE instead of QCOMPARE. --- tests/gui/TestGui.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tests/gui/TestGui.cpp b/tests/gui/TestGui.cpp index 91c8a0866..d00342ae0 100644 --- a/tests/gui/TestGui.cpp +++ b/tests/gui/TestGui.cpp @@ -1030,7 +1030,7 @@ void TestGui::testTotp() auto* totpDialog = m_dbWidget->findChild("TotpDialog"); auto* totpLabel = totpDialog->findChild("totpLabel"); - QCOMPARE(totpLabel->text().replace(" ", ""), entry->totp()); + QTRY_COMPARE(totpLabel->text().replace(" ", ""), entry->totp()); QTest::keyClick(totpDialog, Qt::Key_Escape); // Test the QR code