3 This is a unit test for RTCORBA::ClientProtocolPolicy.
7 This test consists of five mini-tests, each exercising
8 ClientProtocolPolicy in a different configuration:
10 1. Invoke an operation on the object that had ClientProtocolPolicy set
11 on the server side. Make sure the protocol dictated by the policy is
12 used for communication.
14 2. Set ORB-level ClientProtocolPolicy override on the client ORB, and
15 invoke an operation on an object that had ClientProtocolPolicy set
16 on the server side. Should receive CORBA::INV_POLICY exception
17 since the policy is set on both client and server sides.
19 3. Set ORB-level ClientProtocolPolicy override on the client ORB, and
20 invoke an operation on an object that did *not* have
21 ClientProtocolPolicy set on the server side. Make sure the
22 protocol dictated by the policy override is used for communication.
24 4. Set ClientProtocolPolicy override on the Current level in the
25 client ORB, and invoke an operation on an object that did *not*
26 have ClientProtocolPolicy set on the server. The override value is
27 a sequence of protocols none of which are available in the server
28 ORB. Should receive CORBA::INV_POLICY exception since none of the
29 protocols specified in the policy are available for communication.
31 5. Set ClientProtocolPolicy override on the Current level in the
32 client ORB, and invoke an operation on an object that did *not*
33 have ClientProtocolPolicy set on the server. The override value is
34 a sequence of two protocols, in which the first protocol isn't
35 available in the server ORB, and the second protocol is available
36 in both client and server ORBs. Make sure the second protocol
37 specified in the override is used for communication.
42 The server creates two objects: one with ClientProtocolPolicy set and
43 the other one without the policy being set. The value of the
44 ClientProtocolPolicy is a single protocol specified using server
45 command-line option (see Options section below). The client obtains
46 two object references and uses them to run five tests decribed
47 above. Finally, the client invokes <shutdown> method on the server to
48 terminate the processes.
52 $./server [-s <ior_output_file1> -c <ior_output_file2> -p <profile_id>]
53 $./client [-s <ior1> -c <ior2> -p <profile_id>] -ORBdebuglevel 1
60 -s <ior_output_file1> Default: test1.ior
61 Filename for output of IOR for the object that
62 had ClientProtocolPolicy set on the server.
64 -c <ior_output_file2> Default: test2.ior
65 Filename for output of IOR for the object that
66 did not have ClientProtocolPolicy set on the
69 -p <profile_id> Default: 0 (IIOP)
70 Protocol used as a ClientProtocolPolicy value
71 for one of the server's objects.
75 -s <ior_output_file1> Default: file://test1.ior
76 IOR for the object that had
77 ClientProtocolPolicy set on the server.
79 -c <ior_output_file2> Default: file://test2.ior
80 IOR for the object that did not have
81 ClientProtocolPolicy set on the server.
83 -p <profile_id> Default: 0 (IIOP)
84 Protocol used as a ClientProtocolPolicy value
87 -ORBdebuglevel 1 Recommended ORB option for the client in order to see
88 which protocols are being used in each
89 mini-test for client-server communication.
95 Test 1: invocation should succeed using the protocol specified with
96 <-p> option to the server.
97 Tests 2 and 4: should produce INV_POLICY exception.
98 Tests 3 and 5: invocation should succeed using the protocol specified
99 with <-p> option to the client.
101 Below is the expected output from run_test.pl on a Unix platform. See
102 run_test.pl for command-line options used for client and server.
103 NOTE: expected output differs on windows due to UIOP not being
107 ********** RTCORBA Client Protocol Policy Unit Test
110 Activated object one as <IOR:000000000000000d49444c3a546573743a312e30000000000000000012000010200000000116163652e63732e777573746c2e6564750000c62d00000023439e940eb000e405a000000010000000100000000000000010000000100000000040000000000054414f000000000100000014000000000001000100000000000101090000000054414f0200000000004000000116163652e63732e777573746c2e6564750000c62d00000000000000116167573746c2e6564750000c62d00000000000000116163652e63732e777573746c2e656475000000000126163652e646f632e777573746c2e65647500c62d0000000000000002000000240000041000500000014000000000000000154414f00000100000001000054414f00000000d0000102661722f746d702f54414f414141514d614f53580000000000002314010f004e535439e940eb00100000001000000000000000100000001000000000400000000000000080000000054414f00014000000000001000100000000000101090000000054414f020000002400000000000000010722f746d702f54414f414141514d614f535800000000000002000000240000000000000001544000000000000000154414f00000100000001000054414f02000000cc00010200000000116167573746c2e6564750061c62e0000002314010f004e535439e940eb000e405a000000010000000000100000001000000000400000000000000080000000054414f00000000010000001400000000000000101090000000054414f02000000220000000000000001000000116163652e63732e564750000c62e00004f5300000002000000240000000000000001544100050000001400000004f000001000000010000>
113 Activated object two as <IOR:000000000000000d49444c3a546573743a312e3000000000000000000ea00010200000000116163652e63732e777573746c2e6564750000c62d0000001b439e940eb000e257a000000000000000100000001000000000300000000000000080000000050100000014000000000001000100000000000101090000000054414f0200000076000000000016163652e63732e777573746c2e6564750000c62d00000000000000116163652e63732e777570009c62d0000cb40000000116163652e63732e777573746c2e6564750000c62d00000000000046f632e777573746c2e65647500c62d0000000054414f000000009c00010200000000162f76654414f414141514d614f535800001b0000001b14010f0052535439e940eb000e257a00000000001030000000300000000000000080000000054414f00000000010000001400000000000100001090000000054414f02000000240000000000000001000000162f7661722f746d702f54414ff535800000054414f020000009600010200000000116163652e63732e777573746c2e65647501b14010f0052535439e940eb000e257a00000000000000010000000100000000030000000000054414f000000000100000014000000000001000100000000000101090000000054414f0200000000001000000116163652e63732e777573746c2e6564750063c62e0000>
115 TAO (25450|1) Loaded default protocol <IIOP_Factory>
116 TAO (25450|1) Loaded default protocol <UIOP_Factory>
117 TAO (25450|1) Loaded default protocol <SHMIOP_Factory>
120 TAO (25450|1) Connector::connect - looking for UIOP connection.
121 TAO (25450|1) UIOP connection to server <> on 8
122 Test method invoked on the sever
125 INV_POLICY exception is caught as expected.
128 TAO (25450|1) Connector::connect - looking for SHMIOP connection.
129 TAO (25450|1) SHMIOP connection to server <127.0.0.1:50734> on 9
130 Test method invoked on the sever
133 INV_POLICY exception is caught as expected.
136 TAO (25450|1) Connector::connect - looking for SHMIOP connection.
137 Test method invoked on the sever
140 TAO (25450|1) Connector::connect - looking for SHMIOP connection.
141 Server ORB event loop finished