From dfa803e624d0a16eb8170c5496df19cf99f73328 Mon Sep 17 00:00:00 2001 From: cryptocode Date: Sat, 2 Mar 2019 21:53:56 +0100 Subject: [PATCH] Fix intermittent select_account test failure (#1797) --- nano/qt_test/qt.cpp | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) diff --git a/nano/qt_test/qt.cpp b/nano/qt_test/qt.cpp index 33aa0e58..f144e480 100644 --- a/nano/qt_test/qt.cpp +++ b/nano/qt_test/qt.cpp @@ -95,7 +95,17 @@ TEST (wallet, select_account) QTest::mouseClick (wallet->accounts.use_account, Qt::LeftButton); auto key4 (wallet->account); ASSERT_NE (key3, key4); - ASSERT_EQ (key2, key4); + + // The list is populated in sorted order as it's read from store in lexical order. This may + // be different from the insertion order. + if (key1 < key2) + { + ASSERT_EQ (key2, key4); + } + else + { + ASSERT_EQ (key1, key4); + } } TEST (wallet, main)