From 3f09b1b3e1edcdb7b21d7f3e4f4764f0bd084f30 Mon Sep 17 00:00:00 2001 From: Kitsune Ral Date: Tue, 4 Aug 2020 13:52:30 +0200 Subject: quotest: don't fail on past name changes coming in sync Sync may bring past events in a few batches, it turns out, and quotest used to choke on name changes from its own past executions. Also: fix whitespacesmissing ina log line. --- tests/quotest.cpp | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) diff --git a/tests/quotest.cpp b/tests/quotest.cpp index dc84364f..afe26f7a 100644 --- a/tests/quotest.cpp +++ b/tests/quotest.cpp @@ -499,17 +499,16 @@ TEST_IMPL(changeName) if (localUser != arrivedUser) return false; - localUser->rename({}); const auto& arrivedNewName = arrivedUser->name(targetRoom); // Old names may diverge e.g. because the original name // hasn't been known to Quotient if (newName == arrivedNewName) FINISH_TEST(true); - clog << "Names mismatch: found" << newName.toStdString() - << "instead of" << arrivedNewName.toStdString() - << endl; - FAIL_TEST(); + clog << "Names mismatch: found " << newName.toStdString() + << " instead of " << arrivedNewName.toStdString() + << "; waiting for the next change" << endl; + return false; }); return false; } -- cgit v1.2.3