summaryrefslogtreecommitdiff
path: root/TAO/tests/Bug_2289_Regression
diff options
context:
space:
mode:
Diffstat (limited to 'TAO/tests/Bug_2289_Regression')
-rw-r--r--TAO/tests/Bug_2289_Regression/Bug_2289_Regression.mpc21
-rw-r--r--TAO/tests/Bug_2289_Regression/MyInterfaceImpl.cpp20
-rw-r--r--TAO/tests/Bug_2289_Regression/MyInterfaceImpl.h21
-rw-r--r--TAO/tests/Bug_2289_Regression/README26
-rw-r--r--TAO/tests/Bug_2289_Regression/Test.idl8
-rw-r--r--TAO/tests/Bug_2289_Regression/client.cpp145
-rwxr-xr-xTAO/tests/Bug_2289_Regression/run_test.pl60
-rw-r--r--TAO/tests/Bug_2289_Regression/server.cpp142
8 files changed, 0 insertions, 443 deletions
diff --git a/TAO/tests/Bug_2289_Regression/Bug_2289_Regression.mpc b/TAO/tests/Bug_2289_Regression/Bug_2289_Regression.mpc
deleted file mode 100644
index bf8946a0384..00000000000
--- a/TAO/tests/Bug_2289_Regression/Bug_2289_Regression.mpc
+++ /dev/null
@@ -1,21 +0,0 @@
-// -*- MPC -*-
-// $Id$
-
-project(*Server): taoserver, iortable {
- exename = server
- idlflags += -Gp -Gd -Sa -St
- Source_Files {
- server.cpp
- MyInterfaceImpl.cpp
- }
-}
-
-project(*Client): taoserver, iortable {
- exename = client
- idlflags += -Gp -Gd -Sa -St
- after += *Server
- Source_Files {
- client.cpp
- MyInterfaceImpl.cpp
- }
-}
diff --git a/TAO/tests/Bug_2289_Regression/MyInterfaceImpl.cpp b/TAO/tests/Bug_2289_Regression/MyInterfaceImpl.cpp
deleted file mode 100644
index da5c2832189..00000000000
--- a/TAO/tests/Bug_2289_Regression/MyInterfaceImpl.cpp
+++ /dev/null
@@ -1,20 +0,0 @@
-//
-// $Id$
-//
-
-#include "MyInterfaceImpl.h"
-
-const char*
-MyInterfaceImpl::my_string = "a string";
-
-MyInterfaceImpl::MyInterfaceImpl (CORBA::ORB_ptr orb)
- : orb_ (CORBA::ORB::_duplicate (orb))
-{
-}
-CORBA::Boolean
-MyInterfaceImpl::myMethod (const char* mystring ACE_ENV_ARG_DECL)
- ACE_THROW_SPEC ((CORBA::SystemException))
-{
- return mystring == my_string;
-}
-
diff --git a/TAO/tests/Bug_2289_Regression/MyInterfaceImpl.h b/TAO/tests/Bug_2289_Regression/MyInterfaceImpl.h
deleted file mode 100644
index a7f76261396..00000000000
--- a/TAO/tests/Bug_2289_Regression/MyInterfaceImpl.h
+++ /dev/null
@@ -1,21 +0,0 @@
-//
-// $Id$
-//
-
-#include "TestS.h"
-
-class MyInterfaceImpl
- : public virtual POA_MyInterface
-{
- public:
- MyInterfaceImpl (CORBA::ORB_ptr orb);
-
- static const char* my_string;
-
- // = The skeleton methods
- virtual CORBA::Boolean myMethod (const char* stringParam ACE_ENV_ARG_DECL_WITH_DEFAULTS)
- ACE_THROW_SPEC ((CORBA::SystemException));
-
-private:
- CORBA::ORB_var orb_;
-};
diff --git a/TAO/tests/Bug_2289_Regression/README b/TAO/tests/Bug_2289_Regression/README
deleted file mode 100644
index 0e4df56f029..00000000000
--- a/TAO/tests/Bug_2289_Regression/README
+++ /dev/null
@@ -1,26 +0,0 @@
-// $Id$
-
-This test checks that collocation optimisation takes effect after a location forward is received to an in process servant.
-
-It comprises:
-1/ A trivial IDL interface (Test.idl) with a single method that passes a string and returns a boolean, this interface is implemented with a servant (MyInterfaceImpl) that returns true if the address of the string passed matches the address of a static string defined as a public member of the servant.
-2/ A server which initialises a listener and binds a file:// type IOR for the client's servant into its IORTable against a name.
-4/ A client which initialises an in process MyInterfaceImpl servant.
-
-The client uses a corbaloc based on the server's endpoint and the name that its (the client's) reference is bound against in the server IORTable.
-
-Narrowing this results in a remote is_a which causes the server ORB to send a locate_forward to the client directing it to the 'in process' servant.
-
-If the fix is present the client ORB will pass the string by reference and the addresses will be equal in the servant - if the fix is not present it will attempt to marshal and demarshal the string, the addresses will differ, causing the test to fail.
-
-__Regression Output__
-
-[sm@beatrice Bug_2289_Regression]$ ./run_test.pl
-Test failed
-ERROR: Bug #TAO135 Regression failed. Non zero result from client.
-
-__Successful Output__
-
-[sm@beatrice Bug_2289_Regression]$ ./run_test.pl
-Test succeeded
-INFO: /home/sm/doc_cvs/ACE_wrappers/TAO/tests/Bug_2289_Regression/server being killed.
diff --git a/TAO/tests/Bug_2289_Regression/Test.idl b/TAO/tests/Bug_2289_Regression/Test.idl
deleted file mode 100644
index 0a599c8fbd3..00000000000
--- a/TAO/tests/Bug_2289_Regression/Test.idl
+++ /dev/null
@@ -1,8 +0,0 @@
-// $Id$
-
-typedef string MyString;
-
-interface MyInterface
-{
- boolean myMethod (in MyString stringParam);
-};
diff --git a/TAO/tests/Bug_2289_Regression/client.cpp b/TAO/tests/Bug_2289_Regression/client.cpp
deleted file mode 100644
index cb82452c574..00000000000
--- a/TAO/tests/Bug_2289_Regression/client.cpp
+++ /dev/null
@@ -1,145 +0,0 @@
-//
-// $Id$
-//
-#include "TestS.h"
-#include "MyInterfaceImpl.h"
-#include "ace/Get_Opt.h"
-#include "ace/OS_NS_stdio.h"
-
-const char *server_ior = "";
-
-const char *ior_output_file = "client.ior";
-
-int
-parse_args (int argc, char *argv[])
-{
- ACE_Get_Opt get_opts (argc, argv, "k:");
- int c;
-
- while ((c = get_opts ()) != -1)
- switch (c)
- {
- case 'k':
- server_ior = get_opts.opt_arg ();
- break;
- case 'o':
- ior_output_file = get_opts.opt_arg ();
- break;
- case '?':
- default:
- ACE_ERROR_RETURN ((LM_ERROR,
- "usage: %s "
- "-k <ior> "
- "\n",
- argv [0]),
- -1);
- }
- // Indicates sucessful parsing of the command line
- return 0;
-}
-
-int
-main (int argc, char *argv[])
-{
- int result = 0;
- ACE_TRY_NEW_ENV
- {
- CORBA::ORB_var orb =
- CORBA::ORB_init (argc, argv, "" ACE_ENV_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- if (parse_args (argc, argv) != 0)
- return 1;
-
- CORBA::Object_var poa_object =
- orb->resolve_initial_references("RootPOA" ACE_ENV_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- PortableServer::POA_var root_poa =
- PortableServer::POA::_narrow (poa_object.in () ACE_ENV_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- if (CORBA::is_nil (root_poa.in ()))
- ACE_ERROR_RETURN ((LM_ERROR,
- " (%P|%t) Panic: nil RootPOA\n"),
- 1);
-
- PortableServer::POAManager_var poa_manager =
- root_poa->the_POAManager (ACE_ENV_SINGLE_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- if (parse_args (argc, argv) != 0)
- return 1;
-
- MyInterfaceImpl *test_impl;
- ACE_NEW_RETURN (test_impl,
- MyInterfaceImpl (orb.in ()),
- 1);
-
- PortableServer::ServantBase_var owner_transfer(test_impl);
-
- MyInterface_var test_ref =
- test_impl->_this (ACE_ENV_SINGLE_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- CORBA::String_var ior =
- orb->object_to_string (test_ref.in () ACE_ENV_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- // Output the IOR to the <ior_output_file>
- FILE *output_file= ACE_OS::fopen (ior_output_file, "w");
- if (output_file != 0)
- {
- ACE_OS::fprintf (output_file, "%s", ior.in ());
- ACE_OS::fclose (output_file);
- }
-
- poa_manager->activate (ACE_ENV_SINGLE_ARG_PARAMETER);
- ACE_TRY_CHECK
-
- CORBA::Object_var tmp =
- orb->string_to_object(server_ior ACE_ENV_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- MyInterface_var server =
- MyInterface::_narrow(tmp.in () ACE_ENV_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- if (CORBA::is_nil (server.in ()))
- {
- ACE_ERROR_RETURN ((LM_DEBUG,
- "Nil server reference <%s>\n",
- ior.in()),
- 1);
- }
-
-
- CORBA::Boolean temp = server->myMethod (MyInterfaceImpl::my_string ACE_ENV_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- if (temp)
- {
- ACE_DEBUG ((LM_DEBUG, "Test succeeded\n"));
- }
- else
- {
- ACE_DEBUG ((LM_ERROR, "Test failed\n"));
- result = 1;
- }
-
- //hello->shutdown (ACE_ENV_SINGLE_ARG_PARAMETER);
- //ACE_TRY_CHECK;
-
- orb->destroy (ACE_ENV_SINGLE_ARG_PARAMETER);
- ACE_TRY_CHECK;
- }
- ACE_CATCHANY
- {
- ACE_PRINT_EXCEPTION (ACE_ANY_EXCEPTION,
- "Exception caught:");
- return 1;
- }
- ACE_ENDTRY;
-
- return result;
-}
diff --git a/TAO/tests/Bug_2289_Regression/run_test.pl b/TAO/tests/Bug_2289_Regression/run_test.pl
deleted file mode 100755
index f25f0ae4f60..00000000000
--- a/TAO/tests/Bug_2289_Regression/run_test.pl
+++ /dev/null
@@ -1,60 +0,0 @@
-eval '(exit $?0)' && eval 'exec perl -S $0 ${1+"$@"}'
- & eval 'exec perl -S $0 $argv:q'
- if 0;
-
-# $Id$
-
-# -*- perl -*-
-
-use lib '../../../bin';
-use PerlACE::Run_Test;
-
-# The server IOR file
-$server_ior_file = PerlACE::LocalFile ("server.ior");
-$client_ior_file = PerlACE::LocalFile ("client.ior");
-unlink $server_ior_file;
-unlink $client_ior_file;
-
-# The client and server processes
-if (PerlACE::is_vxworks_test()) {
- $SERVER = new PerlACE::ProcessVX(PerlACE::LocalFile("server"));
-}
-else {
- $SERVER = new PerlACE::Process(PerlACE::LocalFile("server"));
-}
-$CLIENT = new PerlACE::Process(PerlACE::LocalFile("client"));
-
-# We want the server to run on a fixed port
-$port = PerlACE::uniqueid () + 10001; # This can't be 10000 for Chorus 4.0
-
-$SERVER->Arguments("-ORBEndpoint iiop://:$port -ORBDottedDecimalAddresses 1");
-
-# Fire up the server
-$sv = $SERVER->Spawn();
-
-if ($sv != 0) {
- print STDERR "ERROR: server returned $sv\n";
- exit 1;
-}
-
-# We can wait on the IOR file
-if (PerlACE::waitforfile_timed ($server_ior_file, 10) == -1)
-{
- print STDERR "ERROR: cannot find $server_ior_file\n";
- $SERVER->Kill();
- exit 1;
-}
-
-$CLIENT->Arguments("-k corbaloc::127.0.0.1:$port/collocated_ior_bound_in_remote_iortable -ORBDottedDecimalAddresses 1 -ORBCollocationStrategy thru_poa");
-if ($CLIENT->SpawnWaitKill (60) != 0)
-{
- print STDERR "ERROR: Bug 2289 Regression failed. Non zero result from client.\n";
- $SERVER->Kill();
- exit 1;
-}
-
-# Clean up and return
-$SERVER->TerminateWaitKill (5);
-unlink $server_ior_file;
-unlink $client_ior_file;
-exit 0;
diff --git a/TAO/tests/Bug_2289_Regression/server.cpp b/TAO/tests/Bug_2289_Regression/server.cpp
deleted file mode 100644
index 47f749d99bd..00000000000
--- a/TAO/tests/Bug_2289_Regression/server.cpp
+++ /dev/null
@@ -1,142 +0,0 @@
-//
-// $Id$
-//
-
-#include "MyInterfaceImpl.h"
-#include "TestS.h"
-#include "ace/Get_Opt.h"
-#include "ace/OS_NS_stdio.h"
-#include "tao/IORTable/IORTable.h"
-
-ACE_RCSID (Hello,
- server,
- "server.cpp,v 1.6 2003/11/01 11:15:11 dhinton Exp")
-
-const char *ior_output_file = "server.ior";
-
-const char *client_ior = "file://client.ior";
-
-int
-parse_args (int argc, char *argv[])
-{
- ACE_Get_Opt get_opts (argc, argv, "o:");
- int c;
-
- while ((c = get_opts ()) != -1)
- switch (c)
- {
- case 'k':
- client_ior = get_opts.opt_arg ();
- break;
- case 'o':
- ior_output_file = get_opts.opt_arg ();
- break;
-
- case '?':
- default:
- ACE_ERROR_RETURN ((LM_ERROR,
- "usage: %s "
- "-o <iorfile>"
- "\n",
- argv [0]),
- -1);
- }
- // Indicates sucessful parsing of the command line
- return 0;
-}
-
-int
-main (int argc, char *argv[])
-{
- ACE_TRY_NEW_ENV
- {
- CORBA::ORB_var orb =
- CORBA::ORB_init (argc, argv, "" ACE_ENV_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- CORBA::Object_var poa_object =
- orb->resolve_initial_references("RootPOA" ACE_ENV_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- PortableServer::POA_var root_poa =
- PortableServer::POA::_narrow (poa_object.in () ACE_ENV_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- if (CORBA::is_nil (root_poa.in ()))
- ACE_ERROR_RETURN ((LM_ERROR,
- " (%P|%t) Panic: nil RootPOA\n"),
- 1);
-
- PortableServer::POAManager_var poa_manager =
- root_poa->the_POAManager (ACE_ENV_SINGLE_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- if (parse_args (argc, argv) != 0)
- return 1;
-
- MyInterfaceImpl *test_impl;
- ACE_NEW_RETURN (test_impl,
- MyInterfaceImpl (orb.in ()),
- 1);
-
- PortableServer::ServantBase_var owner_transfer(test_impl);
-
- MyInterface_var test_ref =
- test_impl->_this (ACE_ENV_SINGLE_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- CORBA::String_var ior =
- orb->object_to_string (test_ref.in () ACE_ENV_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- // Output the IOR to the <ior_output_file>
- FILE *output_file= ACE_OS::fopen (ior_output_file, "w");
- if (output_file != 0)
- {
- ACE_OS::fprintf (output_file, "%s", ior.in ());
- ACE_OS::fclose (output_file);
- }
-
- poa_manager->activate (ACE_ENV_SINGLE_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- CORBA::Object_var table_object =
- orb->resolve_initial_references ("IORTable"
- ACE_ENV_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- IORTable::Table_var adapter =
- IORTable::Table::_narrow (table_object.in () ACE_ENV_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- if (CORBA::is_nil (adapter.in ()))
- {
- ACE_ERROR ((LM_ERROR, "Nil IORTable\n"));
- }
- else
- {
- adapter->bind ("collocated_ior_bound_in_remote_iortable", client_ior ACE_ENV_ARG_PARAMETER);
- ACE_TRY_CHECK;
- }
-
- orb->run (ACE_ENV_SINGLE_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- ACE_DEBUG ((LM_DEBUG, "(%P|%t) server - event loop finished\n"));
-
- root_poa->destroy (1, 1 ACE_ENV_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- orb->destroy (ACE_ENV_SINGLE_ARG_PARAMETER);
- ACE_TRY_CHECK;
- }
- ACE_CATCHANY
- {
- ACE_PRINT_EXCEPTION (ACE_ANY_EXCEPTION,
- "Exception caught:");
- return 1;
- }
- ACE_ENDTRY;
-
- return 0;
-}