From b9723850b8123645d0918a9d9ab22bc8b66c2401 Mon Sep 17 00:00:00 2001 From: Urs Ritzmann Date: Tue, 30 Mar 2021 10:53:53 +0200 Subject: [PATCH] add integrationtest for issue 145 --- tests/integrationtests/DBusSignalsTests.cpp | 11 +++++++++++ .../files/org.sdbuscpp.integrationtests.conf | 3 +++ 2 files changed, 14 insertions(+) diff --git a/tests/integrationtests/DBusSignalsTests.cpp b/tests/integrationtests/DBusSignalsTests.cpp index bbf6b35..c316487 100644 --- a/tests/integrationtests/DBusSignalsTests.cpp +++ b/tests/integrationtests/DBusSignalsTests.cpp @@ -67,6 +67,17 @@ TEST_F(SdbusTestObject, EmitsSimpleSignalToMultipleProxiesSuccesfully) ASSERT_TRUE(waitUntil(proxy2->m_gotSimpleSignal)); } +TEST_F(SdbusTestObject, ProxyDoesNotReceiveSignalFromOtherBusName) +{ + auto otherBusName = INTERFACE_NAME + "2"; + auto connection2 = sdbus::createConnection(otherBusName); + auto adaptor2 = std::make_unique(*connection2); + + adaptor2->emitSimpleSignal(); + + ASSERT_FALSE(waitUntil(m_proxy->m_gotSimpleSignal, std::chrono::seconds(1))); +} + TEST_F(SdbusTestObject, EmitsSignalWithMapSuccesfully) { m_adaptor->emitSignalWithMap({{0, "zero"}, {1, "one"}}); diff --git a/tests/integrationtests/files/org.sdbuscpp.integrationtests.conf b/tests/integrationtests/files/org.sdbuscpp.integrationtests.conf index 7eb3c2c..9bb8948 100644 --- a/tests/integrationtests/files/org.sdbuscpp.integrationtests.conf +++ b/tests/integrationtests/files/org.sdbuscpp.integrationtests.conf @@ -11,6 +11,9 @@ + + +