aboutsummaryrefslogtreecommitdiff
path: root/tests
diff options
context:
space:
mode:
authorCharles Kerr <charles.kerr@canonical.com>2016-09-22 13:56:54 -0500
committerCharles Kerr <charles.kerr@canonical.com>2016-09-22 13:56:54 -0500
commitec9196ac95986edbd92596991930a430e4dcc5aa (patch)
tree27cad99776afb6f6f9ce55debff02cf4dada6a52 /tests
parentc19c2ea1691955e9691a2ad7efd9bbd3044be1e8 (diff)
downloadayatana-indicator-display-ec9196ac95986edbd92596991930a430e4dcc5aa.tar.gz
ayatana-indicator-display-ec9196ac95986edbd92596991930a430e4dcc5aa.tar.bz2
ayatana-indicator-display-ec9196ac95986edbd92596991930a430e4dcc5aa.zip
in AdbdClientDest, explicitly disconnect the core::Signals at the end of the test
Diffstat (limited to 'tests')
-rw-r--r--tests/unit/adbd-client-test.cpp3
1 files changed, 2 insertions, 1 deletions
diff --git a/tests/unit/adbd-client-test.cpp b/tests/unit/adbd-client-test.cpp
index c72de9b..148a46b 100644
--- a/tests/unit/adbd-client-test.cpp
+++ b/tests/unit/adbd-client-test.cpp
@@ -73,7 +73,7 @@ TEST_F(AdbdClientFixture, SocketPlumbing)
// start an AdbdClient that listens for PKRequests
std::string pk;
auto adbd_client = std::make_shared<GAdbdClient>(socket_path);
- adbd_client->on_pk_request().connect([&pk, main_thread, test](const AdbdClient::PKRequest& req){
+ auto connection = adbd_client->on_pk_request().connect([&pk, main_thread, test](const AdbdClient::PKRequest& req){
g_debug("%s %s thread %p", G_STRLOC, G_STRFUNC, g_thread_self());
EXPECT_EQ(main_thread, g_thread_self());
g_debug("%s %s thread %p", G_STRLOC, G_STRFUNC, g_thread_self());
@@ -93,6 +93,7 @@ g_debug("%s %s thread %p", G_STRLOC, G_STRFUNC, g_thread_self());
EXPECT_EQ(test.expected_response, adbd_server->m_responses.front());
// cleanup
+ connection.disconnect();
adbd_client.reset();
adbd_server.reset();
g_unlink(socket_path.c_str());