summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMarijke Hengstmengel <MHengstmengel@users.noreply.github.com>2011-11-01 14:36:19 +0000
committerMarijke Hengstmengel <MHengstmengel@users.noreply.github.com>2011-11-01 14:36:19 +0000
commit5abb24cfd6854bea549445b4ab6e4514a67d93f7 (patch)
tree7c5d2c614438b3d963f42643284c20ac80794a80
parent323815eec6085798f28a7f84d7cabc516d9ac969 (diff)
downloadATCD-5abb24cfd6854bea549445b4ab6e4514a67d93f7.tar.gz
Tue Nov 01 14:34:13 UTC 2011 Marijke Hengstmengel <mhengstmengel@remedy.nl>
* On_Demand_Act_Direct_Coll/Collocated_Test.cpp: * On_Demand_Act_Direct_Coll/test_i.cpp: * On_Demand_Act_Direct_Coll/test_i.h: * On_Demand_Act_Direct_Coll/Client_Task.cpp: * On_Demand_Act_Direct_Coll/test.idl: Clean up test.
-rw-r--r--TAO/ChangeLog11
-rw-r--r--TAO/tests/POA/On_Demand_Act_Direct_Coll/Client_Task.cpp4
-rw-r--r--TAO/tests/POA/On_Demand_Act_Direct_Coll/Collocated_Test.cpp12
-rw-r--r--TAO/tests/POA/On_Demand_Act_Direct_Coll/test.idl2
-rw-r--r--TAO/tests/POA/On_Demand_Act_Direct_Coll/test_i.cpp9
-rw-r--r--TAO/tests/POA/On_Demand_Act_Direct_Coll/test_i.h4
6 files changed, 22 insertions, 20 deletions
diff --git a/TAO/ChangeLog b/TAO/ChangeLog
index e857770d88b..59601c63f34 100644
--- a/TAO/ChangeLog
+++ b/TAO/ChangeLog
@@ -1,4 +1,13 @@
-Thu Nov 01 10:54:13 UTC 2011 Martin Corino <mcorino@remedy.nl>
+Tue Nov 01 14:34:13 UTC 2011 Marijke Hengstmengel <mhengstmengel@remedy.nl>
+ * On_Demand_Act_Direct_Coll/Collocated_Test.cpp:
+ * On_Demand_Act_Direct_Coll/test_i.cpp:
+ * On_Demand_Act_Direct_Coll/test_i.h:
+ * On_Demand_Act_Direct_Coll/Client_Task.cpp:
+ * On_Demand_Act_Direct_Coll/test.idl:
+ Clean up test.
+
+
+Tue Nov 01 10:54:13 UTC 2011 Martin Corino <mcorino@remedy.nl>
Merged changes from Remedy SA work branch.
diff --git a/TAO/tests/POA/On_Demand_Act_Direct_Coll/Client_Task.cpp b/TAO/tests/POA/On_Demand_Act_Direct_Coll/Client_Task.cpp
index 4fba2c2949b..50882492aad 100644
--- a/TAO/tests/POA/On_Demand_Act_Direct_Coll/Client_Task.cpp
+++ b/TAO/tests/POA/On_Demand_Act_Direct_Coll/Client_Task.cpp
@@ -53,7 +53,6 @@ Client_Task::svc (void)
ACE_DEBUG ((LM_DEBUG, "(%P|%t) - OK , correct string returned <%C>\n",
the_string.in ()));
}
- test->shutdown ();
}
catch (const CORBA::INTERNAL&)
{
@@ -72,6 +71,7 @@ Client_Task::svc (void)
status = 1;
}
corb_->destroy ();
+ return 1;
}
}
catch (const CORBA::Exception& ex)
@@ -79,7 +79,7 @@ Client_Task::svc (void)
ex._tao_print_exception ("Exception caught:");
status = 1;
}
-
+ corb_->destroy ();
return status;
}
diff --git a/TAO/tests/POA/On_Demand_Act_Direct_Coll/Collocated_Test.cpp b/TAO/tests/POA/On_Demand_Act_Direct_Coll/Collocated_Test.cpp
index 47ac698d0f9..741fb6c3ba6 100644
--- a/TAO/tests/POA/On_Demand_Act_Direct_Coll/Collocated_Test.cpp
+++ b/TAO/tests/POA/On_Demand_Act_Direct_Coll/Collocated_Test.cpp
@@ -9,6 +9,8 @@
const ACE_TCHAR *output = ACE_TEXT("test.ior");
const ACE_TCHAR *input = ACE_TEXT("file://test.ior");
CORBA::Boolean exception_occured = false;
+ACE_CString server_orb;
+ACE_CString client_orb;
int
parse_args (int argc, ACE_TCHAR *argv[])
@@ -55,7 +57,8 @@ ACE_TMAIN(int argc, ACE_TCHAR *argv[])
ACE_Argv_Type_Converter satc (argc, argv);
CORBA::ORB_var sorb =
CORBA::ORB_init (satc.get_argc (),
- satc.get_TCHAR_argv ());
+ satc.get_TCHAR_argv (),
+ server_orb.c_str());
ACE_Manual_Event me;
Server_Task server_task (output,
@@ -75,7 +78,8 @@ ACE_TMAIN(int argc, ACE_TCHAR *argv[])
ACE_Argv_Type_Converter catc (argc, argv);
CORBA::ORB_var corb =
CORBA::ORB_init (catc.get_argc (),
- catc.get_TCHAR_argv ());
+ catc.get_TCHAR_argv (),
+ client_orb.c_str());
Client_Task client_task (input,
corb.in (),
@@ -94,6 +98,10 @@ ACE_TMAIN(int argc, ACE_TCHAR *argv[])
// Now that all threads have completed we can destroy the ORB
sorb->destroy ();
+ if (server_orb != client_orb)
+ {
+ corb->destroy();
+ }
}
catch (const CORBA::Exception&)
{
diff --git a/TAO/tests/POA/On_Demand_Act_Direct_Coll/test.idl b/TAO/tests/POA/On_Demand_Act_Direct_Coll/test.idl
index 99a913cf6f0..ccb6713f7d3 100644
--- a/TAO/tests/POA/On_Demand_Act_Direct_Coll/test.idl
+++ b/TAO/tests/POA/On_Demand_Act_Direct_Coll/test.idl
@@ -8,6 +8,4 @@ interface test
void method ();
// A twoway operation.
- void shutdown ();
- // Shutdown the server.
};
diff --git a/TAO/tests/POA/On_Demand_Act_Direct_Coll/test_i.cpp b/TAO/tests/POA/On_Demand_Act_Direct_Coll/test_i.cpp
index 41cd3c13348..1deaae764e1 100644
--- a/TAO/tests/POA/On_Demand_Act_Direct_Coll/test_i.cpp
+++ b/TAO/tests/POA/On_Demand_Act_Direct_Coll/test_i.cpp
@@ -47,12 +47,3 @@ test_i::get_string (void)
return CORBA::string_dup ("Hello there!");
}
-void
-test_i::shutdown (void)
-{
- // Give the client thread time to return from the collocated
- // call to this method before shutting down the ORB. We sleep
- // to avoid BAD_INV_ORDER exceptions on fast dual processor machines.
- ACE_OS::sleep (1);
- this->orb_->shutdown (0);
-}
diff --git a/TAO/tests/POA/On_Demand_Act_Direct_Coll/test_i.h b/TAO/tests/POA/On_Demand_Act_Direct_Coll/test_i.h
index 44c4a114aea..b4937835efb 100644
--- a/TAO/tests/POA/On_Demand_Act_Direct_Coll/test_i.h
+++ b/TAO/tests/POA/On_Demand_Act_Direct_Coll/test_i.h
@@ -29,10 +29,6 @@ public:
char *
get_string (void);
- /// Shutdown the ORB
- void shutdown (void);
-
-
protected:
/// Our ORB.
CORBA::ORB_var orb_;