diff options
author | mcorino <mcorino@ae88bc3d-4319-0410-8dbf-d08b4c9d3795> | 2009-12-10 13:44:38 +0000 |
---|---|---|
committer | mcorino <mcorino@ae88bc3d-4319-0410-8dbf-d08b4c9d3795> | 2009-12-10 13:44:38 +0000 |
commit | 3ed31cf5b60c9904f7590ce59865a35ce1b86c2c (patch) | |
tree | e9370501c3e238bf5f52fe8192243a4e491b138c /TAO/tests | |
parent | 2f09bc044958691b516c035b51b5fe473fbfdcc9 (diff) | |
download | ATCD-3ed31cf5b60c9904f7590ce59865a35ce1b86c2c.tar.gz |
Thu Dec 10 13:45:00 UTC 2009 Martin Corino <mcorino@remedy.nl>
* tests/Oneways_Invoking_Twoways/Client_Task.cpp:
* tests/Oneways_Invoking_Twoways/Receiver_i.cpp:
* tests/Oneways_Invoking_Twoways/client.cpp:
* tests/Oneways_Invoking_Twoways/Sender_i.cpp:
* tests/Oneways_Invoking_Twoways/run_test.pl:
Changed to fix problems with incorrect shutdown sequence
(see Bugzilla 2068).
Diffstat (limited to 'TAO/tests')
-rw-r--r-- | TAO/tests/Oneways_Invoking_Twoways/Client_Task.cpp | 6 | ||||
-rw-r--r-- | TAO/tests/Oneways_Invoking_Twoways/Receiver_i.cpp | 2 | ||||
-rw-r--r-- | TAO/tests/Oneways_Invoking_Twoways/Sender_i.cpp | 2 | ||||
-rw-r--r-- | TAO/tests/Oneways_Invoking_Twoways/client.cpp | 14 | ||||
-rwxr-xr-x | TAO/tests/Oneways_Invoking_Twoways/run_test.pl | 2 |
5 files changed, 15 insertions, 11 deletions
diff --git a/TAO/tests/Oneways_Invoking_Twoways/Client_Task.cpp b/TAO/tests/Oneways_Invoking_Twoways/Client_Task.cpp index 23c42f4ba1a..738d0e312ed 100644 --- a/TAO/tests/Oneways_Invoking_Twoways/Client_Task.cpp +++ b/TAO/tests/Oneways_Invoking_Twoways/Client_Task.cpp @@ -38,12 +38,6 @@ Client_Task::svc (void) // this poorly implemented test used to take while (this->receiver_impl_->no_calls_ < 10) ACE_OS::sleep (1); - - this->us_->shutdown (); - // give the processes an additional second to finish up any - // lagging invocations, cleanups etc. - ACE_OS::sleep (1); - this->sender_->shutdown (); } catch (const CORBA::Exception& ex) { diff --git a/TAO/tests/Oneways_Invoking_Twoways/Receiver_i.cpp b/TAO/tests/Oneways_Invoking_Twoways/Receiver_i.cpp index 6646e95283c..570a06fe83b 100644 --- a/TAO/tests/Oneways_Invoking_Twoways/Receiver_i.cpp +++ b/TAO/tests/Oneways_Invoking_Twoways/Receiver_i.cpp @@ -39,6 +39,6 @@ void Receiver_i::shutdown (void) { ACE_DEBUG ((LM_DEBUG, - "(%P|%t) About to invoke shudown...\n")); + "(%P|%t) About to invoke shutdown...\n")); this->orb_->shutdown (0); } diff --git a/TAO/tests/Oneways_Invoking_Twoways/Sender_i.cpp b/TAO/tests/Oneways_Invoking_Twoways/Sender_i.cpp index d7920f91791..5e408c90e49 100644 --- a/TAO/tests/Oneways_Invoking_Twoways/Sender_i.cpp +++ b/TAO/tests/Oneways_Invoking_Twoways/Sender_i.cpp @@ -50,6 +50,6 @@ void Sender_i::shutdown (void) { ACE_DEBUG ((LM_DEBUG, - "(%P|%t) About to invoke shudown...\n")); + "(%P|%t) About to invoke shutdown...\n")); this->orb_->shutdown (0); } diff --git a/TAO/tests/Oneways_Invoking_Twoways/client.cpp b/TAO/tests/Oneways_Invoking_Twoways/client.cpp index 7adc60840d8..50932a36842 100644 --- a/TAO/tests/Oneways_Invoking_Twoways/client.cpp +++ b/TAO/tests/Oneways_Invoking_Twoways/client.cpp @@ -116,8 +116,18 @@ ACE_TMAIN(int argc, ACE_TCHAR *argv[]) ACE_ERROR ((LM_ERROR, "Error activating client task\n")); } - ACE_Thread_Manager::instance ()->wait (); - + // wait for oneway sends and twoway replies to be processed + client_task.wait (); + + // shutdown server + sender->shutdown (); + + // shutdown ourself + receiver->shutdown (); + + // wait for event loop to finish + server_task.wait (); + ACE_DEBUG ((LM_DEBUG, "Event Loop finished\n")); diff --git a/TAO/tests/Oneways_Invoking_Twoways/run_test.pl b/TAO/tests/Oneways_Invoking_Twoways/run_test.pl index ade82b1de73..7f1046368ff 100755 --- a/TAO/tests/Oneways_Invoking_Twoways/run_test.pl +++ b/TAO/tests/Oneways_Invoking_Twoways/run_test.pl @@ -41,7 +41,7 @@ if ($client_status != 0) { $status = 1; } -$server_status = $SV->TerminateWaitKill ($server->ProcessStopWaitInterval()); +$server_status = $SV->WaitKill ($server->ProcessStopWaitInterval()); if ($server_status != 0) { print STDERR "ERROR: server returned $server_status\n"; |