From 90fc35b0f4766b44da7aaa159296bb0594c37a48 Mon Sep 17 00:00:00 2001 From: Dan Goodliffe Date: Thu, 24 Dec 2015 04:01:09 +0000 Subject: Remove 1ms sleep from ping, do the sleep in the test --- libpqpp/unittests/testpq.cpp | 2 ++ 1 file changed, 2 insertions(+) (limited to 'libpqpp/unittests/testpq.cpp') diff --git a/libpqpp/unittests/testpq.cpp b/libpqpp/unittests/testpq.cpp index b321075..2ff3235 100644 --- a/libpqpp/unittests/testpq.cpp +++ b/libpqpp/unittests/testpq.cpp @@ -181,6 +181,7 @@ BOOST_AUTO_TEST_CASE( reconnect ) kil->bindParamI(0, pid1); kil->execute(); delete kil; + usleep(5000); ro->ping(); int pid2 = PQbackendPID(pqconn->conn); BOOST_REQUIRE(pid2); @@ -202,6 +203,7 @@ BOOST_AUTO_TEST_CASE( reconnectInTx ) kil->bindParamI(0, pid1); kil->execute(); delete kil; + usleep(5000); BOOST_REQUIRE_THROW(ro->ping(), PQ::ConnectionError); delete ro; delete rok; -- cgit v1.2.3