summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJohnny Willemsen <jwillemsen@remedy.nl>2019-04-15 09:57:46 +0200
committerJohnny Willemsen <jwillemsen@remedy.nl>2019-04-15 09:57:46 +0200
commit0aad93323b1802723edfbfdc4a5d2d0f7b3393cc (patch)
tree20ccf915802ff7de0b3c52e3484a932e4f92e2a8
parentb6da164721260a0f81628c222ba5f63e8bb86a2d (diff)
downloadATCD-0aad93323b1802723edfbfdc4a5d2d0f7b3393cc.tar.gz
Added new -s commandline option to shutdown the server instead of letting it terminate
* TAO/orbsvcs/tests/ImplRepo/Bug_4152_Regression/client.cpp:
-rw-r--r--TAO/orbsvcs/tests/ImplRepo/Bug_4152_Regression/client.cpp22
1 files changed, 19 insertions, 3 deletions
diff --git a/TAO/orbsvcs/tests/ImplRepo/Bug_4152_Regression/client.cpp b/TAO/orbsvcs/tests/ImplRepo/Bug_4152_Regression/client.cpp
index e9f5e6c73f0..2eba63f0baf 100644
--- a/TAO/orbsvcs/tests/ImplRepo/Bug_4152_Regression/client.cpp
+++ b/TAO/orbsvcs/tests/ImplRepo/Bug_4152_Regression/client.cpp
@@ -4,11 +4,12 @@
#include "ace/OS_NS_unistd.h"
bool killit = false;
+bool shutdown_server = false;
int
parse_args (int argc, ACE_TCHAR *argv[])
{
- ACE_Get_Opt get_opts (argc, argv, ACE_TEXT("k"));
+ ACE_Get_Opt get_opts (argc, argv, ACE_TEXT("ks"));
int c;
while ((c = get_opts ()) != -1)
@@ -17,6 +18,9 @@ parse_args (int argc, ACE_TCHAR *argv[])
case 'k':
killit = true;
break;
+ case 's':
+ shutdown_server = true;
+ break;
case '?':
default:
ACE_ERROR_RETURN ((LM_ERROR,
@@ -53,6 +57,12 @@ ACE_TMAIN (int argc, ACE_TCHAR *argv[])
ACE_DEBUG ((LM_DEBUG,
"(%P|%t) Client send terminate request\n"));
}
+ else if (shutdown_server)
+ {
+ test->shutdown ();
+ ACE_DEBUG ((LM_DEBUG,
+ "(%P|%t) Client send shutdown request\n"));
+ }
else
{
CORBA::Short const n = test->get_server_num ();
@@ -64,8 +74,8 @@ ACE_TMAIN (int argc, ACE_TCHAR *argv[])
catch (const CORBA::Exception &ex)
{
ACE_DEBUG ((LM_DEBUG,
- "(%P|%t) Client caught: %C on first attempt, retrying killit %d\n",
- ex._name (), killit));
+ "(%P|%t) Client caught: %C on first attempt, retrying killit <%d> shutdown <%d>\n",
+ ex._name (), killit, shutdown_server));
try
{
if (CORBA::is_nil (test.in()))
@@ -78,6 +88,12 @@ ACE_TMAIN (int argc, ACE_TCHAR *argv[])
ACE_DEBUG ((LM_DEBUG,
"(%P|%t) Client send terminate request on second attempt\n"));
}
+ else if (shutdown_server)
+ {
+ test->shutdown ();
+ ACE_DEBUG ((LM_DEBUG,
+ "(%P|%t) Client send shutdown request on second attempt\n"));
+ }
else
{
CORBA::Short const n = test->get_server_num ();