summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authornaga <naga@ae88bc3d-4319-0410-8dbf-d08b4c9d3795>1998-05-29 20:49:46 +0000
committernaga <naga@ae88bc3d-4319-0410-8dbf-d08b4c9d3795>1998-05-29 20:49:46 +0000
commit0b98d32e4578737bc5b0cc0d3cc96f4e4fb53022 (patch)
treeecbd05f58d92704dfa35a3e59823cd1b8d2214dc
parentf78797a1361936394af59173e5ffc0bd6448ccd4 (diff)
downloadATCD-0b98d32e4578737bc5b0cc0d3cc96f4e4fb53022.tar.gz
*** empty log message ***
-rw-r--r--TAO/tests/Cubit/TAO/IDL_Cubit/IDL_Cubit_Test.cpp41
1 files changed, 11 insertions, 30 deletions
diff --git a/TAO/tests/Cubit/TAO/IDL_Cubit/IDL_Cubit_Test.cpp b/TAO/tests/Cubit/TAO/IDL_Cubit/IDL_Cubit_Test.cpp
index 8caeaf1402c..c504eeaa15d 100644
--- a/TAO/tests/Cubit/TAO/IDL_Cubit/IDL_Cubit_Test.cpp
+++ b/TAO/tests/Cubit/TAO/IDL_Cubit/IDL_Cubit_Test.cpp
@@ -17,7 +17,7 @@
// to run the test.
//
// = AUTHOR
-// Nagarajan Surendran
+// Nagarajan Surendran (naga@cs.wustl.edu)
//
// ============================================================================
@@ -29,13 +29,6 @@ main (int, char *[])
{
ACE_START_TEST ("IDL_Cubit_Test:");
- // Make sure that the backing store is not there. We need to make
- // sure because this test kills the Time Clerk and on some platforms
- // the Clerk is not allowed to do a graceful shutdown. By cleaning
- // the backing store here, we are sure that we get a fresh start and
- // no garbage data from a possible aborted run
- ACE_OS::unlink (ACE_DEFAULT_BACKING_STORE);
-
ACE_Process_Options server_options;
server_options.command_line ("./server -ORBport 0 -ORBobjrefstyle url");
ACE_Process server;
@@ -52,11 +45,12 @@ main (int, char *[])
ACE_OS::sleep (5);
- ACE_Process_Options clerk_options;
- clerk_options.command_line ("./client -ORBport 0 -ORBobjrefstyle url");
- ACE_Process clerk;
+ // create a client that will shutdown the server after the tests.
+ ACE_Process_Options client_options;
+ client_options.command_line ("./client -ORBport 0 -ORBobjrefstyle url -x");
+ ACE_Process client;
- if (clerk.spawn (clerk_options) == -1)
+ if (client.spawn (client_options) == -1)
ACE_ERROR_RETURN ((LM_DEBUG,
"%p.\n",
"Client spawn failed"),
@@ -64,25 +58,12 @@ main (int, char *[])
else
ACE_DEBUG ((LM_DEBUG,
"Client forked with pid = %d.\n",
- clerk.getpid ()));
-
- ACE_DEBUG ((LM_DEBUG, "Sleeping...\n"));
- ACE_OS::sleep (10);
-
- if (clerk.terminate () == -1)
- ACE_ERROR_RETURN ((LM_ERROR,
- "Terminate failed for clerk.\n"),
- -1);
-
- if (server.terminate () == -1)
- ACE_ERROR_RETURN ((LM_ERROR,
- "Terminate failed for server.\n"),
- -1);
+ client.getpid ()));
- // Since we kill the clerk process, on Win32 it may not do a
- // graceful shutdown and the backing store file is left behind.
- if (clerk.wait () != 0)
- ACE_OS::unlink (ACE_DEFAULT_BACKING_STORE);
+ if (server.wait () != 0)
+ ACE_DEBUG ((LM_DEBUG,"(%P|%t) Wait on server failed\n"));
+ if (client.wait () != 0)
+ ACE_DEBUG ((LM_DEBUG,"(%P|%t) Wait on client failed\n"));
ACE_END_TEST;
return 0;