[education/rkward/releases/0.8.1] rkward/autotests: Avoid crash on failing test
Thomas Friedrichsmeier
null at kde.org
Fri Apr 18 11:51:01 BST 2025
Git commit edba6720753d8aa1820e23c3416f7f596bffe68d by Thomas Friedrichsmeier.
Committed on 18/04/2025 at 10:50.
Pushed by tfry into branch 'releases/0.8.1'.
Avoid crash on failing test
M +2 -2 rkward/autotests/core_test.cpp
https://invent.kde.org/education/rkward/-/commit/edba6720753d8aa1820e23c3416f7f596bffe68d
diff --git a/rkward/autotests/core_test.cpp b/rkward/autotests/core_test.cpp
index f634dc51a..e894ae55e 100644
--- a/rkward/autotests/core_test.cpp
+++ b/rkward/autotests/core_test.cpp
@@ -402,7 +402,7 @@ private Q_SLOTS:
void priorityCommandTest() {
bool priority_command_done = false;
- runCommandAsync(new RCommand("Sys.sleep(5)", RCommand::User), nullptr, [&priority_command_done](RCommand *command) {
+ runCommandAsync(new RCommand("cat(\"sleeping\n\"); Sys.sleep(5)", RCommand::User), nullptr, [&priority_command_done](RCommand *command) {
QVERIFY(priority_command_done);
QVERIFY(command->failed());
QVERIFY(command->wasCanceled());
@@ -413,7 +413,7 @@ private Q_SLOTS:
RInterface::instance()->cancelAll();
});
waitForAllFinished();
- waitForAllFinished(4000); // priority_command_done must remain in scope until done (even if interrupting fails for some reason)
+ waitForAllFinished(5000); // priority_command_done must remain in scope until done (even if interrupting fails for some reason)
}
void RKConsoleHistoryTest() {
More information about the rkward-tracker
mailing list