aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorKitsune Ral <Kitsune-Ral@users.sf.net>2020-08-03 19:41:58 +0200
committerKitsune Ral <Kitsune-Ral@users.sf.net>2020-08-03 19:41:58 +0200
commit122dbaa1a68be31d9ea48860d87b757c3b51783e (patch)
treea692abd20a6cde7af9a129edda0cec7469d37f9a
parenta3fe6efd9b9ef90491abab44f1c1e2b9516aa5a3 (diff)
downloadlibquotient-122dbaa1a68be31d9ea48860d87b757c3b51783e.tar.gz
libquotient-122dbaa1a68be31d9ea48860d87b757c3b51783e.zip
quotest: clean up the room state after testing
-rw-r--r--tests/quotest.cpp6
1 files changed, 5 insertions, 1 deletions
diff --git a/tests/quotest.cpp b/tests/quotest.cpp
index 622a8cfb..dc84364f 100644
--- a/tests/quotest.cpp
+++ b/tests/quotest.cpp
@@ -772,6 +772,11 @@ TEST_IMPL(visitResources)
void TestManager::conclude()
{
+ // Clean up the room (best effort)
+ auto* room = testSuite->room();
+ room->setTopic({});
+ room->localUser()->rename({});
+
QString succeededRec { QString::number(succeeded.size()) % " of "
% QString::number(succeeded.size() + failed.size()
+ running.size())
@@ -800,7 +805,6 @@ void TestManager::conclude()
// targetRoom->postHtmlText(...)
// .then(this, &TestManager::finalize); // Qt-style or
// .then([this] { finalize(); }); // STL-style
- auto* room = testSuite->room();
auto txnId = room->postHtmlText(plainReport, htmlReport);
// Now just wait until all the pending events reach the server
connectUntil(room, &Room::messageSent, this, [this, room, plainReport] {