diff options
author | levine <levine@ae88bc3d-4319-0410-8dbf-d08b4c9d3795> | 1999-05-10 18:33:04 +0000 |
---|---|---|
committer | levine <levine@ae88bc3d-4319-0410-8dbf-d08b4c9d3795> | 1999-05-10 18:33:04 +0000 |
commit | 0540bd28bea37a5a18e997301ba36eb0a3815656 (patch) | |
tree | ddaee83eb6fcd7e2585050a842322cc9ca9f6b7f /tests/Conn_Test.cpp | |
parent | 7a39983deb1566c029993d48da83f3591c69ca77 (diff) | |
download | ATCD-0540bd28bea37a5a18e997301ba36eb0a3815656.tar.gz |
(spawn_threads): wait a maximum of 200 seconds. Carlos reported that
the test sometimes hangs on Irix.
Diffstat (limited to 'tests/Conn_Test.cpp')
-rw-r--r-- | tests/Conn_Test.cpp | 15 |
1 files changed, 14 insertions, 1 deletions
diff --git a/tests/Conn_Test.cpp b/tests/Conn_Test.cpp index 816ec732e6b..30026663797 100644 --- a/tests/Conn_Test.cpp +++ b/tests/Conn_Test.cpp @@ -638,7 +638,20 @@ spawn_threads (ACCEPTOR *acceptor, ASYS_TEXT ("client thread create failed"))); // Wait for the threads to exit. - ACE_Thread_Manager::instance ()->wait (); + // But, wait for a limited time because sometimes the test hangs on Irix. + const ACE_Time_Value max_wait (200 /* seconds */); + const ACE_Time_Value wait_time (ACE_OS::gettimeofday () + max_wait); + if (ACE_Thread_Manager::instance ()->wait (&wait_time) == -1) + { + if (errno == ETIME) + ACE_ERROR ((LM_ERROR, + ASYS_TEXT ("maximum wait time of %d msec exceeded\n"), + max_wait.msec ())); + else + ACE_OS::perror ("wait"); + + status = -1; + } #if defined (VXWORKS) for (i = 0; i < n_servers; ++i) |