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/adbd-client-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/adbd-client-test.cpp')
-rw-r--r-- | tests/unit/adbd-client-test.cpp | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/tests/unit/adbd-client-test.cpp b/tests/unit/adbd-client-test.cpp index 754f76c..d1ce740 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){ EXPECT_EQ(main_thread, g_thread_self()); g_message("in on_pk_request with %s", req.public_key.c_str()); pk = req.public_key; @@ -82,12 +82,13 @@ TEST_F(AdbdClientFixture, SocketPlumbing) // start a mock AdbdServer with to fire test key requests and wait for a response auto adbd_server = std::make_shared<GAdbdServer>(socket_path, std::vector<std::string>{test.request}); - wait_for([adbd_server](){return !adbd_server->m_responses.empty();}, 2000); + wait_for([adbd_server](){return !adbd_server->m_responses.empty();}, 5000); EXPECT_EQ(test.expected_pk, pk); ASSERT_EQ(1, adbd_server->m_responses.size()); 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()); |