diff options
author | Charles Kerr <charles.kerr@canonical.com> | 2016-09-22 13:59:03 -0500 |
---|---|---|
committer | Charles Kerr <charles.kerr@canonical.com> | 2016-09-22 13:59:03 -0500 |
commit | 42e7cc5b9c1c4053112d570b94689f11219b71ce (patch) | |
tree | c9341bde836a151d5cf6ef74241cbdc5d037f1bb /tests | |
parent | 0236d509029b91b496faf0c3a0b06be25a0af9a3 (diff) | |
download | ayatana-indicator-display-42e7cc5b9c1c4053112d570b94689f11219b71ce.tar.gz ayatana-indicator-display-42e7cc5b9c1c4053112d570b94689f11219b71ce.tar.bz2 ayatana-indicator-display-42e7cc5b9c1c4053112d570b94689f11219b71ce.zip |
in UsbSnapTest, explicitly disconnect the core::Signals at the end of the test
Diffstat (limited to 'tests')
-rw-r--r-- | tests/unit/usb-snap-test.cpp | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/tests/unit/usb-snap-test.cpp b/tests/unit/usb-snap-test.cpp index 3b778dd..53548f4 100644 --- a/tests/unit/usb-snap-test.cpp +++ b/tests/unit/usb-snap-test.cpp @@ -88,7 +88,7 @@ TEST_F(UsbSnapFixture, TestRoundTrip) auto snap = std::make_shared<UsbSnap>(test.fingerprint); AdbdClient::PKResponse user_response {}; bool user_response_set = false; - snap->on_user_response().connect([&user_response,&user_response_set](AdbdClient::PKResponse response, bool /*remember*/){ + auto connection = snap->on_user_response().connect([&user_response,&user_response_set](AdbdClient::PKResponse response, bool /*remember*/){ user_response = response; user_response_set = true; }); @@ -131,6 +131,7 @@ TEST_F(UsbSnapFixture, TestRoundTrip) ASSERT_EQ(test.expected_response, user_response); // confirm that the snap dtor cleans up the notification + connection.disconnect(); snap.reset(); wait_for_signals(notificationsSpy, 1); { |