diff options
Diffstat (limited to 'ACE/TAO/tests/Bug_2935_Regression/source_i.cpp')
-rw-r--r-- | ACE/TAO/tests/Bug_2935_Regression/source_i.cpp | 52 |
1 files changed, 52 insertions, 0 deletions
diff --git a/ACE/TAO/tests/Bug_2935_Regression/source_i.cpp b/ACE/TAO/tests/Bug_2935_Regression/source_i.cpp new file mode 100644 index 00000000000..60da616a755 --- /dev/null +++ b/ACE/TAO/tests/Bug_2935_Regression/source_i.cpp @@ -0,0 +1,52 @@ +//$Id$ +#include "source_i.h" + +Source_i::Source_i (ThreeTier_ptr target) + : target_(ThreeTier::_duplicate(target)) + , counter_(5)//1000000) +{ +} + +Source_i::~Source_i () +{ +} + +bool +Source_i::parse_args(int, ACE_TCHAR *[]) +{ + return true; +} + +int +Source_i::run () +{ + try + { + for(size_t loop = 0; loop < counter_; ++loop) + { + // call a 'nop' method on the server + target_->tick(); +// target_->tock(); + // this sleep can be used give the middle tier a chance + // to catch up. +// ACE_OS::sleep(3); + } + unsigned long tickCount = target_->tickCount(); + unsigned long tockCount = target_->tockCount(); + + ACE_DEBUG ((LM_DEBUG, + "Count of ticks: %d tocks: %d\n", + (int)tickCount, (int)tockCount)); + + target_->shutdown (); + + } + catch (const CORBA::Exception& ex) + { + ex._tao_print_exception ("\tSOURCE: Exception"); + return -1; + } + + return 0; +} + |