[education/rkward/kf5] rkward/autotests: Better diagnostics for timeouts in backend restart test
Thomas Friedrichsmeier
null at kde.org
Wed Apr 10 16:12:08 BST 2024
Git commit 804fab1d47bb8bf6fa15e2614e5f602247fa85c3 by Thomas Friedrichsmeier.
Committed on 02/04/2024 at 20:02.
Pushed by tfry into branch 'kf5'.
Better diagnostics for timeouts in backend restart test
M +8 -0 rkward/autotests/core_test.cpp
https://invent.kde.org/education/rkward/-/commit/804fab1d47bb8bf6fa15e2614e5f602247fa85c3
diff --git a/rkward/autotests/core_test.cpp b/rkward/autotests/core_test.cpp
index 54d31cc13..f8ac4751b 100644
--- a/rkward/autotests/core_test.cpp
+++ b/rkward/autotests/core_test.cpp
@@ -329,8 +329,16 @@ private Q_SLOTS:
QPointer<RInterface> oldiface = RInterface::instance();
restart_action->trigger();
+ QElapsedTimer t;
+ t.start();
while (oldiface) { // action may be delayed until next event processing
qApp->processEvents();
+ if (t.elapsed() > 30000) {
+ testLog("Backend shutdown timed out");
+ auto m = QApplication::activeModalWidget();
+ testLog("Active modal window (if any): %p (%s)", m, qPrintable(m ? m->windowTitle() : QString()));
+ break;
+ }
}
testLog("Backend is restarting");
waitForBackendStarted();
More information about the rkward-tracker
mailing list