diff options
author | Charles Kerr <charles.kerr@canonical.com> | 2016-10-21 14:19:54 +0000 |
---|---|---|
committer | Bileto Bot <ci-train-bot@canonical.com> | 2016-10-21 14:19:54 +0000 |
commit | 3def83e1c5c34f63a3d36c4fff7f99a4d903a70f (patch) | |
tree | 337b9695c99dde56b25d6b20a20563adfb82bd41 /tests/unit/usb-snap-test.cpp | |
parent | 4f079d2faa6dd24f7ccd0566c4820a835fccce6a (diff) | |
parent | 7002fc4e6a6496fb5c0d3294540c957787689847 (diff) | |
download | ayatana-indicator-display-3def83e1c5c34f63a3d36c4fff7f99a4d903a70f.tar.gz ayatana-indicator-display-3def83e1c5c34f63a3d36c4fff7f99a4d903a70f.tar.bz2 ayatana-indicator-display-3def83e1c5c34f63a3d36c4fff7f99a4d903a70f.zip |
Fix test error in adbd-client-test
Approved by: unity-api-1-bot
Diffstat (limited to 'tests/unit/usb-snap-test.cpp')
-rw-r--r-- | tests/unit/usb-snap-test.cpp | 13 |
1 files changed, 4 insertions, 9 deletions
diff --git a/tests/unit/usb-snap-test.cpp b/tests/unit/usb-snap-test.cpp index 3b778dd..2be4b27 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; }); @@ -130,14 +130,9 @@ TEST_F(UsbSnapFixture, TestRoundTrip) EXPECT_TRUE(user_response_set); ASSERT_EQ(test.expected_response, user_response); - // confirm that the snap dtor cleans up the notification + // confirm that the snap dtor doesn't try to close + // the notification that's already been closed by user choice snap.reset(); - wait_for_signals(notificationsSpy, 1); - { - QVariantList const& call(notificationsSpy.at(0)); - EXPECT_EQ("CloseNotification", call.at(0)); - QVariantList const& args(call.at(1).toList()); - EXPECT_EQ(id, args.at(0)); - } + EXPECT_FALSE(notificationsSpy.wait(1000)); } } |