summaryrefslogtreecommitdiff
path: root/TAO/tests/Timeout
diff options
context:
space:
mode:
authorcoryan <coryan@ae88bc3d-4319-0410-8dbf-d08b4c9d3795>2001-04-24 08:02:58 +0000
committercoryan <coryan@ae88bc3d-4319-0410-8dbf-d08b4c9d3795>2001-04-24 08:02:58 +0000
commitffb827a2938294145c0c74d7e06d837236d29694 (patch)
tree8c0bc2f7aa508472a4fd98dfca9d6afd60130f52 /TAO/tests/Timeout
parentd01a55ccd330806cac88d2e978e6d3d59a844bef (diff)
downloadATCD-ffb827a2938294145c0c74d7e06d837236d29694.tar.gz
ChangeLogTag:Tue Apr 24 00:21:54 2001 Carlos O'Ryan <coryan@uci.edu>
Diffstat (limited to 'TAO/tests/Timeout')
-rw-r--r--TAO/tests/Timeout/client.cpp23
1 files changed, 22 insertions, 1 deletions
diff --git a/TAO/tests/Timeout/client.cpp b/TAO/tests/Timeout/client.cpp
index 124d806be64..11e3f62e6a3 100644
--- a/TAO/tests/Timeout/client.cpp
+++ b/TAO/tests/Timeout/client.cpp
@@ -47,6 +47,9 @@ parse_args (int argc, char *argv[])
return 0;
}
+static int timeout_count = 0;
+static int in_time_count = 0;
+
void
send_echo (CORBA::ORB_ptr orb,
Simple_Server_ptr server,
@@ -58,9 +61,12 @@ send_echo (CORBA::ORB_ptr orb,
server->echo (0, t, ACE_TRY_ENV);
ACE_TRY_CHECK;
+ in_time_count++;
}
ACE_CATCH (CORBA::TIMEOUT, timeout)
{
+ timeout_count++;
+
// Trap this exception and continue...
// ACE_DEBUG ((LM_DEBUG,
// "==> Trapped a TIMEOUT exception (expected)\n"));
@@ -242,10 +248,25 @@ int main (int argc, char* argv[])
server->shutdown (ACE_TRY_ENV);
ACE_TRY_CHECK;
+
+ if (timeout_count == 0)
+ {
+ ACE_ERROR ((LM_ERROR, "ERROR: No messaged timed out\n"));
+ }
+ if (in_time_count == 0)
+ {
+ ACE_ERROR ((LM_ERROR, "ERROR: No messages on time\n"));
+ }
+
+ ACE_DEBUG ((LM_DEBUG, "In time = %d, timed out = %d\n",
+ in_time_count, timeout_count));
+
+ orb->destroy (ACE_TRY_ENV);
+ ACE_TRY_CHECK;
}
ACE_CATCHANY
{
- ACE_PRINT_EXCEPTION (ACE_ANY_EXCEPTION, "Catched exception:");
+ ACE_PRINT_EXCEPTION (ACE_ANY_EXCEPTION, "Exception caught:");
return 1;
}
ACE_ENDTRY;