diff options
author | Kitsune Ral <Kitsune-Ral@users.sf.net> | 2020-08-04 13:52:30 +0200 |
---|---|---|
committer | Kitsune Ral <Kitsune-Ral@users.sf.net> | 2020-08-04 13:52:30 +0200 |
commit | 3f09b1b3e1edcdb7b21d7f3e4f4764f0bd084f30 (patch) | |
tree | dbfa2a1679955fc6354206ab86551b7796258d46 | |
parent | 7982e62cf53c830b821cbe2d85fd4fef1e633576 (diff) | |
download | libquotient-3f09b1b3e1edcdb7b21d7f3e4f4764f0bd084f30.tar.gz libquotient-3f09b1b3e1edcdb7b21d7f3e4f4764f0bd084f30.zip |
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.
-rw-r--r-- | tests/quotest.cpp | 9 |
1 files 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; } |