summaryrefslogtreecommitdiff
path: root/ACE/tests/Reactor_Dispatch_Order_Test.cpp
diff options
context:
space:
mode:
authorSteve Huston <shuston@riverace.com>2008-10-06 22:32:10 +0000
committerSteve Huston <shuston@riverace.com>2008-10-06 22:32:10 +0000
commitcb289f9bce17c048a99b9ffd0e6c4613a41e1938 (patch)
tree7b1d2e96fb1d38ff093ed3450dc0cc85b3c0c39e /ACE/tests/Reactor_Dispatch_Order_Test.cpp
parent0495118ccb567fd6529deace2fe3cb03be01e20d (diff)
downloadATCD-cb289f9bce17c048a99b9ffd0e6c4613a41e1938.tar.gz
ChangeLogTag:Mon Oct 6 22:27:54 UTC 2008 Steve Huston <shuston@riverace.com>
Diffstat (limited to 'ACE/tests/Reactor_Dispatch_Order_Test.cpp')
-rw-r--r--ACE/tests/Reactor_Dispatch_Order_Test.cpp27
1 files changed, 23 insertions, 4 deletions
diff --git a/ACE/tests/Reactor_Dispatch_Order_Test.cpp b/ACE/tests/Reactor_Dispatch_Order_Test.cpp
index 08299c20094..8c5e63e565c 100644
--- a/ACE/tests/Reactor_Dispatch_Order_Test.cpp
+++ b/ACE/tests/Reactor_Dispatch_Order_Test.cpp
@@ -200,12 +200,19 @@ test_reactor_dispatch_order (ACE_Reactor &reactor)
// Suspend the handlers - only the timer should be dispatched
ACE_Time_Value tv (1);
reactor.suspend_handlers ();
- reactor.run_reactor_event_loop (tv);
+ if (0 != reactor.run_reactor_event_loop (tv))
+ {
+ ACE_ERROR ((LM_ERROR,
+ ACE_TEXT ("%p\n"),
+ ACE_TEXT ("run_reactor_event_loop")));
+ ok_to_go = false;
+ }
// only the timer should have fired
if (handler.dispatch_order_ != 2)
{
- ACE_ERROR ((LM_ERROR, ACE_TEXT ("Incorrect number fired %d\n"),
+ ACE_ERROR ((LM_ERROR,
+ ACE_TEXT ("Incorrect number fired %d; expected 2\n"),
handler.dispatch_order_));
ok_to_go = false;
}
@@ -225,7 +232,13 @@ test_reactor_dispatch_order (ACE_Reactor &reactor)
if (ok_to_go)
{
- reactor.run_reactor_event_loop (tv);
+ if (0 != reactor.run_reactor_event_loop (tv))
+ {
+ ACE_ERROR ((LM_ERROR,
+ ACE_TEXT ("%p\n"),
+ ACE_TEXT ("run_reactor_event_loop 2")));
+ ok_to_go = false;
+ }
}
if (0 != reactor.remove_handler (handler.pipe_.read_handle (),
@@ -237,11 +250,17 @@ test_reactor_dispatch_order (ACE_Reactor &reactor)
if (handler.dispatch_order_ != 4)
{
- ACE_ERROR ((LM_ERROR, ACE_TEXT ("Incorrect number fired %d\n"),
+ ACE_ERROR ((LM_ERROR,
+ ACE_TEXT ("Incorrect number fired %d; expected 4\n"),
handler.dispatch_order_));
ok_to_go = false;
}
+ int nr_cancelled = reactor.cancel_timer (&handler);
+ if (nr_cancelled > 0)
+ ACE_ERROR ((LM_ERROR,
+ ACE_TEXT ("Finishing test with %d timers still scheduled\n"),
+ nr_cancelled));
return ok_to_go;
}