summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authormarina <marina@ae88bc3d-4319-0410-8dbf-d08b4c9d3795>2000-11-22 00:06:28 +0000
committermarina <marina@ae88bc3d-4319-0410-8dbf-d08b4c9d3795>2000-11-22 00:06:28 +0000
commitb56e1daac71945f0ed80c62a959922c8d18ed7ed (patch)
tree017139171f928a98124c6a723acc3cb7acdf2fed
parent89ddaafba19e0662b35705d4462f71d2ade03a50 (diff)
downloadATCD-b56e1daac71945f0ed80c62a959922c8d18ed7ed.tar.gz
ChangelogTag:Tue Nov 21 18:04:00 2000 Marina Spivak <marina@cs.wustl.edu>
-rw-r--r--TAO/tests/RTCORBA/Banded_Connections/README271
-rw-r--r--TAO/tests/RTCORBA/README7
2 files changed, 189 insertions, 89 deletions
diff --git a/TAO/tests/RTCORBA/Banded_Connections/README b/TAO/tests/RTCORBA/Banded_Connections/README
index fc367260a41..dfab6b9c90f 100644
--- a/TAO/tests/RTCORBA/Banded_Connections/README
+++ b/TAO/tests/RTCORBA/Banded_Connections/README
@@ -1,130 +1,225 @@
$Id$
-This is a unit test for RTCORBA::SERVER_DECLARED priority model.
+This is a test for RTCORBA::PriorityBandedConnectionPolicy.
+
+Description
+-----------
+This test consists of seven mini-tests, each exercising
+some aspect of PriorityBandedConnectionPolicy:
+
+(Server)
+
+1. Attempt to create a POA with
+ RTCORBA::PriorityBandedConnectionPolicy but without the
+ RTCORBA::PriorityModelPolicy. Should get POA::InvalidPolicy
+ exception.
+
+2. Attempt to create a POA with
+ RTCORBA::PriorityBandedConnectionPolicy where bands do not match
+ the resources of the POA, i.e., threadpool lanes/endpoints.
+ Should get POA::InvalidPolicy exception.
+
+3. Create a POA with RTCORBA::SERVER_DECLARED priority model and
+ RTCORBA::PriorityBandedConnectionPolicy. Attempt to register an
+ object with priority that doesn't match the resources/configuration
+ of that POA, i.e., its priority bands. Should get BAD_PARAM exception.
+
+(Client)
+
+4. Set RTCORBA::PriorityBandedConnectionPolicy on the object where
+ bands do not match server resources, i.e., threadpool
+ lanes/endpoints. Attempt an invocation on the object. Should get
+ INV_POLICY exception.
+
+5. Set RTCORBA::PriorityBandedConnectionPolicy on the object with
+ CLIENT_PROPAGATED priority model where bands match server
+ resources. Attempt several invocations on the object, changing the
+ priority of the invoking client thread before each. This should
+ succeed, Verify that correct band is being used for each invocation, and
+ that appropriate server threadpool lane is providing the service.
+
+6. Now attempt one more invocation on the same object (with
+ CLIENT_PROPAGATED and bands), but with the client thread priority
+ not matching any of the bands. Should get INV_POLICY exception.
+
+7. Attempt invocation on an object with SERVER_DECLARED priority model
+ and RTCORBA::PriorityBandedConnectionPolicy set using the client
+ thread with priority not matching any of the object's priority
+ bands. This should succeed. Verify the correct band and server
+ threadpool lane are being used for the invocation.
Scenario:
----------
-
-The server creates a POA with RTCORBA::SERVER_DECLARED priority model
-policy. Two objects are created using this POA, one inherits the POA
-priority and the second one overrides POA priority with its own.
-Server threadpool resources are configured appropriately. (Once POA
-threadpools are completely supported, this means associating a
-two-lane threadpool with the POA, one lane corresponding to POA
-priority, and another to object priority. However, currently, while
-RTCORBA POA threadpools are not in place yet, this means emulating POA
-threadpool with TAO's Reactor-per-priority scheme, i.e., ORB-level
-pool with lane for each endpoint priority.) Finally, the server
-attempts to create a third object, using invalid/not matching the
-resources priority, i.e., priority not matching any of the pool
-lanes. This attempt should fail, and the server expects to receive
-the appropriate exception.
-
-The client obtains two object references and invokes a method on each
-several times. On each invocation, the client passes object's server
-declared priority as operation argument. This allows the servant to
-check that appropriate resources are being used for servicing client
-requests. In particular, servant checks that priority of the thread
-used for servicing the request equals to the server declared priority
-of the object, known from the operation argument.
To run (on Unix):
-------
-$./server [-p <ior_output_file1> -o <ior_output_file2> -c <wrong_priority>]
- -a <poa_priority> -b <object_priority>
- -ORBsvcconf server.conf
- -ORBendpoint xxxx://targethost:0/priority=<poa_priority>
- -ORBendpoint xxxx://targethost:0/priority=<object_priority>
+$./server [-n <ior_output_file1> -o <ior_output_file2>]
+ [-w <wrong_priority> -b <bands_file>]
+ -p <poa_priority>
+ -ORBdebuglevel 1 -ORBSvcConf server.conf
+ -ORBendpoint iiop://targethost:0/priority=<priority_for_band1>
+ -ORBendpoint iiop://targethost:0/priority=<priority_for_band2>
[more endpoints if desired]
-$./client [-p <ior1> -o <ior2>]
+$./client [-n <ior1> -o <ior2>]
+ -a <client_priority1> -b <client_priority2> -c <client_priority3>
+ -ORBSvcConf client.conf
Options:
--------
Server:
--p <ior_output_file1> Default: test1.ior
+-n <ior_output_file1> Default: test1.ior
Filename for output of the first object's IOR
- (i.e., object that does not override POA
- priority).
+ (the object with CLIENT_PROPAGATED priority
+ model.)
-o <ior_output_file2> Default: test2.ior
Filename for output of the second object's IOR
- (i.e., object that overrides POA priority).
-
--a <poa_priority> Default: -1, must be overridden
- SERVER_DECLARED priority of the poa.
-
--b <object_priority> Default: -1, must be overridden
- SERVER_DECLARED priority of the second object.
-
--c <wrong_priority> Default: -1
- Invalid/not matching the configuration
- priority value, used in an attempt to activate
- a third object. The test checks that such
- attempt fails and an appropriate exception is
- thrown.
+ (the object with SERVER_DECLARED priority
+ model and PriorityBandedConnectionPolicy set.)
+
+-b <bands_file> Default: bands
+ Name of the file containing priority bands
+ used for the test (on server and client).
+
+ The format of the file is a single line, with
+ no leading or trailing spaces, with a list of
+ all bands' lows and highs. Single space
+ is used to separate values. For example:
+ 65 69 74 76 80 80
+
+-p <poa_priority> Default: -1, must be overridden.
+ SERVER_DECLARED priority of the poa. Must
+ match one of the bands specified in the
+ <bands_file>.
+
+-w <wrong_priority> Default: -1
+ Priority not matching any of the priority
+ bands. Used for test #3.
+
+-ORBdebuglevel 1 Default: none
+ This ORB option is useful for verifying that
+ correct band/threadpool lane are used during
+ invocations.
The following are the required server ORB options for this test.
-These options help set up server resources to emulate a two-lane POA
-threadpool, one lane with <poa_priority>, and one lane
-with <object_priority>. Once POA threadpools are implemented, these
+These options help set up server resources to emulate POA
+threadpool with ORB pool. Once POA threadpools are implemented, these
options will go away.
-ORBSvcConf server.conf
--ORBendpoint xxxx://targethost:0/priority=<poa_priority>
--ORBendpoint xxxx://targethost:0/priority=<object_priority>
+-ORBendpoint xxxx://targethost:0/priority=<priority_for_band1>
+-ORBendpoint xxxx://targethost:0/priority=<priority_for_band2>
+... There must be enough endpoints to cover all bands specified in
+the <bands_file>. For an example, see run_test.pl
Client:
--p <ior1> Default: file://test1.ior
- IOR for the first object (with POA's
- priority).
+-n <ior1> Default: file://test1.ior
+ IOR for the first object (with
+ CLIENT_PROPAGATED priority model).
-o <ior2> Default: file://test2.ior
- IOR for the second object.
-
+ IOR for the second object (with
+ SERVER_DECLARED priority model and priority
+ bands).
+
+-a <client_priority1> Default: -1, must be overridden.
+ Client thread priority that will be used for
+ one of the invocations. Must match one of the
+ bands specified in the <bands_file>. Used for
+ test #5.
+
+-b <client_priority2> Default: -1, must be overridden.
+ Client thread priority that will be used for
+ one of the invocations. Must match one of the
+ bands specified in the <bands_file>. Used for
+ test #5.
+
+-c <client_priority3> Default: -1, must be overridden.
+ Client thread priority that will be used for
+ one of the invocations. Must not match any
+ of the bands specified in the <bands_file>.
+ Used for test #6.
Expected output:
----------------
-Below is the expected output from run_test.pl on a Windows
-platform. See run_test.pl for command-line options used for client and
-server. NOTE: expected output differs on unix.
+Below is the output from run_test.pl on Unix. (On windows, different
+priority values are used). See run_test.pl for more info. Note, due
+to the use of -ORBdebuglevel option, test output may differ from what
+is shown above as ORB debug messages are modified and added.
-In general, the output must contain "BAD_PARAM exception is caught as
-expected.", and server declared priorities must equal corresponding
-servant thread priorities.
+In general, tests 1, 2, 3, 4, and 6 must result in expected exceptions
+being caught. In test 5 and 7, object and server thread priorities
+must match one of the priority bands, and all of the priority values
+must correspond to those specified with the command-line options.
+********** RTCORBA Priority Banded Connections Unit Test
+TAO (25332|1) Loaded default protocol <IIOP_Factory>
+TAO (25332|1) Loaded default protocol <UIOP_Factory>
+TAO (25332|1) Loaded default protocol <SHMIOP_Factory>
-********** RTCORBA SERVER_DECLARED Priority Unit Test
+ Test 1
+InvalidPolicy exception is caught as expected.
+ Test 2
+InvalidPolicy exception is caught as expected.
-Activated object one as <IOR:010000000d00000049444c3a546573743a312e3000000000010
-0000000000000b2000000010102cd0a0000006c6f63616c686f7374004b052300000014010f004e5
-354790af039d4650c000100000001000000000000000100000001000000cd0400000000000000080
-0000001cdcdcd004f4154010000001400000001cdcdcd01000100000000000901010000000000024
-f41541a00000001cdcdcd010000000a0000006c6f63616c686f7374004b050300cdcd020000001a0
-0000001cdcdcd01000000020041540a00000001cdcdcd010000000300>
+ Test 3
+BAD_PARAM exception is caught as expected.
+Activated object one as <IOR:000000000000000d49444c3a546573743a312e30000000000000000100000000000000da00010200000
+0000a6c6f63616c686f737400e0150000002314010f004e53543a1ade88000056de000000010000000100000000000000010000000100000
+0000400000000000000080000000054414f000000000100000014000000000001000100000000000101090000000054414f0200000042000
+00000000000030000000a6c6f63616c686f737400e015004200000000000a6c6f63616c686f737400e017005000000000000a6c6f63616c6
+86f737400e016004b0000000000020000001a0000000000000001544100020000000a00000000000000000000>
-Activated object two as <IOR:010000000d00000049444c3a546573743a312e3000000000010
-0000000000000b2000000010102cd0a0000006c6f63616c686f7374004e052300000014010f004e5
-354790af039d4650c000100000001000000010000000100000002000000cd0400000000000000080
-0000001cdcdcd004f4154010000001400000001cdcdcd01000100000000000901010000000000024
-f41541a00000001cdcdcd010000000a0000006c6f63616c686f7374004e050500cdcd020000001a0
-0000001cdcdcd01000000020041540a00000001cdcdcd010000000500>
-BAD_PARAM exception is caught as expected.
-Server_Declared priority: 3 Servant thread priority: 3
-Server_Declared priority: 5 Servant thread priority: 5
-Server_Declared priority: 3 Servant thread priority: 3
-Server_Declared priority: 5 Servant thread priority: 5
-Server_Declared priority: 3 Servant thread priority: 3
-Server_Declared priority: 5 Servant thread priority: 5
-Server_Declared priority: 3 Servant thread priority: 3
-Server_Declared priority: 5 Servant thread priority: 5
-Server_Declared priority: 3 Servant thread priority: 3
-Server_Declared priority: 5 Servant thread priority: 5
+Activated object two as <IOR:000000000000000d49444c3a546573743a312e30000000000000000100000000000000f600010200000
+0000a6c6f63616c686f737400e0150000002314010f004e53543a1ade8800005aff000000020000000100000000000000010000000100000
+0000400000000000000080000000054414f000000000100000014000000000001000100000000000101090000000054414f0200000042000
+00000000000030000000a6c6f63616c686f737400e015004200000000000a6c6f63616c686f737400e017005000000000000a6c6f63616c6
+86f737400e016004b0000000000020000003600000000000000025441000700000014000000000000000300410045004a004c00500050544
+100020000000a00000000000000010043>
+
+
+ Test 4
+INV_POLICY exception is caught as expected.
+
+ Test 5
+TAO (25332|5) IIOP connection from client<127.0.0.1:57368> on 17
+RTCORBA::CLIENT_PROPAGATED processing (25332|5): original thread priority 75 temporarily changed to 76
+
+Object bands:
+1) 65 69
+2) 74 76
+3) 80 80
+Object priority: 76 Servant thread priority: 76
+Band 2 was used for this invocation
+TAO (25332|6) IIOP connection from client<127.0.0.1:57369> on 18
+
+Object bands:
+1) 65 69
+2) 74 76
+3) 80 80
+Object priority: 80 Servant thread priority: 80
+Band 3 was used for this invocation
+
+ Test 6
+INV_POLICY exception is caught as expected.
+
+ Test 7
+TAO (25332|4) IIOP connection from client<127.0.0.1:57370> on 19
+
+Object bands:
+1) 65 69
+2) 74 76
+3) 80 80
+Object priority: 67 Servant thread priority: 66
+Band 1 was used for this invocation
+
Server ORB event loop finished
+
+
diff --git a/TAO/tests/RTCORBA/README b/TAO/tests/RTCORBA/README
index f656e2ae28d..e82186edd3d 100644
--- a/TAO/tests/RTCORBA/README
+++ b/TAO/tests/RTCORBA/README
@@ -44,4 +44,9 @@ includes the following:
. Private_Connection
- Tests RTCORBA::PrivateConnectionPolicy support. \ No newline at end of file
+ Tests RTCORBA::PrivateConnectionPolicy support.
+
+ . Banded_Connections
+
+ Tests RTCORBA::PriorityBandedConnectionPolicy.
+