summaryrefslogtreecommitdiffstats
path: root/tests
diff options
context:
space:
mode:
authorRobert Griebl <robert.griebl@qt.io>2023-12-02 18:11:12 +0100
committerRobert Griebl <robert.griebl@qt.io>2023-12-12 13:41:55 +0100
commitc7a5a9fe3f862f0ea0e0e75747e63dd91f0bb787 (patch)
tree612678ecd15ff4a89c70b83eabe74ae2d77e63ba /tests
parentac08782cf1e487c25eb38ed4e5afc34465bbdc22 (diff)
Quicklaunch: improve the runtimesPerContainer setting
Instead of just having a global value for any container/runtime combination, you can now have fine grained control. Change-Id: Ibfa523893bfb30716b9a5a69d116e29709a9c9d8 Pick-to: 6.7 Reviewed-by: Dominik Holland <dominik.holland@qt.io>
Diffstat (limited to 'tests')
-rw-r--r--tests/auto/configuration/data/config1.yaml2
-rw-r--r--tests/auto/configuration/data/config2.yaml9
-rw-r--r--tests/auto/configuration/tst_configuration.cpp19
3 files changed, 25 insertions, 5 deletions
diff --git a/tests/auto/configuration/data/config1.yaml b/tests/auto/configuration/data/config1.yaml
index 8f9263fa..5f1af10a 100644
--- a/tests/auto/configuration/data/config1.yaml
+++ b/tests/auto/configuration/data/config1.yaml
@@ -43,6 +43,8 @@ dbus:
quicklaunch:
idleLoad: 0.5
runtimesPerContainer: 5
+ failedStartLimit: 42
+ failedStartLimitIntervalSec: 43
ui:
opengl:
diff --git a/tests/auto/configuration/data/config2.yaml b/tests/auto/configuration/data/config2.yaml
index 1913d4e5..9da193ae 100644
--- a/tests/auto/configuration/data/config2.yaml
+++ b/tests/auto/configuration/data/config2.yaml
@@ -49,7 +49,14 @@ dbus:
quicklaunch:
idleLoad: 0.2
- runtimesPerContainer: 3
+ runtimesPerContainer:
+ c-foo:
+ r-foo: 1
+ r-bar: 2
+ c-bar: 4
+
+ failedStartLimit: 44
+ failedStartLimitIntervalSec: 45
ui:
opengl:
diff --git a/tests/auto/configuration/tst_configuration.cpp b/tests/auto/configuration/tst_configuration.cpp
index dfdd3cad..456cf086 100644
--- a/tests/auto/configuration/tst_configuration.cpp
+++ b/tests/auto/configuration/tst_configuration.cpp
@@ -96,7 +96,7 @@ void tst_Configuration::defaultConfig()
QCOMPARE(c.rawSystemProperties(), QVariantMap {});
QCOMPARE(c.quickLaunchIdleLoad(), qreal(0));
- QCOMPARE(c.quickLaunchRuntimesPerContainer(), 0);
+ QVERIFY(c.quickLaunchRuntimesPerContainer().isEmpty());
QString defaultWaylandSocketName =
#if defined(Q_OS_LINUX)
@@ -211,7 +211,10 @@ void tst_Configuration::simpleConfig()
}));
QCOMPARE(c.quickLaunchIdleLoad(), qreal(0.5));
- QCOMPARE(c.quickLaunchRuntimesPerContainer(), 5);
+ QHash<std::pair<QString, QString>, int> rpc { { { qSL("*"), qSL("*")}, 5 } };
+ QCOMPARE(c.quickLaunchRuntimesPerContainer(), rpc);
+ QCOMPARE(c.quickLaunchFailedStartLimit(), 42);
+ QCOMPARE(c.quickLaunchFailedStartLimitIntervalSec(), 43);
QCOMPARE(c.waylandSocketName(), qSL("my-wlsock-42"));
@@ -357,7 +360,15 @@ void tst_Configuration::mergedConfig()
}));
QCOMPARE(c.quickLaunchIdleLoad(), qreal(0.2));
- QCOMPARE(c.quickLaunchRuntimesPerContainer(), 3);
+ QHash<std::pair<QString, QString>, int> rpc = {
+ { { qSL("*"), qSL("*") }, 5 },
+ { { qSL("c-foo"), qSL("r-foo") }, 1 },
+ { { qSL("c-foo"), qSL("r-bar") }, 2 },
+ { { qSL("c-bar"), qSL("*") }, 4 },
+ };
+ QCOMPARE(c.quickLaunchRuntimesPerContainer(), rpc);
+ QCOMPARE(c.quickLaunchFailedStartLimit(), 44);
+ QCOMPARE(c.quickLaunchFailedStartLimitIntervalSec(), 45);
QCOMPARE(c.waylandSocketName(), qSL("other-wlsock-0"));
@@ -490,7 +501,7 @@ void tst_Configuration::commandLineConfig()
QCOMPARE(c.rawSystemProperties(), QVariantMap {});
QCOMPARE(c.quickLaunchIdleLoad(), qreal(0));
- QCOMPARE(c.quickLaunchRuntimesPerContainer(), 0);
+ QVERIFY(c.quickLaunchRuntimesPerContainer().isEmpty());
QCOMPARE(c.waylandSocketName(), qSL("wlsock-1"));
QCOMPARE(c.waylandExtraSockets(), {});