[education/rkward] rkward: Allow more time for device hooks test

Thomas Friedrichsmeier null at kde.org
Sun Aug 31 13:51:37 BST 2025


Git commit dde767ca5ba8dce92e1db8a34ccaa5ad5392bdee by Thomas Friedrichsmeier.
Committed on 30/08/2025 at 21:45.
Pushed by tfry into branch 'master'.

Allow more time for device hooks test

M  +6    -4    rkward/autotests/core_test.cpp
M  +2    -1    rkward/rbackend/rktransmitter.cpp

https://invent.kde.org/education/rkward/-/commit/dde767ca5ba8dce92e1db8a34ccaa5ad5392bdee

diff --git a/rkward/autotests/core_test.cpp b/rkward/autotests/core_test.cpp
index f3f64cf45..44e5fea8f 100644
--- a/rkward/autotests/core_test.cpp
+++ b/rkward/autotests/core_test.cpp
@@ -102,7 +102,8 @@ class RKWardCoreTest : public QObject {
 		runCommandWithTimeout(
 		    new RCommand(QStringLiteral("# waitForAllFinished"), RCommand::App | RCommand::EmptyCommand | RCommand::Sync), nullptr, [&timedout](RCommand *) {
 			    timedout = false;
-		}, timeoutms);
+		    },
+		    timeoutms);
 		// NOTE: failure message was already generated
 		return !timedout;
 	}
@@ -437,9 +438,9 @@ class RKWardCoreTest : public QObject {
 			// NOTE: The above two commands may or may not start executing in that order. Conceivably, the priority command gets handled, before the initial sleep
 			//       command even started. This interesting corner case, in particular, has been causing trouble in the past, so we try to tigger it, deliberately.
 			//       The inserted newline(s) in the fist command make(s) that a tiny bit more likely to happen (because parsing needs more iterations).
-			if (!waitForAllFinished()) { // first, wait with a short timeout: sleep should have been cancelled
+			if (!waitForAllFinished()) {  // first, wait with a short timeout: sleep should have been cancelled
 				waitForAllFinished(6000); // but if that fails, keep priority_command_done in scope to avoid crash)
-				QVERIFY(false); // still a bug, of course
+				QVERIFY(false);           // still a bug, of course
 			}
 		}
 	}
@@ -632,7 +633,8 @@ class RKWardCoreTest : public QObject {
 			QCOMPARE(output.count(u"Closed device 2"_s), 1);
 			QCOMPARE(output.count(u"Plot was modified"_s), 1);
 			QCOMPARE(output.count(u"Blanking device 2"_s), 2); // once each for the first two plots, but not for title()
-		});
+		},
+		                      3000);
 	}
 
 	void restartRBackend() {
diff --git a/rkward/rbackend/rktransmitter.cpp b/rkward/rbackend/rktransmitter.cpp
index 23c2d77d0..0fc65a34e 100644
--- a/rkward/rbackend/rktransmitter.cpp
+++ b/rkward/rbackend/rktransmitter.cpp
@@ -38,7 +38,8 @@ void RKRBackendSerializer::serialize(const RBackendRequest &request, QDataStream
 	}
 }
 
-template<typename T> static T readS(QDataStream &stream) {
+template <typename T>
+static T readS(QDataStream &stream) {
 	T ret;
 	stream >> ret;
 	return ret;



More information about the rkward-tracker mailing list