keepassxreboot / keepassxc

KeePassXC is a cross-platform community-driven port of the Windows application “Keepass Password Safe”.
https://keepassxc.org/
Other
20.07k stars 1.42k forks source link

TestGui: testTotp: use QTRY_COMPARE #10901

Closed c4rlo closed 3 weeks ago

c4rlo commented 3 weeks ago

A check in TestGui::testTotp failed in #10853, presumably because of inherent raciness:

20:28:37   FAIL!  : TestGui::testTotp() Compared values are not the same
20:28:37      Actual   (totpLabel->text().replace(" ", "")): "625751"
20:28:37      Expected (entry->totp())                     : "067152"
20:28:37      Loc: [/Users/KPXC/buildAgent/work/c401303cba1b4098/tests/gui/TestGui.cpp(1033)]

Paper over the raciness by using QTRY_COMPARE instead of QCOMPARE.