summaryrefslogtreecommitdiff
path: root/kde-frameworks/krunner/files
diff options
context:
space:
mode:
authorV3n3RiX <venerix@koprulu.sector>2022-05-12 16:42:50 +0300
committerV3n3RiX <venerix@koprulu.sector>2022-05-12 16:42:50 +0300
commit752d6256e5204b958b0ef7905675a940b5e9172f (patch)
tree330d16e6362a49cbed8875a777fe641a43376cd3 /kde-frameworks/krunner/files
parent0c100b7dd2b30e75b799d806df4ef899fd98e1ea (diff)
gentoo resync : 12.05.2022
Diffstat (limited to 'kde-frameworks/krunner/files')
-rw-r--r--kde-frameworks/krunner/files/krunner-5.92.0-drop-runnermanagertest-timeouts.patch55
-rw-r--r--kde-frameworks/krunner/files/krunner-5.92.0-increase-runnermanagertest-timeout.patch26
2 files changed, 81 insertions, 0 deletions
diff --git a/kde-frameworks/krunner/files/krunner-5.92.0-drop-runnermanagertest-timeouts.patch b/kde-frameworks/krunner/files/krunner-5.92.0-drop-runnermanagertest-timeouts.patch
new file mode 100644
index 000000000000..1d6c654f631e
--- /dev/null
+++ b/kde-frameworks/krunner/files/krunner-5.92.0-drop-runnermanagertest-timeouts.patch
@@ -0,0 +1,55 @@
+From f324dd5fc477888517db7b431bc291d0712969af Mon Sep 17 00:00:00 2001
+From: Eduardo de Souza Cruz <eduardo.cruz@kdemail.net>
+Date: Mon, 14 Mar 2022 14:12:17 -0300
+Subject: [PATCH] Remove upper-limits for RunnerManagerTest's timeouts
+
+Those upper-limits timeouts were not conservative enough for the Continuous Integration environment which can be slow and this test was failing sometimes.
+
+The upper-limits timing verifications were removed without too much prejudice to the overall test. It should still serve its purpose to guarantee there will be no regression on this functionality.
+---
+ autotests/runnermanagertest.cpp | 13 ++++++-------
+ 1 file changed, 6 insertions(+), 7 deletions(-)
+
+diff --git a/autotests/runnermanagertest.cpp b/autotests/runnermanagertest.cpp
+index 02c0985..82bd2a4 100644
+--- a/autotests/runnermanagertest.cpp
++++ b/autotests/runnermanagertest.cpp
+@@ -74,8 +74,9 @@ private Q_SLOTS:
+ // However not yet a matcheschanged, it should be stalled for 250ms
+ QCOMPARE(spyMatchesChanged.count(), 0);
+
+- // After 250ms it will emit with empty matches, we wait for that
+- QVERIFY(spyMatchesChanged.wait(265)); // 265ms as a margin of safety for 250ms
++ // After 250ms it will emit with empty matches, we wait for that.
++ // We can't put a low upper limit on these wait() calls because the CI environment can be slow.
++ QVERIFY(spyMatchesChanged.wait()); // This should take just a tad longer than 250ms.
+
+ // This should have taken no less than 250ms. It waits for 250s before "giving up" and emitting an empty matches list.
+ QVERIFY(timer.elapsed() >= 250);
+@@ -84,20 +85,18 @@ private Q_SLOTS:
+ QCOMPARE(spyQueryFinished.count(), 1); // Still the same, query is not done
+
+ // We programmed it to emit the result after 300ms, so we need to wait 50ms more for the next emission
+- QVERIFY(spyQueryFinished.wait(100)); // 100ms as a margin of safety for 50ms
++ QVERIFY(spyQueryFinished.wait());
+
+ // This should have taken at least 300ms total, as we requested via the special query string
+ QVERIFY(timer.elapsed() >= 300);
+
+- // RunnerManager::jobDone() should have anticipated the final emission, so it should not have waited the full 250+250 ms.
+- QVERIFY(timer.elapsed() <= 330); // This total should be just a tad bigger than 300ms, we put a 10% margin of safety
+-
++ // At this point RunnerManager::jobDone() should have anticipated the final emission.
+ QCOMPARE(spyMatchesChanged.count(), 2); // We had the second matchesChanged emission, now with the query result
+ QCOMPARE(manager->matches().count(), 1); // The result is here
+ QCOMPARE(spyQueryFinished.count(), 2); // Will have emited queryFinished, job is done
+
+ // Now we will make sure that RunnerManager::scheduleMatchesChanged() emits matchesChanged instantly
+- // if we start a query with an empty string. It will never produce results, stalling is meaninless
++ // if we start a query with an empty string. It will never produce results, stalling is meaningless
+ manager->launchQuery("");
+ QCOMPARE(spyMatchesChanged.count(), 3); // One more, instantly, without stall
+ QCOMPARE(manager->matches().count(), 0); // Empty results for empty query string
+--
+GitLab
+
diff --git a/kde-frameworks/krunner/files/krunner-5.92.0-increase-runnermanagertest-timeout.patch b/kde-frameworks/krunner/files/krunner-5.92.0-increase-runnermanagertest-timeout.patch
new file mode 100644
index 000000000000..7a586598c15e
--- /dev/null
+++ b/kde-frameworks/krunner/files/krunner-5.92.0-increase-runnermanagertest-timeout.patch
@@ -0,0 +1,26 @@
+From c1f589a7cda3a5d47479ab1188716df533ceb8b1 Mon Sep 17 00:00:00 2001
+From: David Faure <faure@kde.org>
+Date: Sun, 13 Mar 2022 13:08:26 +0100
+Subject: [PATCH] autotests: urgh, this test is really timing dependent, and
+ fails if CI is slow
+
+---
+ autotests/runnermanagertest.cpp | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/autotests/runnermanagertest.cpp b/autotests/runnermanagertest.cpp
+index b9ccbc5..02c0985 100644
+--- a/autotests/runnermanagertest.cpp
++++ b/autotests/runnermanagertest.cpp
+@@ -84,7 +84,7 @@ private Q_SLOTS:
+ QCOMPARE(spyQueryFinished.count(), 1); // Still the same, query is not done
+
+ // We programmed it to emit the result after 300ms, so we need to wait 50ms more for the next emission
+- QVERIFY(spyQueryFinished.wait(65)); // 65ms as a margin of safety for 50ms
++ QVERIFY(spyQueryFinished.wait(100)); // 100ms as a margin of safety for 50ms
+
+ // This should have taken at least 300ms total, as we requested via the special query string
+ QVERIFY(timer.elapsed() >= 300);
+--
+GitLab
+