summaryrefslogtreecommitdiffstats
path: root/tests
diff options
context:
space:
mode:
authorMichael Brasser <mbrasser@ford.com>2019-05-01 09:00:49 -0500
committerMichael Brasser <michael.brasser@live.com>2019-05-01 17:11:22 +0000
commit1076f342e0e2fd57ba11d1ba513cd079b053dd4e (patch)
tree188d5dce6946b6b07329e2c8ef2b7a7e683d8d47 /tests
parent539a087eb099181630b5f5bd20d41a7b4bd45b66 (diff)
Ensure proxied objects are correctly unproxied
If the server goes away, we must unproxy the objects. Otherwise if the server returns we will end up attempting to reproxy the same objects. As a side effect the proxy_multprocess autotest becomes more stable. Change-Id: I9f3f0c9e4aa40790da7a999273badb141beacd62 Reviewed-by: Brett Stottlemyer <bstottle@ford.com>
Diffstat (limited to 'tests')
-rw-r--r--tests/auto/proxy_multiprocess/proxy/main.cpp6
1 files changed, 5 insertions, 1 deletions
diff --git a/tests/auto/proxy_multiprocess/proxy/main.cpp b/tests/auto/proxy_multiprocess/proxy/main.cpp
index 46a73a8..6e0932a 100644
--- a/tests/auto/proxy_multiprocess/proxy/main.cpp
+++ b/tests/auto/proxy_multiprocess/proxy/main.cpp
@@ -41,7 +41,11 @@ private Q_SLOTS:
m_hostNode->setHostUrl(QUrl(QStringLiteral("tcp://127.0.0.1:65213")));
m_hostNode->proxy(QUrl("local:testRegistry"));
- QTest::qWait(500);
+ // our proxied object should be added, and then later removed when the server shuts down
+ QSignalSpy addSpy(m_hostNode.data(), &QRemoteObjectNode::remoteObjectAdded);
+ QSignalSpy removeSpy(m_hostNode.data(), &QRemoteObjectNode::remoteObjectRemoved);
+ QVERIFY(addSpy.wait());
+ QVERIFY(removeSpy.wait());
}
private: