summaryrefslogtreecommitdiff
path: root/TAO/tests/Oneway_Buffering
diff options
context:
space:
mode:
authorWilliam R. Otte <wotte@dre.vanderbilt.edu>2006-07-24 15:50:11 +0000
committerWilliam R. Otte <wotte@dre.vanderbilt.edu>2006-07-24 15:50:11 +0000
commit6b846cf03c0bcbd8c276cb0af61a181e5f98eaae (patch)
treeda50d054f9c761c3f6a5923f6979e93306c56d68 /TAO/tests/Oneway_Buffering
parent0e555b9150d38e3b3473ba325b56db2642e6352b (diff)
downloadATCD-6b846cf03c0bcbd8c276cb0af61a181e5f98eaae.tar.gz
Repo restructuring
Diffstat (limited to 'TAO/tests/Oneway_Buffering')
-rw-r--r--TAO/tests/Oneway_Buffering/.cvsignore3
-rw-r--r--TAO/tests/Oneway_Buffering/Oneway_Buffering.cpp41
-rw-r--r--TAO/tests/Oneway_Buffering/Oneway_Buffering.h43
-rw-r--r--TAO/tests/Oneway_Buffering/Oneway_Buffering.mpc35
-rw-r--r--TAO/tests/Oneway_Buffering/Oneway_Buffering_Admin.cpp49
-rw-r--r--TAO/tests/Oneway_Buffering/Oneway_Buffering_Admin.h48
-rw-r--r--TAO/tests/Oneway_Buffering/README32
-rw-r--r--TAO/tests/Oneway_Buffering/Test.idl55
-rw-r--r--TAO/tests/Oneway_Buffering/admin.cpp113
-rw-r--r--TAO/tests/Oneway_Buffering/client.cpp793
-rwxr-xr-xTAO/tests/Oneway_Buffering/run_buffer_size.pl72
-rwxr-xr-xTAO/tests/Oneway_Buffering/run_message_count.pl72
-rwxr-xr-xTAO/tests/Oneway_Buffering/run_test.pl69
-rwxr-xr-xTAO/tests/Oneway_Buffering/run_timeout.pl72
-rwxr-xr-xTAO/tests/Oneway_Buffering/run_timeout_reactive.pl71
-rw-r--r--TAO/tests/Oneway_Buffering/server.cpp136
16 files changed, 0 insertions, 1704 deletions
diff --git a/TAO/tests/Oneway_Buffering/.cvsignore b/TAO/tests/Oneway_Buffering/.cvsignore
deleted file mode 100644
index 5c0ae7e0d7e..00000000000
--- a/TAO/tests/Oneway_Buffering/.cvsignore
+++ /dev/null
@@ -1,3 +0,0 @@
-admin
-client
-server
diff --git a/TAO/tests/Oneway_Buffering/Oneway_Buffering.cpp b/TAO/tests/Oneway_Buffering/Oneway_Buffering.cpp
deleted file mode 100644
index 9942c6020d6..00000000000
--- a/TAO/tests/Oneway_Buffering/Oneway_Buffering.cpp
+++ /dev/null
@@ -1,41 +0,0 @@
-//
-// $Id$
-//
-#include "Oneway_Buffering.h"
-
-ACE_RCSID(Oneway_Buffering, Oneway_Buffering, "$Id$")
-
-Oneway_Buffering::Oneway_Buffering (CORBA::ORB_ptr orb,
- Test::Oneway_Buffering_Admin_ptr admin)
- : orb_ (CORBA::ORB::_duplicate (orb))
- , admin_ (Test::Oneway_Buffering_Admin::_duplicate (admin))
-{
-}
-
-void
-Oneway_Buffering::receive_data (const Test::Payload &the_payload
- ACE_ENV_ARG_DECL)
- ACE_THROW_SPEC ((CORBA::SystemException))
-{
- this->admin_->request_received (the_payload.length () ACE_ENV_ARG_PARAMETER);
-}
-
-void
-Oneway_Buffering::flush (ACE_ENV_SINGLE_ARG_DECL_NOT_USED)
- ACE_THROW_SPEC ((CORBA::SystemException))
-{
-}
-
-void
-Oneway_Buffering::sync (ACE_ENV_SINGLE_ARG_DECL)
- ACE_THROW_SPEC ((CORBA::SystemException))
-{
- this->admin_->flush (ACE_ENV_SINGLE_ARG_PARAMETER);
-}
-
-void
-Oneway_Buffering::shutdown (ACE_ENV_SINGLE_ARG_DECL)
- ACE_THROW_SPEC ((CORBA::SystemException))
-{
- this->orb_->shutdown (0 ACE_ENV_ARG_PARAMETER);
-}
diff --git a/TAO/tests/Oneway_Buffering/Oneway_Buffering.h b/TAO/tests/Oneway_Buffering/Oneway_Buffering.h
deleted file mode 100644
index c1cc0c5144b..00000000000
--- a/TAO/tests/Oneway_Buffering/Oneway_Buffering.h
+++ /dev/null
@@ -1,43 +0,0 @@
-//
-// $Id$
-//
-
-#ifndef ONEWAY_BUFFERING_H
-#define ONEWAY_BUFFERING_H
-#include /**/ "ace/pre.h"
-
-#include "TestS.h"
-
-/// Implement the Test::Oneway_Buffering interface
-class Oneway_Buffering
- : public virtual POA_Test::Oneway_Buffering
-{
-public:
- /// Constructor
- Oneway_Buffering (CORBA::ORB_ptr orb,
- Test::Oneway_Buffering_Admin_ptr admin);
-
- // = The skeleton methods
- virtual void receive_data (const Test::Payload &the_payload
- ACE_ENV_ARG_DECL)
- ACE_THROW_SPEC ((CORBA::SystemException));
-
- virtual void flush (ACE_ENV_SINGLE_ARG_DECL)
- ACE_THROW_SPEC ((CORBA::SystemException));
-
- virtual void sync (ACE_ENV_SINGLE_ARG_DECL)
- ACE_THROW_SPEC ((CORBA::SystemException));
-
- virtual void shutdown (ACE_ENV_SINGLE_ARG_DECL)
- ACE_THROW_SPEC ((CORBA::SystemException));
-
-private:
- /// Use an ORB reference to shutdown the application.
- CORBA::ORB_var orb_;
-
- /// Report request progress to this interface
- Test::Oneway_Buffering_Admin_var admin_;
-};
-
-#include /**/ "ace/post.h"
-#endif /* ONEWAY_BUFFERING_H */
diff --git a/TAO/tests/Oneway_Buffering/Oneway_Buffering.mpc b/TAO/tests/Oneway_Buffering/Oneway_Buffering.mpc
deleted file mode 100644
index ee95112f143..00000000000
--- a/TAO/tests/Oneway_Buffering/Oneway_Buffering.mpc
+++ /dev/null
@@ -1,35 +0,0 @@
-// -*- MPC -*-
-// $Id$
-
-project(*Server): messaging, taoexe, portableserver {
- Source_Files {
- Oneway_Buffering.cpp
- server.cpp
- }
-}
-
-// These next two projects depend on *Server (the above project)
-// due to the possibility of parallelism for the GNUACE type. If
-// -j 2 or more is used to build this project, multiple instances
-// of tao_idl are invoked for Test.idl. They begin to overwrite the
-// generated source files and cause problems for the processes that
-// have gone on to build the generated files. By depending on *Server,
-// only one process is allowed to compile Test.idl and thus the build
-// succeeds.
-project(*Client): messaging, taoexe, portableserver {
- requires += corba_messaging
- after += *Server
-
- Source_Files {
- TestC.cpp
- client.cpp
- }
-}
-
-project(*Admin): messaging, taoexe, portableserver {
- after += *Client
- Source_Files {
- Oneway_Buffering_Admin.cpp
- admin.cpp
- }
-}
diff --git a/TAO/tests/Oneway_Buffering/Oneway_Buffering_Admin.cpp b/TAO/tests/Oneway_Buffering/Oneway_Buffering_Admin.cpp
deleted file mode 100644
index a04178e6012..00000000000
--- a/TAO/tests/Oneway_Buffering/Oneway_Buffering_Admin.cpp
+++ /dev/null
@@ -1,49 +0,0 @@
-//
-// $Id$
-//
-#include "Oneway_Buffering_Admin.h"
-
-ACE_RCSID(Oneway_Buffering, Oneway_Buffering_Admin, "$Id$")
-
-Oneway_Buffering_Admin::Oneway_Buffering_Admin (CORBA::ORB_ptr orb)
- : orb_ (CORBA::ORB::_duplicate (orb))
- , request_count_ (0)
- , bytes_received_count_ (0)
-{
-}
-
-CORBA::ULong
-Oneway_Buffering_Admin::request_count (ACE_ENV_SINGLE_ARG_DECL_NOT_USED)
- ACE_THROW_SPEC ((CORBA::SystemException))
-{
- return this->request_count_;
-}
-
-CORBA::ULong
-Oneway_Buffering_Admin::bytes_received_count (ACE_ENV_SINGLE_ARG_DECL_NOT_USED)
- ACE_THROW_SPEC ((CORBA::SystemException))
-{
- return this->bytes_received_count_;
-}
-
-void
-Oneway_Buffering_Admin::request_received (CORBA::ULong payload_length
- ACE_ENV_ARG_DECL_NOT_USED)
- ACE_THROW_SPEC ((CORBA::SystemException))
-{
- this->request_count_++;
- this->bytes_received_count_ += payload_length;
-}
-
-void
-Oneway_Buffering_Admin::flush (ACE_ENV_SINGLE_ARG_DECL_NOT_USED)
- ACE_THROW_SPEC ((CORBA::SystemException))
-{
-}
-
-void
-Oneway_Buffering_Admin::shutdown (ACE_ENV_SINGLE_ARG_DECL)
- ACE_THROW_SPEC ((CORBA::SystemException))
-{
- this->orb_->shutdown (0 ACE_ENV_ARG_PARAMETER);
-}
diff --git a/TAO/tests/Oneway_Buffering/Oneway_Buffering_Admin.h b/TAO/tests/Oneway_Buffering/Oneway_Buffering_Admin.h
deleted file mode 100644
index bf1a4dbbdde..00000000000
--- a/TAO/tests/Oneway_Buffering/Oneway_Buffering_Admin.h
+++ /dev/null
@@ -1,48 +0,0 @@
-//
-// $Id$
-//
-
-#ifndef ONEWAY_BUFFERING_ADMIN_H
-#define ONEWAY_BUFFERING_ADMIN_H
-#include /**/ "ace/pre.h"
-
-#include "TestS.h"
-
-/// Implement the Test::Oneway_Buffering_Admin interface
-class Oneway_Buffering_Admin
- : public virtual POA_Test::Oneway_Buffering_Admin
-{
-public:
- /// Constructor
- Oneway_Buffering_Admin (CORBA::ORB_ptr orb);
-
- // = The skeleton methods
- virtual CORBA::ULong request_count (ACE_ENV_SINGLE_ARG_DECL)
- ACE_THROW_SPEC ((CORBA::SystemException));
-
- virtual CORBA::ULong bytes_received_count (ACE_ENV_SINGLE_ARG_DECL)
- ACE_THROW_SPEC ((CORBA::SystemException));
-
- virtual void request_received (CORBA::ULong payload_length
- ACE_ENV_ARG_DECL)
- ACE_THROW_SPEC ((CORBA::SystemException));
-
- virtual void flush (ACE_ENV_SINGLE_ARG_DECL)
- ACE_THROW_SPEC ((CORBA::SystemException));
-
- virtual void shutdown (ACE_ENV_SINGLE_ARG_DECL)
- ACE_THROW_SPEC ((CORBA::SystemException));
-
-private:
- /// Use an ORB reference to shutdown the application.
- CORBA::ORB_var orb_;
-
- /// Keep track of the number of requests received
- CORBA::ULong request_count_;
-
- /// Keep track of the number of requests received
- CORBA::ULong bytes_received_count_;
-};
-
-#include /**/ "ace/post.h"
-#endif /* ONEWAY_BUFFERING_H */
diff --git a/TAO/tests/Oneway_Buffering/README b/TAO/tests/Oneway_Buffering/README
deleted file mode 100644
index c2a90e9b932..00000000000
--- a/TAO/tests/Oneway_Buffering/README
+++ /dev/null
@@ -1,32 +0,0 @@
-/**
-
-@page Oneway_Buffering Test README File
-
- A regression test for oneway buffering. The test verifies
-that the TAO::BufferingConstraint policies are respected by the
-ORB. Three separate tests are possible:
-
-- TAO::BUFFER_MESSAGE_COUNT: The buffer should not be flushed until
- enough messages are in the queue.
-
-- TAO::BUFFER_TIMEOUT: The buffer should not be flushed unless the
- specified interval has expired.
-
-- TAO::BUFFER_MESSAGE_BYTES: The buffer should not be flushed until
- enough bytes are in the queue.
-
- To run the test use run_test.pl script:
-
-$ ./run_test.pl
-
- the nightly regression builds impose severe constraints on the
-maximum time allowed for a single test. Three separate scripts are
-used to stay within those bounds:
-
-$ ./run_message_count.pl
-$ ./run_timeout.pl
-$ ./run_message_bytes.pl
-
- each script returns 0 if the test was successful.
-
-*/
diff --git a/TAO/tests/Oneway_Buffering/Test.idl b/TAO/tests/Oneway_Buffering/Test.idl
deleted file mode 100644
index c215a596602..00000000000
--- a/TAO/tests/Oneway_Buffering/Test.idl
+++ /dev/null
@@ -1,55 +0,0 @@
-//
-// $Id$
-//
-
-/// Put the interfaces in a module, to avoid global namespace pollution
-module Test
-{
- /// A sequence of octets to generate bigger messages
- typedef sequence<octet> Payload;
-
- /// Clients use this interface to send oneway requests
- interface Oneway_Buffering
- {
- /// Return a simple string
- oneway void receive_data (in Payload the_payload);
-
- /// An empty operation to force a flush in the ORB queues
- oneway void flush ();
-
- /// Synchronize the state with the Admin object.
- /**
- * Once flush() has been invoked (with the correct buffering
- * policies) we must use sync() to ensure that both the main
- * server and the Admin servers are in sync.
- */
- void sync ();
-
- /// Shutdown the server
- void shutdown ();
- };
-
- /// Clients use this interface to query the number of oneway
- /// requests received.
- interface Oneway_Buffering_Admin
- {
- /// Number of oneway requests received
- unsigned long request_count ();
-
- /// Number of bytes received
- unsigned long bytes_received_count ();
-
- /// The Oneway_Buffering interface uses this method to report any
- /// request received.
- void request_received (in unsigned long payload_length);
-
- /// An empty operation to force a flush in the ORB queues
- void flush ();
-
- /// A method to shutdown the ORB
- /**
- * This method is used to simplify the test shutdown process
- */
- void shutdown ();
- };
-};
diff --git a/TAO/tests/Oneway_Buffering/admin.cpp b/TAO/tests/Oneway_Buffering/admin.cpp
deleted file mode 100644
index 4ab858a5e46..00000000000
--- a/TAO/tests/Oneway_Buffering/admin.cpp
+++ /dev/null
@@ -1,113 +0,0 @@
-// $Id$
-
-#include "Oneway_Buffering_Admin.h"
-#include "ace/Get_Opt.h"
-#include "ace/OS_NS_stdio.h"
-
-ACE_RCSID(Oneway_Buffering, admin, "$Id$")
-
-const char *ior_output_file = "admin.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 '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;
-
- Oneway_Buffering_Admin *oneway_buffering_admin_impl;
- ACE_NEW_RETURN (oneway_buffering_admin_impl,
- Oneway_Buffering_Admin (orb.in ()),
- 1);
- PortableServer::ServantBase_var owner_transfer(oneway_buffering_admin_impl);
-
- Test::Oneway_Buffering_Admin_var oneway_buffering_admin =
- oneway_buffering_admin_impl->_this (ACE_ENV_SINGLE_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- CORBA::String_var ior =
- orb->object_to_string (oneway_buffering_admin.in () ACE_ENV_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- // If the ior_output_file exists, output the ior to it
- FILE *output_file= ACE_OS::fopen (ior_output_file, "w");
- if (output_file == 0)
- ACE_ERROR_RETURN ((LM_ERROR,
- "Cannot open output file for writing IOR: %s",
- ior_output_file),
- 1);
- ACE_OS::fprintf (output_file, "%s", ior.in ());
- ACE_OS::fclose (output_file);
-
- poa_manager->activate (ACE_ENV_SINGLE_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- orb->run (ACE_ENV_SINGLE_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- ACE_DEBUG ((LM_DEBUG, "(%P|%t) admin - 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 in admin:");
- return 1;
- }
- ACE_ENDTRY;
-
- return 0;
-}
diff --git a/TAO/tests/Oneway_Buffering/client.cpp b/TAO/tests/Oneway_Buffering/client.cpp
deleted file mode 100644
index a0ab26bed3e..00000000000
--- a/TAO/tests/Oneway_Buffering/client.cpp
+++ /dev/null
@@ -1,793 +0,0 @@
-// $Id$
-
-#include "TestC.h"
-#include "tao/Messaging/Messaging.h"
-#include "tao/AnyTypeCode/Any.h"
-#include "tao/TAOC.h"
-#include "tao/AnyTypeCode/TAOA.h"
-#include "ace/Get_Opt.h"
-#include "ace/OS_NS_sys_time.h"
-#include "ace/OS_NS_unistd.h"
-
-ACE_RCSID(Oneway_Buffering, client, "$Id$")
-
-const char *server_ior = "file://server.ior";
-const char *admin_ior = "file://admin.ior";
-int iterations = 200;
-
-int run_message_count_test = 0;
-int run_timeout_test = 0;
-int run_timeout_reactive_test = 0;
-int run_buffer_size_test = 0;
-
-const int PAYLOAD_LENGTH = 1024;
-const int BUFFERED_MESSAGES_COUNT = 50;
-const unsigned int TIMEOUT_MILLISECONDS = 50;
-const int BUFFER_SIZE = 64 * PAYLOAD_LENGTH;
-
-/// Check that no more than 10% of the messages are not sent.
-const double LIVENESS_TOLERANCE = 0.9;
-
-/// Limit the depth of the liveness test, avoid blowing up the stack
-/// on the server
-const int LIVENESS_MAX_DEPTH = 256;
-
-/// Factor in GIOP overhead in the buffer size test
-const double GIOP_OVERHEAD = 0.9;
-
-int
-parse_args (int argc, char *argv[])
-{
- ACE_Get_Opt get_opts (argc, argv, "k:a:i:ctbr");
- int c;
-
- while ((c = get_opts ()) != -1)
- switch (c)
- {
- case 'k':
- server_ior = get_opts.opt_arg ();
- break;
-
- case 'a':
- admin_ior = get_opts.opt_arg ();
- break;
-
- case 'i':
- iterations = ACE_OS::atoi (get_opts.opt_arg ());
- break;
-
- case 'c':
- run_message_count_test = 1;
- break;
-
- case 't':
- run_timeout_test = 1;
- break;
-
- case 'b':
- run_buffer_size_test = 1;
- break;
-
- case 'r':
- run_timeout_reactive_test = 1;
- break;
-
- case '?':
- default:
- ACE_ERROR_RETURN ((LM_ERROR,
- "usage: %s "
- "-k <server_ior> "
- "-a <admin_ior> "
- "-i <iterations> "
- "<-c|-t|-b|-r> "
- "\n",
- argv [0]),
- -1);
- }
- // Indicates sucessful parsing of the command line
- return 0;
-}
-
-int
-run_message_count (CORBA::ORB_ptr orb,
- Test::Oneway_Buffering_ptr oneway_buffering,
- Test::Oneway_Buffering_Admin_ptr oneway_buffering_admin
- ACE_ENV_ARG_DECL);
-
-int
-run_timeout (CORBA::ORB_ptr orb,
- Test::Oneway_Buffering_ptr oneway_buffering,
- Test::Oneway_Buffering_Admin_ptr oneway_buffering_admin
- ACE_ENV_ARG_DECL);
-
-int
-run_timeout_reactive (CORBA::ORB_ptr orb,
- Test::Oneway_Buffering_ptr oneway_buffering,
- Test::Oneway_Buffering_Admin_ptr oneway_buffering_admin
- ACE_ENV_ARG_DECL);
-
-int
-run_buffer_size (CORBA::ORB_ptr orb,
- Test::Oneway_Buffering_ptr oneway_buffering,
- Test::Oneway_Buffering_Admin_ptr oneway_buffering_admin
- ACE_ENV_ARG_DECL);
-
-int
-main (int argc, char *argv[])
-{
- int test_failed = 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 tmp =
- orb->string_to_object(server_ior ACE_ENV_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- Test::Oneway_Buffering_var oneway_buffering =
- Test::Oneway_Buffering::_narrow(tmp.in () ACE_ENV_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- if (CORBA::is_nil (oneway_buffering.in ()))
- {
- ACE_ERROR_RETURN ((LM_DEBUG,
- "Nil Test::Oneway_Buffering reference <%s>\n",
- server_ior),
- 1);
- }
-
- tmp =
- orb->string_to_object(admin_ior ACE_ENV_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- Test::Oneway_Buffering_Admin_var oneway_buffering_admin =
- Test::Oneway_Buffering_Admin::_narrow(tmp.in () ACE_ENV_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- if (CORBA::is_nil (oneway_buffering_admin.in ()))
- {
- ACE_ERROR_RETURN ((LM_DEBUG,
- "Nil Test::Oneway_Buffering_Admin reference <%s>\n",
- admin_ior),
- 1);
- }
-
- if (run_message_count_test)
- {
- ACE_DEBUG ((LM_DEBUG,
- "Running message count flushing test\n"));
- test_failed =
- run_message_count (orb.in (),
- oneway_buffering.in (),
- oneway_buffering_admin.in ()
- ACE_ENV_ARG_PARAMETER);
- ACE_TRY_CHECK;
- }
- else if (run_timeout_test)
- {
- ACE_DEBUG ((LM_DEBUG,
- "Running timeout flushing test\n"));
- test_failed =
- run_timeout (orb.in (),
- oneway_buffering.in (),
- oneway_buffering_admin.in ()
- ACE_ENV_ARG_PARAMETER);
- ACE_TRY_CHECK;
- }
- else if (run_timeout_reactive_test)
- {
- ACE_DEBUG ((LM_DEBUG,
- "Running timeout (reactive) flushing test\n"));
- test_failed =
- run_timeout_reactive (orb.in (),
- oneway_buffering.in (),
- oneway_buffering_admin.in ()
- ACE_ENV_ARG_PARAMETER);
- ACE_TRY_CHECK;
- }
- else if (run_buffer_size_test)
- {
- ACE_DEBUG ((LM_DEBUG,
- "Running buffer size flushing test\n"));
- test_failed =
- run_buffer_size (orb.in (),
- oneway_buffering.in (),
- oneway_buffering_admin.in ()
- ACE_ENV_ARG_PARAMETER);
- ACE_TRY_CHECK;
- }
- else
- {
- ACE_ERROR ((LM_ERROR,
- "ERROR: No test was configured\n"));
- }
-
- oneway_buffering->shutdown (ACE_ENV_SINGLE_ARG_PARAMETER);
- ACE_TRY_CHECK;
- ACE_OS::sleep(1);
- oneway_buffering_admin->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 in client:");
- return 1;
- }
- ACE_ENDTRY;
-
- return test_failed;
-}
-
-int
-configure_policies (CORBA::ORB_ptr orb,
- const TAO::BufferingConstraint &buffering_constraint,
- Test::Oneway_Buffering_ptr oneway_buffering,
- Test::Oneway_Buffering_out flusher
- ACE_ENV_ARG_DECL)
-{
- CORBA::Object_var object =
- orb->resolve_initial_references ("PolicyCurrent" ACE_ENV_ARG_PARAMETER);
- ACE_CHECK_RETURN (-1);
-
- CORBA::PolicyCurrent_var policy_current =
- CORBA::PolicyCurrent::_narrow (object.in () ACE_ENV_ARG_PARAMETER);
- ACE_CHECK_RETURN (-1);
-
- if (CORBA::is_nil (policy_current.in ()))
- {
- ACE_ERROR ((LM_ERROR, "ERROR: Nil policy current\n"));
- return 1;
- }
- CORBA::Any scope_as_any;
- scope_as_any <<= Messaging::SYNC_NONE;
-
- CORBA::Any buffering_as_any;
- buffering_as_any <<= buffering_constraint;
-
- CORBA::PolicyList policies (2); policies.length (2);
- policies[0] =
- orb->create_policy (Messaging::SYNC_SCOPE_POLICY_TYPE,
- scope_as_any
- ACE_ENV_ARG_PARAMETER);
- ACE_CHECK_RETURN (-1);
- policies[1] =
- orb->create_policy (TAO::BUFFERING_CONSTRAINT_POLICY_TYPE,
- buffering_as_any
- ACE_ENV_ARG_PARAMETER);
- ACE_CHECK_RETURN (-1);
-
- policy_current->set_policy_overrides (policies, CORBA::ADD_OVERRIDE
- ACE_ENV_ARG_PARAMETER);
- ACE_CHECK_RETURN (-1);
-
- policies[0]->destroy (ACE_ENV_SINGLE_ARG_PARAMETER);
- ACE_CHECK_RETURN (-1);
- policies[1]->destroy (ACE_ENV_SINGLE_ARG_PARAMETER);
- ACE_CHECK_RETURN (-1);
-
- TAO::BufferingConstraint flush_constraint;
- flush_constraint.mode = TAO::BUFFER_FLUSH;
- flush_constraint.message_count = 0;
- flush_constraint.message_bytes = 0;
- flush_constraint.timeout = 0;
-
- buffering_as_any <<= flush_constraint;
- policies.length (1);
- policies[0] =
- orb->create_policy (TAO::BUFFERING_CONSTRAINT_POLICY_TYPE,
- buffering_as_any
- ACE_ENV_ARG_PARAMETER);
- ACE_CHECK_RETURN (-1);
-
- object =
- oneway_buffering->_set_policy_overrides (policies,
- CORBA::ADD_OVERRIDE
- ACE_ENV_ARG_PARAMETER);
- ACE_CHECK_RETURN (-1);
-
- policies[0]->destroy (ACE_ENV_SINGLE_ARG_PARAMETER);
- ACE_CHECK_RETURN (-1);
-
- flusher =
- Test::Oneway_Buffering::_narrow (object.in () ACE_ENV_ARG_PARAMETER);
- ACE_CHECK_RETURN (-1);
-
- return 0;
-}
-
-void
-sync_server (Test::Oneway_Buffering_ptr flusher
- ACE_ENV_ARG_DECL)
-{
- // Get back in sync with the server...
- flusher->flush (ACE_ENV_SINGLE_ARG_PARAMETER);
- ACE_CHECK;
- flusher->sync (ACE_ENV_SINGLE_ARG_PARAMETER);
- ACE_CHECK;
-}
-
-int
-run_liveness_test (Test::Oneway_Buffering_ptr oneway_buffering,
- Test::Oneway_Buffering_ptr flusher,
- Test::Oneway_Buffering_Admin_ptr oneway_buffering_admin
- ACE_ENV_ARG_DECL)
-{
- ACE_DEBUG ((LM_DEBUG, ".... checking for liveness\n"));
- int test_failed = 0;
-
- sync_server (flusher ACE_ENV_ARG_PARAMETER);
- ACE_CHECK_RETURN (-1);
-
- CORBA::ULong send_count =
- oneway_buffering_admin->request_count (ACE_ENV_SINGLE_ARG_PARAMETER);
- ACE_CHECK_RETURN (-1);
-
- int liveness_test_iterations = int(send_count);
-
- Test::Payload payload (PAYLOAD_LENGTH);
- payload.length (PAYLOAD_LENGTH);
- for (int j = 0; j != PAYLOAD_LENGTH; ++j)
- payload[j] = CORBA::Octet(j % 256);
-
- int depth = 0;
- for (int i = 0; i != liveness_test_iterations; ++i)
- {
- oneway_buffering->receive_data (payload ACE_ENV_ARG_PARAMETER);
- ACE_CHECK_RETURN (-1);
- send_count++;
-
- CORBA::ULong receive_count =
- oneway_buffering_admin->request_count (ACE_ENV_SINGLE_ARG_PARAMETER);
- ACE_CHECK_RETURN (-1);
-
- // Once the system has sent enough messages we don't
- // expect it to fall too far behind, i.e. at least 90% of the
- // messages should be delivered....
- CORBA::ULong expected =
- CORBA::ULong (LIVENESS_TOLERANCE * send_count);
-
- if (receive_count < expected)
- {
- test_failed = 1;
- ACE_DEBUG ((LM_DEBUG,
- "DEBUG: Iteration %d "
- "not enough messages received %u "
- "expected %u\n",
- i, receive_count, expected));
-
- sync_server (flusher ACE_ENV_ARG_PARAMETER);
- ACE_CHECK_RETURN (-1);
- }
-
- if (depth++ == LIVENESS_MAX_DEPTH)
- {
- sync_server (flusher ACE_ENV_ARG_PARAMETER);
- ACE_CHECK_RETURN (-1);
-
- depth = 0;
- }
-
- }
-
- return test_failed;
-}
-
-int
-run_message_count (CORBA::ORB_ptr orb,
- Test::Oneway_Buffering_ptr oneway_buffering,
- Test::Oneway_Buffering_Admin_ptr oneway_buffering_admin
- ACE_ENV_ARG_DECL)
-{
- TAO::BufferingConstraint buffering_constraint;
- buffering_constraint.mode = TAO::BUFFER_MESSAGE_COUNT;
- buffering_constraint.message_count = BUFFERED_MESSAGES_COUNT;
- buffering_constraint.message_bytes = 0;
- buffering_constraint.timeout = 0;
-
- Test::Oneway_Buffering_var flusher;
- int test_failed =
- configure_policies (orb, buffering_constraint,
- oneway_buffering, flusher.out ()
- ACE_ENV_ARG_PARAMETER);
- ACE_CHECK_RETURN (-1);
-
- if (test_failed != 0)
- return test_failed;
-
- Test::Payload payload (PAYLOAD_LENGTH);
- payload.length (PAYLOAD_LENGTH);
- for (int j = 0; j != PAYLOAD_LENGTH; ++j)
- payload[j] = CORBA::Octet(j % 256);
-
- CORBA::ULong send_count = 0;
- for (int i = 0; i != iterations; ++i)
- {
- sync_server (flusher.in () ACE_ENV_ARG_PARAMETER);
- ACE_CHECK_RETURN (-1);
-
- CORBA::ULong initial_receive_count =
- oneway_buffering_admin->request_count (ACE_ENV_SINGLE_ARG_PARAMETER);
- ACE_CHECK_RETURN (-1);
-
- if (initial_receive_count != send_count)
- {
- test_failed = 1;
- ACE_DEBUG ((LM_DEBUG,
- "DEBUG: Iteration %d message lost (%u != %u)\n",
- i, initial_receive_count, send_count));
- }
-
- while (1)
- {
- oneway_buffering->receive_data (payload ACE_ENV_ARG_PARAMETER);
- ACE_CHECK_RETURN (-1);
- send_count++;
-
- CORBA::ULong receive_count =
- oneway_buffering_admin->request_count (ACE_ENV_SINGLE_ARG_PARAMETER);
- ACE_CHECK_RETURN (-1);
-
- CORBA::ULong iteration_count =
- send_count - initial_receive_count;
- if (receive_count != initial_receive_count)
- {
- if (iteration_count < CORBA::ULong(BUFFERED_MESSAGES_COUNT))
- {
- test_failed = 1;
- ACE_DEBUG ((LM_DEBUG,
- "DEBUG: Iteration %d flush before "
- "message count reached. "
- "Iteration count = %u, Threshold = %u\n",
- i,
- iteration_count, BUFFERED_MESSAGES_COUNT));
- }
- break;
- }
-
- if (iteration_count > 3 * BUFFERED_MESSAGES_COUNT)
- {
- test_failed = 1;
- ACE_DEBUG ((LM_DEBUG,
- "DEBUG: Iteration %d no flush past "
- "message count threshold. "
- "Iteration count = %u, Threshold = %u\n",
- i,
- iteration_count, BUFFERED_MESSAGES_COUNT));
- break;
- }
- }
- }
-
- int liveness_test_failed =
- run_liveness_test (oneway_buffering,
- flusher.in (),
- oneway_buffering_admin
- ACE_ENV_ARG_PARAMETER);
- ACE_CHECK_RETURN (-1);
-
- if (liveness_test_failed)
- test_failed = 1;
-
- return test_failed;
-}
-
-int
-run_timeout (CORBA::ORB_ptr orb,
- Test::Oneway_Buffering_ptr oneway_buffering,
- Test::Oneway_Buffering_Admin_ptr oneway_buffering_admin
- ACE_ENV_ARG_DECL)
-{
- TAO::BufferingConstraint buffering_constraint;
- buffering_constraint.mode = TAO::BUFFER_TIMEOUT;
- buffering_constraint.message_count = 0;
- buffering_constraint.message_bytes = 0;
- buffering_constraint.timeout = TIMEOUT_MILLISECONDS * 10000;
-
- Test::Oneway_Buffering_var flusher;
- int test_failed =
- configure_policies (orb, buffering_constraint,
- oneway_buffering, flusher.out ()
- ACE_ENV_ARG_PARAMETER);
- ACE_CHECK_RETURN (-1);
-
- if (test_failed != 0)
- return test_failed;
-
- Test::Payload payload (PAYLOAD_LENGTH);
- payload.length (PAYLOAD_LENGTH);
- for (int j = 0; j != PAYLOAD_LENGTH; ++j)
- payload[j] = CORBA::Octet(j % 256);
-
- CORBA::ULong send_count = 0;
- for (int i = 0; i != iterations; ++i)
- {
- sync_server (flusher.in () ACE_ENV_ARG_PARAMETER);
- ACE_CHECK_RETURN (-1);
-
- CORBA::ULong initial_receive_count =
- oneway_buffering_admin->request_count (ACE_ENV_SINGLE_ARG_PARAMETER);
- ACE_CHECK_RETURN (-1);
-
- if (initial_receive_count != send_count)
- {
- test_failed = 1;
- ACE_DEBUG ((LM_DEBUG,
- "DEBUG: Iteration %d message lost (%u != %u)\n",
- i, initial_receive_count, send_count));
- }
-
- ACE_Time_Value start = ACE_OS::gettimeofday ();
- while (1)
- {
- oneway_buffering->receive_data (payload ACE_ENV_ARG_PARAMETER);
- ACE_CHECK_RETURN (-1);
- send_count++;
-
- CORBA::ULong receive_count =
- oneway_buffering_admin->request_count (ACE_ENV_SINGLE_ARG_PARAMETER);
- ACE_CHECK_RETURN (-1);
-
- ACE_Time_Value elapsed = ACE_OS::gettimeofday () - start;
- if (receive_count != initial_receive_count)
- {
- if (elapsed.msec () < TIMEOUT_MILLISECONDS)
- {
- test_failed = 1;
- ACE_DEBUG ((LM_DEBUG,
- "DEBUG: Iteration %d flush before "
- "timeout expired. "
- "Elapsed = %d, Timeout = %d msecs\n",
- i,
- elapsed.msec (), TIMEOUT_MILLISECONDS));
- }
- // terminate the while loop.
- break;
- }
-
- if (elapsed.msec () > 3 * TIMEOUT_MILLISECONDS)
- {
- test_failed = 1;
- ACE_DEBUG ((LM_DEBUG,
- "DEBUG: Iteration %d no flush past "
- "timeout threshold. "
- "Elapsed = %d, Timeout = %d msecs\n",
- i,
- elapsed.msec (), TIMEOUT_MILLISECONDS));
- break;
- }
- }
- }
-
- int liveness_test_failed =
- run_liveness_test (oneway_buffering,
- flusher.in (),
- oneway_buffering_admin
- ACE_ENV_ARG_PARAMETER);
- ACE_CHECK_RETURN (-1);
-
- if (liveness_test_failed)
- test_failed = 1;
-
-
- return test_failed;
-}
-
-int
-run_timeout_reactive (CORBA::ORB_ptr orb,
- Test::Oneway_Buffering_ptr oneway_buffering,
- Test::Oneway_Buffering_Admin_ptr oneway_buffering_admin
- ACE_ENV_ARG_DECL)
-{
- TAO::BufferingConstraint buffering_constraint;
- buffering_constraint.mode = TAO::BUFFER_TIMEOUT;
- buffering_constraint.message_count = 0;
- buffering_constraint.message_bytes = 0;
- buffering_constraint.timeout = TIMEOUT_MILLISECONDS * 10000;
-
- Test::Oneway_Buffering_var flusher;
- int test_failed =
- configure_policies (orb, buffering_constraint,
- oneway_buffering, flusher.out ()
- ACE_ENV_ARG_PARAMETER);
- ACE_CHECK_RETURN (-1);
-
- if (test_failed != 0)
- return test_failed;
-
- Test::Payload payload (PAYLOAD_LENGTH);
- payload.length (PAYLOAD_LENGTH);
- for (int j = 0; j != PAYLOAD_LENGTH; ++j)
- payload[j] = CORBA::Octet(j % 256);
-
- CORBA::ULong send_count = 0;
- for (int i = 0; i != iterations; ++i)
- {
- sync_server (flusher.in () ACE_ENV_ARG_PARAMETER);
- ACE_CHECK_RETURN (-1);
-
- CORBA::ULong initial_receive_count =
- oneway_buffering_admin->request_count (ACE_ENV_SINGLE_ARG_PARAMETER);
- ACE_CHECK_RETURN (-1);
-
- if (initial_receive_count != send_count)
- {
- test_failed = 1;
- ACE_DEBUG ((LM_DEBUG,
- "DEBUG: Iteration %d message lost (%u != %u)\n",
- i, initial_receive_count, send_count));
- }
-
- ACE_Time_Value start = ACE_OS::gettimeofday ();
- for (int j = 0; j != 20; ++j)
- {
- oneway_buffering->receive_data (payload ACE_ENV_ARG_PARAMETER);
- ACE_CHECK_RETURN (-1);
- send_count++;
- }
- while (1)
- {
- CORBA::ULong receive_count =
- oneway_buffering_admin->request_count (ACE_ENV_SINGLE_ARG_PARAMETER);
- ACE_CHECK_RETURN (-1);
-
- ACE_Time_Value sleep (0, 10000);
- orb->run (sleep ACE_ENV_ARG_PARAMETER);
- ACE_CHECK_RETURN (-1);
-
- ACE_Time_Value elapsed = ACE_OS::gettimeofday () - start;
- if (receive_count != initial_receive_count)
- {
- if (elapsed.msec () < TIMEOUT_MILLISECONDS)
- {
- test_failed = 1;
- ACE_DEBUG ((LM_DEBUG,
- "DEBUG: Iteration %d flush before "
- "timeout expired. "
- "Elapsed = %d, Timeout = %d msecs\n",
- i,
- elapsed.msec (), TIMEOUT_MILLISECONDS));
- }
- // terminate the while loop.
- break;
- }
-
- if (elapsed.msec () > 3 * TIMEOUT_MILLISECONDS)
- {
- test_failed = 1;
- ACE_DEBUG ((LM_DEBUG,
- "DEBUG: Iteration %d no flush past "
- "timeout threshold. "
- "Elapsed = %d, Timeout = %d msecs\n",
- i,
- elapsed.msec (), TIMEOUT_MILLISECONDS));
- break;
- }
- }
- }
-
- int liveness_test_failed =
- run_liveness_test (oneway_buffering,
- flusher.in (),
- oneway_buffering_admin
- ACE_ENV_ARG_PARAMETER);
- ACE_CHECK_RETURN (-1);
-
- if (liveness_test_failed)
- test_failed = 1;
-
-
- return test_failed;
-}
-
-int
-run_buffer_size (CORBA::ORB_ptr orb,
- Test::Oneway_Buffering_ptr oneway_buffering,
- Test::Oneway_Buffering_Admin_ptr oneway_buffering_admin
- ACE_ENV_ARG_DECL)
-{
- TAO::BufferingConstraint buffering_constraint;
- buffering_constraint.mode = TAO::BUFFER_MESSAGE_BYTES;
- buffering_constraint.message_count = 0;
- buffering_constraint.message_bytes = BUFFER_SIZE;
- buffering_constraint.timeout = 0;
-
- Test::Oneway_Buffering_var flusher;
- int test_failed =
- configure_policies (orb, buffering_constraint,
- oneway_buffering, flusher.out ()
- ACE_ENV_ARG_PARAMETER);
- ACE_CHECK_RETURN (-1);
-
- if (test_failed != 0)
- return test_failed;
-
- Test::Payload payload (PAYLOAD_LENGTH);
- payload.length (PAYLOAD_LENGTH);
- for (int j = 0; j != PAYLOAD_LENGTH; ++j)
- payload[j] = CORBA::Octet(j % 256);
-
- CORBA::ULong bytes_sent = 0;
- for (int i = 0; i != iterations; ++i)
- {
- sync_server (flusher.in () ACE_ENV_ARG_PARAMETER);
- ACE_CHECK_RETURN (-1);
-
- CORBA::ULong initial_bytes_received =
- oneway_buffering_admin->bytes_received_count (ACE_ENV_SINGLE_ARG_PARAMETER);
- ACE_CHECK_RETURN (-1);
-
- if (initial_bytes_received != bytes_sent)
- {
- test_failed = 1;
- ACE_DEBUG ((LM_DEBUG,
- "DEBUG: Iteration %d data lost (%u != %u)\n",
- i, initial_bytes_received, bytes_sent));
- }
-
- while (1)
- {
- oneway_buffering->receive_data (payload ACE_ENV_ARG_PARAMETER);
- ACE_CHECK_RETURN (-1);
- bytes_sent += PAYLOAD_LENGTH;
-
- CORBA::ULong bytes_received =
- oneway_buffering_admin->bytes_received_count (ACE_ENV_SINGLE_ARG_PARAMETER);
- ACE_CHECK_RETURN (-1);
-
- CORBA::ULong payload_delta =
- bytes_sent - initial_bytes_received;
- if (bytes_received != initial_bytes_received)
- {
- // The queue has been flushed, check that enough data
- // has been sent. The check cannot be precise because
- // the ORB counts the GIOP message overhead, in this
- // test we assume the overhead to be less than 10%
-
- if (payload_delta < CORBA::ULong (GIOP_OVERHEAD * BUFFER_SIZE))
- {
- test_failed = 1;
- ACE_DEBUG ((LM_DEBUG,
- "DEBUG: Iteration %d flush before "
- "minimum buffer size was reached. "
- "Sent = %u, Minimum buffer = %u bytes\n",
- i,
- payload_delta, BUFFER_SIZE));
- }
- break;
- }
-
- if (payload_delta > 3 * BUFFER_SIZE)
- {
- test_failed = 1;
- ACE_DEBUG ((LM_DEBUG,
- "DEBUG: Iteration %d no flush past "
- "buffer size threshold. "
- "Sent = %u, Minimum buffer = %u bytes\n",
- i,
- payload_delta, BUFFER_SIZE));
- break;
- }
- }
- }
-
- int liveness_test_failed =
- run_liveness_test (oneway_buffering,
- flusher.in (),
- oneway_buffering_admin
- ACE_ENV_ARG_PARAMETER);
- ACE_CHECK_RETURN (-1);
-
- if (liveness_test_failed)
- test_failed = 1;
-
- return test_failed;
-}
diff --git a/TAO/tests/Oneway_Buffering/run_buffer_size.pl b/TAO/tests/Oneway_Buffering/run_buffer_size.pl
deleted file mode 100755
index 065f17c1d93..00000000000
--- a/TAO/tests/Oneway_Buffering/run_buffer_size.pl
+++ /dev/null
@@ -1,72 +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;
-
-$admin_iorfile = PerlACE::LocalFile ("admin.ior");
-$server_iorfile = PerlACE::LocalFile ("server.ior");
-$status = 0;
-
-unlink $admin_iorfile;
-unlink $server_iorfile;
-
-my $AD = 0;
-if (PerlACE::is_vxworks_test()) {
- $AD = new PerlACE::ProcessVX ("admin", "-o admin.ior");
-}
-else {
- $AD = new PerlACE::Process ("admin", "-o $admin_iorfile");
-}
-my $SV = new PerlACE::Process ("server", "-o $server_iorfile");
-my $CL = new PerlACE::Process ("client",
- " -k file://$server_iorfile "
- ."-a file://$admin_iorfile "
- ."-b ");
-
-$AD->Spawn ();
-
-if (PerlACE::waitforfile_timed ($admin_iorfile, 10) == -1) {
- print STDERR "ERROR: cannot find file <$admin_iorfile>\n";
- $AD->Kill (); $AD->TimedWait (1);
- exit 1;
-}
-
-$SV->Spawn ();
-
-if (PerlACE::waitforfile_timed ($server_iorfile, 10) == -1) {
- print STDERR "ERROR: cannot find file <$server_iorfile>\n";
- $AD->Kill (); $AD->TimedWait (1);
- $SV->Kill (); $SV->TimedWait (1);
- exit 1;
-}
-
-$client = $CL->SpawnWaitKill (300);
-
-if ($client != 0) {
- print STDERR "ERROR: client returned $client\n";
- $status = 1;
-}
-
-$server = $SV->WaitKill (10);
-
-if ($server != 0) {
- print STDERR "ERROR: server returned $server\n";
- $status = 1;
-}
-
-$admin = $AD->WaitKill (10);
-
-if ($admin != 0) {
- print STDERR "ERROR: admin returned $admin\n";
- $status = 1;
-}
-
-unlink $server_iorfile;
-unlink $admin_iorfile;
-
-exit $status;
diff --git a/TAO/tests/Oneway_Buffering/run_message_count.pl b/TAO/tests/Oneway_Buffering/run_message_count.pl
deleted file mode 100755
index 614b25b54ff..00000000000
--- a/TAO/tests/Oneway_Buffering/run_message_count.pl
+++ /dev/null
@@ -1,72 +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;
-
-$admin_iorfile = PerlACE::LocalFile ("admin.ior");
-$server_iorfile = PerlACE::LocalFile ("server.ior");
-$status = 0;
-
-unlink $admin_iorfile;
-unlink $server_iorfile;
-
-my $AD = 0;
-if (PerlACE::is_vxworks_test()) {
- $AD = new PerlACE::ProcessVX ("admin", "-o admin.ior");
-}
-else {
- $AD = new PerlACE::Process ("admin", "-o $admin_iorfile");
-}
-my $SV = new PerlACE::Process ("server", "-o $server_iorfile");
-my $CL = new PerlACE::Process ("client",
- " -k file://$server_iorfile "
- ."-a file://$admin_iorfile "
- ."-c ");
-
-$AD->Spawn ();
-
-if (PerlACE::waitforfile_timed ($admin_iorfile, 10) == -1) {
- print STDERR "ERROR: cannot find file <$admin_iorfile>\n";
- $AD->Kill (); $AD->TimedWait (1);
- exit 1;
-}
-
-$SV->Spawn ();
-
-if (PerlACE::waitforfile_timed ($server_iorfile, 10) == -1) {
- print STDERR "ERROR: cannot find file <$server_iorfile>\n";
- $AD->Kill (); $AD->TimedWait (1);
- $SV->Kill (); $SV->TimedWait (1);
- exit 1;
-}
-
-$client = $CL->SpawnWaitKill (300);
-
-if ($client != 0) {
- print STDERR "ERROR: client returned $client\n";
- $status = 1;
-}
-
-$server = $SV->WaitKill (10);
-
-if ($server != 0) {
- print STDERR "ERROR: server returned $server\n";
- $status = 1;
-}
-
-$admin = $AD->WaitKill (10);
-
-if ($admin != 0) {
- print STDERR "ERROR: admin returned $admin\n";
- $status = 1;
-}
-
-unlink $server_iorfile;
-unlink $admin_iorfile;
-
-exit $status;
diff --git a/TAO/tests/Oneway_Buffering/run_test.pl b/TAO/tests/Oneway_Buffering/run_test.pl
deleted file mode 100755
index c753bc938c8..00000000000
--- a/TAO/tests/Oneway_Buffering/run_test.pl
+++ /dev/null
@@ -1,69 +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;
-
-$admin_iorfile = PerlACE::LocalFile ("admin.ior");
-$server_iorfile = PerlACE::LocalFile ("server.ior");
-$status = 0;
-
-foreach $test_type ("-c", "-t", "-b", "-r") {
- unlink $admin_iorfile;
- unlink $server_iorfile;
-
- my $AD = new PerlACE::Process ("admin", "-o $admin_iorfile");
- my $SV = new PerlACE::Process ("server", "-o $server_iorfile " .
- "-k file://$admin_iorfile");
- my $CL = new PerlACE::Process ("client",
- " -k file://$server_iorfile "
- ."-a file://$admin_iorfile "
- .$test_type);
-
- $AD->Spawn ();
-
- if (PerlACE::waitforfile_timed ($admin_iorfile, 10) == -1) {
- print STDERR "ERROR: cannot find file <$admin_iorfile>\n";
- $AD->Kill (); $AD->TimedWait (1);
- exit 1;
- }
-
- $SV->Spawn ();
-
- if (PerlACE::waitforfile_timed ($server_iorfile, 10) == -1) {
- print STDERR "ERROR: cannot find file <$server_iorfile>\n";
- $AD->Kill (); $AD->TimedWait (1);
- $SV->Kill (); $SV->TimedWait (1);
- exit 1;
- }
-
- $client = $CL->SpawnWaitKill (300);
-
- if ($client != 0) {
- print STDERR "ERROR: client returned $client\n";
- $status = 1;
- }
-
- $server = $SV->WaitKill (10);
-
- if ($server != 0) {
- print STDERR "ERROR: server returned $server\n";
- $status = 1;
- }
-
- $admin = $AD->WaitKill (10);
-
- if ($admin != 0) {
- print STDERR "ERROR: admin returned $admin\n";
- $status = 1;
- }
-}
-
-unlink $server_iorfile;
-unlink $admin_iorfile;
-
-exit $status;
diff --git a/TAO/tests/Oneway_Buffering/run_timeout.pl b/TAO/tests/Oneway_Buffering/run_timeout.pl
deleted file mode 100755
index 4f8bbe2fde3..00000000000
--- a/TAO/tests/Oneway_Buffering/run_timeout.pl
+++ /dev/null
@@ -1,72 +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;
-
-$admin_iorfile = PerlACE::LocalFile ("admin.ior");
-$server_iorfile = PerlACE::LocalFile ("server.ior");
-$status = 0;
-
-unlink $admin_iorfile;
-unlink $server_iorfile;
-
-my $AD = 0;
-if (PerlACE::is_vxworks_test()) {
- $AD = new PerlACE::ProcessVX ("admin", "-o admin.ior");
-}
-else {
- $AD = new PerlACE::Process ("admin", "-o $admin_iorfile");
-}
-my $SV = new PerlACE::Process ("server", "-o $server_iorfile");
-my $CL = new PerlACE::Process ("client",
- " -k file://$server_iorfile "
- ."-a file://$admin_iorfile "
- ."-t ");
-
-$AD->Spawn ();
-
-if (PerlACE::waitforfile_timed ($admin_iorfile, 10) == -1) {
- print STDERR "ERROR: cannot find file <$admin_iorfile>\n";
- $AD->Kill (); $AD->TimedWait (1);
- exit 1;
-}
-
-$SV->Spawn ();
-
-if (PerlACE::waitforfile_timed ($server_iorfile, 10) == -1) {
- print STDERR "ERROR: cannot find file <$server_iorfile>\n";
- $AD->Kill (); $AD->TimedWait (1);
- $SV->Kill (); $SV->TimedWait (1);
- exit 1;
-}
-
-$client = $CL->SpawnWaitKill (300);
-
-if ($client != 0) {
- print STDERR "ERROR: client returned $client\n";
- $status = 1;
-}
-
-$server = $SV->WaitKill (10);
-
-if ($server != 0) {
- print STDERR "ERROR: server returned $server\n";
- $status = 1;
-}
-
-$admin = $AD->WaitKill (10);
-
-if ($admin != 0) {
- print STDERR "ERROR: admin returned $admin\n";
- $status = 1;
-}
-
-unlink $server_iorfile;
-unlink $admin_iorfile;
-
-exit $status;
diff --git a/TAO/tests/Oneway_Buffering/run_timeout_reactive.pl b/TAO/tests/Oneway_Buffering/run_timeout_reactive.pl
deleted file mode 100755
index f91953726d9..00000000000
--- a/TAO/tests/Oneway_Buffering/run_timeout_reactive.pl
+++ /dev/null
@@ -1,71 +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;
-
-$admin_iorfile = PerlACE::LocalFile ("admin.ior");
-$server_iorfile = PerlACE::LocalFile ("server.ior");
-
-unlink $admin_iorfile;
-unlink $server_iorfile;
-
-my $AD = 0;
-if (PerlACE::is_vxworks_test()) {
- $AD = new PerlACE::ProcessVX ("admin", "-o admin.ior");
-}
-else {
- $AD = new PerlACE::Process ("admin", "-o $admin_iorfile");
-}
-my $SV = new PerlACE::Process ("server", "-o $server_iorfile");
-my $CL = new PerlACE::Process ("client",
- " -k file://$server_iorfile "
- ."-a file://$admin_iorfile "
- ."-r ");
-
-$AD->Spawn ();
-
-if (PerlACE::waitforfile_timed ($admin_iorfile, 10) == -1) {
- print STDERR "ERROR: cannot find file <$admin_iorfile>\n";
- $AD->Kill (); $AD->TimedWait (1);
- exit 1;
-}
-
-$SV->Spawn ();
-
-if (PerlACE::waitforfile_timed ($server_iorfile, 10) == -1) {
- print STDERR "ERROR: cannot find file <$server_iorfile>\n";
- $AD->Kill (); $AD->TimedWait (1);
- $SV->Kill (); $SV->TimedWait (1);
- exit 1;
-}
-
-$client = $CL->SpawnWaitKill (300);
-
-if ($client != 0) {
- print STDERR "ERROR: client returned $client\n";
- $status = 1;
-}
-
-$server = $SV->WaitKill (10);
-
-if ($server != 0) {
- print STDERR "ERROR: server returned $server\n";
- $status = 1;
-}
-
-$admin = $AD->WaitKill (10);
-
-if ($admin != 0) {
- print STDERR "ERROR: admin returned $admin\n";
- $status = 1;
-}
-
-unlink $server_iorfile;
-unlink $admin_iorfile;
-
-exit $status;
diff --git a/TAO/tests/Oneway_Buffering/server.cpp b/TAO/tests/Oneway_Buffering/server.cpp
deleted file mode 100644
index 6997308857d..00000000000
--- a/TAO/tests/Oneway_Buffering/server.cpp
+++ /dev/null
@@ -1,136 +0,0 @@
-// $Id$
-
-#include "Oneway_Buffering.h"
-#include "ace/Get_Opt.h"
-#include "ace/OS_NS_stdio.h"
-
-ACE_RCSID(Oneway_Buffering, server, "$Id$")
-
-const char *ior_output_file = "server.ior";
-const char *ior = "file://admin.ior";
-
-int
-parse_args (int argc, char *argv[])
-{
- ACE_Get_Opt get_opts (argc, argv, "o:k:");
- int c;
-
- while ((c = get_opts ()) != -1)
- switch (c)
- {
- case 'o':
- ior_output_file = get_opts.opt_arg ();
- break;
-
- case 'k':
- ior = get_opts.opt_arg ();
- break;
-
- case '?':
- default:
- ACE_ERROR_RETURN ((LM_ERROR,
- "usage: %s "
- "-o <iorfile> "
- "-k <ior> "
- "\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;
-
- CORBA::Object_var tmp =
- orb->string_to_object(ior ACE_ENV_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- Test::Oneway_Buffering_Admin_var admin =
- Test::Oneway_Buffering_Admin::_narrow(tmp.in () ACE_ENV_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- if (CORBA::is_nil (admin.in ()))
- {
- ACE_ERROR_RETURN ((LM_DEBUG,
- "Nil Oneway_Buffering_Admin reference <%s>\n",
- ior),
- 1);
- }
-
- Oneway_Buffering *oneway_buffering_impl;
- ACE_NEW_RETURN (oneway_buffering_impl,
- Oneway_Buffering (orb.in (),
- admin.in ()),
- 1);
- PortableServer::ServantBase_var owner_transfer(oneway_buffering_impl);
-
- Test::Oneway_Buffering_var oneway_buffering =
- oneway_buffering_impl->_this (ACE_ENV_SINGLE_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- CORBA::String_var ior =
- orb->object_to_string (oneway_buffering.in () ACE_ENV_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- // If the ior_output_file exists, output the ior to it
- FILE *output_file= ACE_OS::fopen (ior_output_file, "w");
- if (output_file == 0)
- ACE_ERROR_RETURN ((LM_ERROR,
- "Cannot open output file for writing IOR: %s",
- ior_output_file),
- 1);
- ACE_OS::fprintf (output_file, "%s", ior.in ());
- ACE_OS::fclose (output_file);
-
- poa_manager->activate (ACE_ENV_SINGLE_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 in server:");
- return 1;
- }
- ACE_ENDTRY;
-
- return 0;
-}