From 29f477a7051c9bb709cc40980580f4383fe317fb Mon Sep 17 00:00:00 2001 From: mcorino Date: Thu, 10 Dec 2009 11:42:35 +0000 Subject: Thu Dec 10 11:42:00 UTC 2009 Martin Corino * tests/Bug_3672_Regression/ami_test_i.cpp: * tests/Bug_3672_Regression/client.cpp: Test did not work correctly on Windows because of timing issues. Changed to work correctly on Windows also. --- TAO/ChangeLog | 7 +++++++ TAO/tests/Bug_3672_Regression/ami_test_i.cpp | 2 ++ TAO/tests/Bug_3672_Regression/client.cpp | 23 ++++++++++++----------- 3 files changed, 21 insertions(+), 11 deletions(-) diff --git a/TAO/ChangeLog b/TAO/ChangeLog index f3d4d1aedd5..73382afbd88 100644 --- a/TAO/ChangeLog +++ b/TAO/ChangeLog @@ -1,3 +1,10 @@ +Thu Dec 10 11:42:00 UTC 2009 Martin Corino + + * tests/Bug_3672_Regression/ami_test_i.cpp: + * tests/Bug_3672_Regression/client.cpp: + Test did not work correctly on Windows because of timing issues. + Changed to work correctly on Windows also. + Thu Dec 10 10:32:56 UTC 2009 Denis Budko * orbsvcs/tests/Bug_1436_Regression/run_test.pl: diff --git a/TAO/tests/Bug_3672_Regression/ami_test_i.cpp b/TAO/tests/Bug_3672_Regression/ami_test_i.cpp index 6e3a9ea50b7..156756b90a9 100644 --- a/TAO/tests/Bug_3672_Regression/ami_test_i.cpp +++ b/TAO/tests/Bug_3672_Regression/ami_test_i.cpp @@ -38,6 +38,8 @@ AMI_Test_i::foo (CORBA::Long_out out_l) void AMI_Test_i::shutdown (void) { + ACE_OS::sleep (5); + this->orb_->shutdown (0); } diff --git a/TAO/tests/Bug_3672_Regression/client.cpp b/TAO/tests/Bug_3672_Regression/client.cpp index 8d8580aee36..5bded0fa063 100644 --- a/TAO/tests/Bug_3672_Regression/client.cpp +++ b/TAO/tests/Bug_3672_Regression/client.cpp @@ -25,7 +25,7 @@ ACE_RCSID (AMI, const ACE_TCHAR *ior = ACE_TEXT("file://test.ior"); int nthreads = 1; int niterations = 1; -int debug = 0; +int debug = 1; int number_of_replies = 0; CORBA::Long in_number = 931232; @@ -203,6 +203,8 @@ ACE_TMAIN(int argc, ACE_TCHAR *argv[]) A::AMI_AMI_TestHandler_var hello = A::AMI_AMI_TestHandler::_narrow (object2.in ()); object2 = CORBA::Object::_nil (); + server->shutdown (); // oneway, so returns here immediately but server waits 5 sec + Client client (server.in (), niterations, hello.in ()); if (client.activate (THR_NEW_LWP | THR_JOINABLE, nthreads) != 0) @@ -234,8 +236,6 @@ ACE_TMAIN(int argc, ACE_TCHAR *argv[]) ACE_DEBUG ((LM_DEBUG, "threads finished\n")); - server->shutdown (); - client.wait (); tv = ACE_Time_Value (1,0); @@ -253,24 +253,25 @@ ACE_TMAIN(int argc, ACE_TCHAR *argv[]) poa_manager = PortableServer::POAManager::_nil (); client.clear (); - TAO_ORB_Core* core = orb->orb_core (); - orb->shutdown (); orb->destroy (); - CORBA::ULong core_count = core->_refcnt(); - if (core_count > 1) - { - ACE_DEBUG ((LM_DEBUG, ACE_TEXT("Refcount core %d\n"), core_count)); - ++parameter_corruption; - } CORBA::ULong ref_count = orb->_refcnt(); if (ref_count > 1) { ACE_DEBUG ((LM_DEBUG, ACE_TEXT("Refcount orb %d\n"), ref_count)); ++parameter_corruption; } + else + { + TAO_ORB_Core* core = orb->orb_core (); + if (core != 0) + { + ACE_DEBUG ((LM_DEBUG, ACE_TEXT("Core <> null\n"))); + ++parameter_corruption; + } + } orb = CORBA::ORB::_nil (); } catch (const CORBA::Exception& ex) -- cgit v1.2.1