summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorelliott_c <ocielliottc@users.noreply.github.com>2007-01-08 18:44:32 +0000
committerelliott_c <ocielliottc@users.noreply.github.com>2007-01-08 18:44:32 +0000
commitcfeb98e2a2ab7e02338c6704717fafdd2baf2904 (patch)
treeee982a7e46f07793b316763312cd99bec5e35b63
parenta2b8eda5d51dca5496c94600a7d3082b1a5f3601 (diff)
downloadATCD-cfeb98e2a2ab7e02338c6704717fafdd2baf2904.tar.gz
ChangeLogTag: Mon Jan 8 18:43:36 UTC 2007 Chad Elliott <elliott_c@ociweb.com>
-rw-r--r--ACE/ChangeLog7
-rw-r--r--ACE/tests/Bug_2540_Regression_Test.cpp16
2 files changed, 16 insertions, 7 deletions
diff --git a/ACE/ChangeLog b/ACE/ChangeLog
index 0412b314429..30ef2090730 100644
--- a/ACE/ChangeLog
+++ b/ACE/ChangeLog
@@ -1,3 +1,10 @@
+Mon Jan 8 18:43:36 UTC 2007 Chad Elliott <elliott_c@ociweb.com>
+
+ * tests/Bug_2540_Regression_Test.cpp:
+
+ This test had the same problem as Bug_1890_Regression_Test.cpp.
+ Explicitly use the ACE_Select_Reactor.
+
Mon Jan 8 17:58:46 UTC 2007 Chad Elliott <elliott_c@ociweb.com>
* tests/Bug_1890_Regression_Test.cpp:
diff --git a/ACE/tests/Bug_2540_Regression_Test.cpp b/ACE/tests/Bug_2540_Regression_Test.cpp
index 72cd831cd8f..8999ee851c2 100644
--- a/ACE/tests/Bug_2540_Regression_Test.cpp
+++ b/ACE/tests/Bug_2540_Regression_Test.cpp
@@ -14,7 +14,7 @@
#include "ace/Pipe.h"
#include "ace/Event_Handler.h"
-#include "ace/Reactor.h"
+#include "ace/Select_Reactor.h"
ACE_RCSID (tests,
Bug_2540_Regression_Test,
@@ -67,7 +67,7 @@ private:
* in a repeating interval. On the first @c initial_iterations the Timer
* writes data through all of its handlers. On iteration @c initial_iteration
* it triggers bug 2540 by removing two handlers from the reactor.
- *
+ *
*/
class Timer : public ACE_Event_Handler
{
@@ -99,18 +99,19 @@ run_main (int, ACE_TCHAR *[])
{
ACE_START_TEST (ACE_TEXT ("Bug_2540_Regression_Test"));
- ACE_Reactor * reactor = ACE_Reactor::instance();
+ ACE_Select_Reactor select_reactor;
+ ACE_Reactor reactor (&select_reactor);
// Create the timer, this is the main driver for the test
Timer * timer = new Timer;
// Initialize the timer and register with the reactor
- if (-1 == timer->open(reactor))
+ if (-1 == timer->open(&reactor))
{
ACE_ERROR_RETURN ((LM_ERROR, "Cannot initialize timer\n"), -1);
}
- reactor->run_reactor_event_loop();
+ reactor.run_reactor_event_loop();
// Verify that the results are what we expect
if (!timer->check_expected_results())
@@ -120,6 +121,7 @@ run_main (int, ACE_TCHAR *[])
// Cleanup
timer->close();
+ delete timer;
ACE_END_TEST;
@@ -254,7 +256,7 @@ int Timer::handle_timeout(ACE_Time_Value const &, void const *)
// The first iterations are there just to prime things.
return 0;
}
-
+
if (iteration_ == initial_iterations)
{
// We expect the special_handler() to work normally after this
@@ -279,7 +281,7 @@ int Timer::handle_timeout(ACE_Time_Value const &, void const *)
return 0;
}
- reactor()->end_event_loop();
+ reactor()->end_reactor_event_loop();
return 0;
}