summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJohnny Willemsen <jwillemsen@remedy.nl>2012-01-20 19:01:49 +0000
committerJohnny Willemsen <jwillemsen@remedy.nl>2012-01-20 19:01:49 +0000
commit4b1a78b382163a9387effc78b9640cb73eaed2ba (patch)
tree5bf2fda1c6d557d590e01e257fb6b7aa974a0aa2
parent66591af8b96837aaf51de9feafdef7f07dfc4350 (diff)
downloadATCD-4b1a78b382163a9387effc78b9640cb73eaed2ba.tar.gz
Fri Jan 20 19:01:04 UTC 2012 Johnny Willemsen <jwillemsen@remedy.nl>
* tests/Bug_1670_Regression/Test.idl: * tests/Bug_1670_Regression/client.cpp: * tests/Bug_1670_Regression/run_test.pl: * tests/Bug_1670_Regression/server.cpp: Fixed gcc warning, added shutdown method to the server to get a clean shutdown without hundreds of valgrind errors
-rw-r--r--TAO/ChangeLog9
-rw-r--r--TAO/tests/Bug_1670_Regression/Test.idl1
-rw-r--r--TAO/tests/Bug_1670_Regression/client.cpp51
-rwxr-xr-xTAO/tests/Bug_1670_Regression/run_test.pl2
-rw-r--r--TAO/tests/Bug_1670_Regression/server.cpp33
5 files changed, 71 insertions, 25 deletions
diff --git a/TAO/ChangeLog b/TAO/ChangeLog
index 271c5bac481..eb6ee96ff48 100644
--- a/TAO/ChangeLog
+++ b/TAO/ChangeLog
@@ -1,3 +1,12 @@
+Fri Jan 20 19:01:04 UTC 2012 Johnny Willemsen <jwillemsen@remedy.nl>
+
+ * tests/Bug_1670_Regression/Test.idl:
+ * tests/Bug_1670_Regression/client.cpp:
+ * tests/Bug_1670_Regression/run_test.pl:
+ * tests/Bug_1670_Regression/server.cpp:
+ Fixed gcc warning, added shutdown method to the server to get
+ a clean shutdown without hundreds of valgrind errors
+
Fri Jan 20 18:50:58 UTC 2012 Johnny Willemsen <jwillemsen@remedy.nl>
* tests/Portable_Interceptors/Bug_2088/client.cpp:
diff --git a/TAO/tests/Bug_1670_Regression/Test.idl b/TAO/tests/Bug_1670_Regression/Test.idl
index de8c78c10db..54cd99ba20a 100644
--- a/TAO/tests/Bug_1670_Regression/Test.idl
+++ b/TAO/tests/Bug_1670_Regression/Test.idl
@@ -27,5 +27,6 @@ module Baz
interface C : Foo::Bar::A, Foo::Bar::B
{
long op4();
+ oneway void shutdown ();
};
};
diff --git a/TAO/tests/Bug_1670_Regression/client.cpp b/TAO/tests/Bug_1670_Regression/client.cpp
index 55b72d0407f..4410942b916 100644
--- a/TAO/tests/Bug_1670_Regression/client.cpp
+++ b/TAO/tests/Bug_1670_Regression/client.cpp
@@ -65,16 +65,36 @@ ACE_TMAIN(int argc, ACE_TCHAR *argv[])
CORBA::Long result;
result = cobject->op1 ();
- ACE_ASSERT(result == 1);
+ if (result != 1)
+ {
+ ACE_ERROR_RETURN ((LM_ERROR,
+ "Result not 1\n"),
+ 1);
+ }
result = cobject->op2 ();
- ACE_ASSERT(result == 2);
+ if (result != 2)
+ {
+ ACE_ERROR_RETURN ((LM_ERROR,
+ "Result not 2\n"),
+ 1);
+ }
result = cobject->op3 ();
- ACE_ASSERT(result == 3);
+ if (result != 3)
+ {
+ ACE_ERROR_RETURN ((LM_ERROR,
+ "Result not 3\n"),
+ 1);
+ }
result = cobject->op4 ();
- ACE_ASSERT(result == 4);
+ if (result != 4)
+ {
+ ACE_ERROR_RETURN ((LM_ERROR,
+ "Result not 4\n"),
+ 1);
+ }
Foo::Bar::B_var bobject =
Foo::Bar::B::_narrow (object.in ());
@@ -88,7 +108,12 @@ ACE_TMAIN(int argc, ACE_TCHAR *argv[])
}
result = bobject->op3 ();
- ACE_ASSERT(result == 3);
+ if (result != 3)
+ {
+ ACE_ERROR_RETURN ((LM_ERROR,
+ "Result not 3\n"),
+ 1);
+ }
Foo::Bar::A_var aobject =
Foo::Bar::A::_narrow (object.in ());
@@ -102,10 +127,22 @@ ACE_TMAIN(int argc, ACE_TCHAR *argv[])
}
result = aobject->op1 ();
- ACE_ASSERT(result == 1);
+ if (result != 1)
+ {
+ ACE_ERROR_RETURN ((LM_ERROR,
+ "Result not 1\n"),
+ 1);
+ }
result = aobject->op2 ();
- ACE_ASSERT(result == 2);
+ if (result != 2)
+ {
+ ACE_ERROR_RETURN ((LM_ERROR,
+ "Result not 2\n"),
+ 1);
+ }
+
+ cobject->shutdown ();
orb->destroy ();
}
diff --git a/TAO/tests/Bug_1670_Regression/run_test.pl b/TAO/tests/Bug_1670_Regression/run_test.pl
index e685627fe93..80e8a03725c 100755
--- a/TAO/tests/Bug_1670_Regression/run_test.pl
+++ b/TAO/tests/Bug_1670_Regression/run_test.pl
@@ -60,7 +60,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";
diff --git a/TAO/tests/Bug_1670_Regression/server.cpp b/TAO/tests/Bug_1670_Regression/server.cpp
index b8738e8c0ef..2761b836f4b 100644
--- a/TAO/tests/Bug_1670_Regression/server.cpp
+++ b/TAO/tests/Bug_1670_Regression/server.cpp
@@ -24,17 +24,14 @@ class Simple_C
public:
Simple_C (CORBA::ORB_ptr orb);
- void op1 (
- Foo::Bar::AMH_AResponseHandler_ptr _tao_rh);
- void op2 (
- Foo::Bar::AMH_AResponseHandler_ptr _tao_rh);
- void op3 (
- Foo::Bar::AMH_BResponseHandler_ptr _tao_rh);
- void op4 (
- Baz::AMH_CResponseHandler_ptr _tao_rh);
+ void op1 (Foo::Bar::AMH_AResponseHandler_ptr _tao_rh);
+ void op2 (Foo::Bar::AMH_AResponseHandler_ptr _tao_rh);
+ void op3 (Foo::Bar::AMH_BResponseHandler_ptr _tao_rh);
+ void op4 (Baz::AMH_CResponseHandler_ptr _tao_rh);
+ void shutdown (Baz::AMH_CResponseHandler_ptr);
protected:
- CORBA::ORB_ptr orb_;
+ CORBA::ORB_var orb_;
};
@@ -47,33 +44,35 @@ Simple_C::Simple_C (CORBA::ORB_ptr orb)
}
void
-Simple_C::op1(
- Foo::Bar::AMH_AResponseHandler_ptr _tao_rh)
+Simple_C::op1(Foo::Bar::AMH_AResponseHandler_ptr _tao_rh)
{
_tao_rh->op1(1);
}
void
-Simple_C::op2(
- Foo::Bar::AMH_AResponseHandler_ptr _tao_rh)
+Simple_C::op2(Foo::Bar::AMH_AResponseHandler_ptr _tao_rh)
{
_tao_rh->op2(2);
}
void
-Simple_C::op3(
- Foo::Bar::AMH_BResponseHandler_ptr _tao_rh)
+Simple_C::op3(Foo::Bar::AMH_BResponseHandler_ptr _tao_rh)
{
_tao_rh->op3(3);
}
void
-Simple_C::op4(
- Baz::AMH_CResponseHandler_ptr _tao_rh)
+Simple_C::op4(Baz::AMH_CResponseHandler_ptr _tao_rh)
{
_tao_rh->op4(4);
}
+void
+Simple_C::shutdown (Baz::AMH_CResponseHandler_ptr)
+{
+ this->orb_->shutdown ();
+}
+
// ****************************************************************
const ACE_TCHAR *ior_output_file = ACE_TEXT("test.ior");