summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorirfan <irfan@ae88bc3d-4319-0410-8dbf-d08b4c9d3795>2001-08-13 00:10:14 +0000
committerirfan <irfan@ae88bc3d-4319-0410-8dbf-d08b4c9d3795>2001-08-13 00:10:14 +0000
commit142f19e326b1910e61c09bc0d41dd470be7122d4 (patch)
tree20064a6a5967443c201cc0b1ebbc66a56c3b98d4
parent1b35161801c2f999ec1343a36d3e93d8fcaad594 (diff)
downloadATCD-142f19e326b1910e61c09bc0d41dd470be7122d4.tar.gz
Changed test to use RT threadpools instead of proprietary Reactor_Per_Priority model
-rwxr-xr-xTAO/tests/RTCORBA/Server_Declared/run_test.pl15
-rw-r--r--TAO/tests/RTCORBA/Server_Declared/server.conf1
-rw-r--r--TAO/tests/RTCORBA/Server_Declared/server.cpp53
3 files changed, 4 insertions, 65 deletions
diff --git a/TAO/tests/RTCORBA/Server_Declared/run_test.pl b/TAO/tests/RTCORBA/Server_Declared/run_test.pl
index 5c73bc8a7a6..faf44c15a12 100755
--- a/TAO/tests/RTCORBA/Server_Declared/run_test.pl
+++ b/TAO/tests/RTCORBA/Server_Declared/run_test.pl
@@ -23,27 +23,18 @@ $server_conf = PerlACE::LocalFile ("server.conf");
# available range.
$server_args =
- "-p $iorfile1 -o $iorfile2 -a 65 -b 75 -c 70 -ORBSvcConf $server_conf "
- ."-ORBendpoint iiop://$TARGETHOSTNAME:0/priority=65 "
- ."-ORBendpoint iiop://$TARGETHOSTNAME:0/priority=75 "
- ."-ORBendpoint iiop://$TARGETHOSTNAME:0/priority=73 ";
+ "-p $iorfile1 -o $iorfile2 -a 65 -b 75 -c 70 -ORBSvcConf $server_conf";
print STDERR "Value is " . $^O;
if ($^O eq "MSWin32") {
$server_args =
- "-p $iorfile1 -o $iorfile2 -a 3 -b 5 -c 2 -ORBSvcConf $server_conf "
- ."-ORBendpoint iiop://$TARGETHOSTNAME:0/priority=3 "
- ."-ORBendpoint iiop://$TARGETHOSTNAME:0/priority=5 "
- ."-ORBendpoint iiop://$TARGETHOSTNAME:0/priority=1 ";
+ "-p $iorfile1 -o $iorfile2 -a 3 -b 5 -c 2 -ORBSvcConf $server_conf ";
}
if ($^O eq "dec_osf") {
$server_args =
- "-p $iorfile1 -o $iorfile2 -a 20 -b 30 -c 25 -ORBSvcConf $server_conf "
- ."-ORBendpoint iiop://$TARGETHOSTNAME:0/priority=20 "
- ."-ORBendpoint iiop://$TARGETHOSTNAME:0/priority=30 "
- ."-ORBendpoint iiop://$TARGETHOSTNAME:0/priority=28 ";
+ "-p $iorfile1 -o $iorfile2 -a 20 -b 30 -c 25 -ORBSvcConf $server_conf ";
}
$client_args = "-p file://$iorfile1 -o file://$iorfile2";
diff --git a/TAO/tests/RTCORBA/Server_Declared/server.conf b/TAO/tests/RTCORBA/Server_Declared/server.conf
index d7aeb5a6bf1..a4e457190d3 100644
--- a/TAO/tests/RTCORBA/Server_Declared/server.conf
+++ b/TAO/tests/RTCORBA/Server_Declared/server.conf
@@ -1,4 +1,3 @@
# $Id$
#
-static Advanced_Resource_Factory "-ORBReactorType tp -ORBReactorRegistry per-priority"
static RT_ORB_Loader ""
diff --git a/TAO/tests/RTCORBA/Server_Declared/server.cpp b/TAO/tests/RTCORBA/Server_Declared/server.cpp
index b1b49851acc..d844094f105 100644
--- a/TAO/tests/RTCORBA/Server_Declared/server.cpp
+++ b/TAO/tests/RTCORBA/Server_Declared/server.cpp
@@ -3,7 +3,6 @@
#include "testS.h"
#include "ace/Get_Opt.h"
#include "tao/RTCORBA/RTCORBA.h"
-#include "tao/RTCORBA/Pool_Per_Endpoint.h"
#include "tao/RTPortableServer/RTPortableServer.h"
#include "tao/Strategies/advanced_resource.h"
@@ -216,43 +215,6 @@ create_object (RTPortableServer::POA_ptr poa,
return 0;
}
-void
-exception_test (RTPortableServer::POA_ptr poa,
- Test_i *server_impl,
- CORBA::Short priority,
- const char *msg,
- CORBA::Environment &ACE_TRY_ENV)
-{
- ACE_TRY
- {
- // Register with poa.
- PortableServer::ObjectId_var id =
- poa->activate_object_with_priority (server_impl,
- priority,
- ACE_TRY_ENV);
- ACE_TRY_CHECK;
-
- CORBA::Object_var server =
- poa->id_to_reference (id.in (),
- ACE_TRY_ENV);
- ACE_TRY_CHECK;
-
- ACE_DEBUG ((LM_DEBUG, msg));
- }
- ACE_CATCH (CORBA::BAD_PARAM, ex)
- {
- ACE_DEBUG ((LM_DEBUG,
- "BAD_PARAM exception is caught as expected.\n"));
- }
- ACE_CATCHANY
- {
- ACE_DEBUG ((LM_DEBUG, msg));
- ACE_RE_THROW;
- }
- ACE_ENDTRY;
- ACE_CHECK;
-}
-
int
main (int argc, char *argv[])
{
@@ -342,24 +304,12 @@ main (int argc, char *argv[])
if (result == -1)
return 1;
- // Attempt to create object 3, overriding POA's priority with
- // the priority value that does not match server resource
- // configuration. Should get BAD_PARAM exception.
- exception_test (rt_poa.in (), &server_impl, wrong_priority,
- "ERROR: BAD_PARAM exception not thrown.\n",
- ACE_TRY_ENV);
- ACE_TRY_CHECK;
-
// Activate POA manager.
poa_manager->activate (ACE_TRY_ENV);
ACE_TRY_CHECK;
// Start ORB event loop.
- // @@ Currently we are using Reactor per priority to emulate
- // threadpool with lanes. Once POA threadpools are implemented,
- // this code should be replaced with standard threadpool apis.
- TAO_Pool_Per_Endpoint pool (orb.in ());
- pool.run (ACE_TRY_ENV);
+ orb->run (ACE_TRY_ENV);
ACE_TRY_CHECK;
ACE_DEBUG ((LM_DEBUG, "Server ORB event loop finished\n\n"));
@@ -374,4 +324,3 @@ main (int argc, char *argv[])
return 0;
}
-