BIND 10 trac499, updated. 7c38ee8fabb2f93c83495e45c58a37712da25e67 [trac499] Change where client's asynchronous send is waited for

BIND 10 source code commits bind10-changes at lists.isc.org
Wed Mar 9 18:12:02 UTC 2011


The branch, trac499 has been updated
       via  7c38ee8fabb2f93c83495e45c58a37712da25e67 (commit)
      from  b1bc4d63d568d15f6b21a3c25a2848bea2553ff7 (commit)

Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.

- Log -----------------------------------------------------------------
commit 7c38ee8fabb2f93c83495e45c58a37712da25e67
Author: Stephen Morris <stephen at isc.org>
Date:   Wed Mar 9 18:09:09 2011 +0000

    [trac499] Change where client's asynchronous send is waited for
    
    Previously the client sent a message asynchronously to the server and the
    server synchronously received it.  Then the code waited for the client send
    to complete.  However, this hangs under Solaris.  So now the wait occurs after
    the asynchronous send but before the synchronous receive, which Solaris can
    apparently cope with.

-----------------------------------------------------------------------

Summary of changes:
 src/lib/asiolink/tests/tcp_socket_unittest.cc |    7 ++++---
 1 files changed, 4 insertions(+), 3 deletions(-)

-----------------------------------------------------------------------
diff --git a/src/lib/asiolink/tests/tcp_socket_unittest.cc b/src/lib/asiolink/tests/tcp_socket_unittest.cc
index 11267c9..f0a45ee 100644
--- a/src/lib/asiolink/tests/tcp_socket_unittest.cc
+++ b/src/lib/asiolink/tests/tcp_socket_unittest.cc
@@ -380,12 +380,13 @@ TEST(TCPSocket, SequenceTest) {
     client_cb.length() = 0;
     client.asyncSend(OUTBOUND_DATA, sizeof(OUTBOUND_DATA), &server_endpoint, client_cb);
 
+    // Wait for the client callback to complete. (Must do this first on
+    // Solaris: if we do the synchronous read first, the test hangs.)
+    service.run_one();
+
     // Synchronously read the data from the server.;
     serverRead(server_socket, server_cb);
 
-    // Wait for the client callback to complete.
-    service.run_one();
-
     // Check the client state
     EXPECT_EQ(TCPCallback::WRITE, client_cb.called());
     EXPECT_EQ(0, client_cb.getCode());




More information about the bind10-changes mailing list