summaryrefslogtreecommitdiffstats
path: root/tests
diff options
context:
space:
mode:
authorMichael Brasser <mbrasser@ford.com>2018-08-21 13:44:10 -0500
committerMichael Brasser <michael.brasser@live.com>2018-08-22 20:57:17 +0000
commit20584755d916e55fecaf2292dc92d47899e7df9e (patch)
treedbf2c7cfcd77c07d015f644cf6e9589576f952c5 /tests
parentc4cd31c9374618d62c3b01b5f43030712b08d7d4 (diff)
Fix crash with ObjectList and in-process replicas
Change-Id: I6ed6a125669a4d3537b5e7266d1afe152cfb79f1 Reviewed-by: Brett Stottlemyer <bstottle@ford.com>
Diffstat (limited to 'tests')
-rw-r--r--tests/auto/integration/tst_integration.cpp22
1 files changed, 22 insertions, 0 deletions
diff --git a/tests/auto/integration/tst_integration.cpp b/tests/auto/integration/tst_integration.cpp
index 1eb7604..8643002 100644
--- a/tests/auto/integration/tst_integration.cpp
+++ b/tests/auto/integration/tst_integration.cpp
@@ -304,6 +304,28 @@ private slots:
QCOMPARE(engine_r->engineType(), EngineReplica::ELECTRIC);
}
+ // ensure we don't crash when ObjectList iterates over in process replicas
+ void inProcessObjectList()
+ {
+ setupRegistry();
+ setupHost(true);
+ setupClient(true);
+ Engine e;
+ host->enableRemoting(&e);
+ e.setStarted(false);
+
+ const QScopedPointer<EngineReplica> engine_r(host->acquire<EngineReplica>());
+ const QScopedPointer<EngineReplica> engine_r2(client->acquire<EngineReplica>());
+ engine_r->waitForSource(1000);
+ engine_r2->waitForSource(1000);
+ QCOMPARE(engine_r->started(), false);
+ QCOMPARE(engine_r2->started(), false);
+ engine_r->pushStarted(true);
+
+ QTRY_COMPARE(engine_r->started(), true);
+ QTRY_COMPARE(engine_r2->started(), true);
+ }
+
void enumTest()
{
setupHost();