]> git.ipfire.org Git - thirdparty/kea.git/commitdiff
[4009] Fixed the failing unit test
authorFrancis Dupont <fdupont@isc.org>
Fri, 4 Sep 2015 11:56:46 +0000 (13:56 +0200)
committerFrancis Dupont <fdupont@isc.org>
Fri, 4 Sep 2015 11:56:46 +0000 (13:56 +0200)
src/lib/asiolink/tests/tcp_socket_unittest.cc

index 80584cee4885427c4baa23c8fd0e42d78eada181..2f4a4de6fbdff04d002001b28b0df14f2d6728c5 100644 (file)
@@ -464,8 +464,14 @@ TEST(TCPSocket, sequenceTest) {
             }
         }
 
+       // Has the client run?
         if (!client_complete) {
 
+           if (client_cb.called() != client_cb.queued()) {
+               // No. Run the service another time.
+               continue;
+           }
+
             // Client callback must have run.  Check that it ran OK.
             EXPECT_EQ(TCPCallback::READ, client_cb.called());
             EXPECT_EQ(0, client_cb.getCode());