From 11a865805ed8645ffa3009b0fec78e12c9ed30ee Mon Sep 17 00:00:00 2001 From: Andrew Johnson Date: Mon, 11 Dec 2006 16:52:36 +0000 Subject: [PATCH] Make test bail out if socket bind fails; usually there's a CAS running. --- src/libCom/test/blockingSockTest.cpp | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/libCom/test/blockingSockTest.cpp b/src/libCom/test/blockingSockTest.cpp index 21c198b1a..84a869527 100644 --- a/src/libCom/test/blockingSockTest.cpp +++ b/src/libCom/test/blockingSockTest.cpp @@ -170,7 +170,10 @@ server::server ( const address & addrIn ) : address tmpAddr = addrIn; int status = bind ( this->sock, & tmpAddr.sa, sizeof ( tmpAddr ) ); - assert ( status == 0 ); + if ( status ) { + testDiag ( "bind to server socket failed, status = %d", status ); + testAbort ( "Stop all CA servers before running this test." ); + } status = listen ( this->sock, 10 ); assert ( status == 0 ); }