3 This is a unit test for RTCORBA::PrivateConnectionPolicy.
7 The server creates two servants, registers them with the Root POA,
8 prints out their IORs and waits for the requests from the client. The
9 client obtains the IORs, makes several invocations on the objects,
10 then sets RTCORBA::PrivateConnectionPolicy on PolicyCurrent (i.e.,
11 thread-level) and makes a few more invocations on the objects.
13 The goal of the test is to check that new connections are established
14 only when expected, and that appropriate connection is used for each
15 invocation. Since what we are trying to verify are the internal
16 workings of the ORB, we are relying on ORB debug messages to do it.
18 Client makes a total of 8 invocations (not counting the shutdown
19 request at the end). A message containing invocation number, whether
20 the new connection is to be established, and, if not, which one should
21 be reused, is printed out before each invocation. ORB debug messages
22 that follow allow us to verify whether things worked as expected. See
23 Expected output section below for more information.
27 $./server [-o <ior_output_file1> -p <ior_output_file2>]
28 $./client [-o <ior1> -p <ior2>] -ORBdebuglevel 3
35 -o <ior_output_file1> Default: test1.ior
36 Filename for output of the IOR of the first
39 -p <ior_output_file2> Default: test2.ior
40 Filename for output of the IOR of the
41 second testing object.
45 -o <ior1> Default: file://test1.ior
46 IOR of the first test object.
48 -p <ior2> Default: file://test2.ior
49 IOR of the second test object.
51 -ORBdebuglevel 3 Default: none
52 Recommended debug level is 3 or higher.
56 Below is a sample output from run_test.pl on NT. Please note that
57 since in this test we are relying on ORB debug messages
59 1) test output may look different from that shown below as ORB debug
61 2) the output may contain some debug information irrelevant to this
62 test, e.g., parsed header info in the output below
65 ********** RTCORBA Private Connection Unit Test
67 <IOR:010000000d00000049444c3a546573743a312e300000000001000000000000007e00000001
68 102cd050000006865726100cdc3051b00000014010f0052535422181a3a88bb0600000000000100
69 00001000000cd03000000000000000800000001cdcdcd004f4154010000001400000001cdcdcd01
70 00100000000000901010000000000024f41541600000001cdcdcd01000000050000006865726100
73 <IOR:010000000d00000049444c3a546573743a312e300000000001000000000000007e00000001
74 102cd050000006865726100cdc3051b00000014010f0052535422181a3a88bb0600010000000100
75 00002000000cd03000000000000000800000001cdcdcd004f4154010000001400000001cdcdcd01
76 00100000000000901010000000000024f41541600000001cdcdcd01000000050000006865726100
79 TAO (976|1072) Loaded default protocol <IIOP_Factory>
80 TAO (976|1072) created new ORB <>
82 Invocation 1 --> new connection
83 (976|1072) IIOP_Connector::connect - making a new connection
84 (976|1072) IIOP_Connector::connect - new connection on HANDLE 296
85 Server: test_method invoked.
86 TAO (976|1072) Parsed header = <1,2,1,1,12>
88 Invocation 2 --> use connection from invocation 1
89 (976|1072) IIOP_Connector::connect - got an existing connection on HANDLE 296
90 Server: test_method invoked.
91 TAO (976|1072) Parsed header = <1,2,1,1,12>
93 Invocation 3 --> use connection from invocation 1
94 (976|1072) IIOP_Connector::connect - got an existing connection on HANDLE 296
95 Server: test_method invoked.
96 TAO (976|1072) Parsed header = <1,2,1,1,12>
98 Invocation 4 --> use connection from invocation 1
99 (976|1072) IIOP_Connector::connect - got an existing connection on HANDLE 296
100 Server: test_method invoked.
101 TAO (976|1072) Parsed header = <1,2,1,1,12>
103 Invocation 5 --> new connection
104 (976|1072) IIOP_Connector::connect - making a new connection
105 (976|1072) IIOP_Connector::connect - new connection on HANDLE 316
106 Server: test_method invoked.
107 TAO (976|1072) Parsed header = <1,2,1,1,12>
109 Invocation 6 --> new connection
110 (976|1072) IIOP_Connector::connect - making a new connection
111 (976|1072) IIOP_Connector::connect - new connection on HANDLE 328
112 Server: test_method invoked.
113 TAO (976|1072) Parsed header = <1,2,1,1,12>
115 Invocation 7 --> use connection from invocation 5
116 (976|1072) IIOP_Connector::connect - got an existing connection on HANDLE 316
117 Server: test_method invoked.
118 TAO (976|1072) Parsed header = <1,2,1,1,12>
120 Invocation 8 --> use connection from invocation 6
121 (976|1072) IIOP_Connector::connect - got an existing connection on HANDLE 328
122 Server: test_method invoked.
123 TAO (976|1072) Parsed header = <1,2,1,1,12>
125 Testing over - shutting down
126 (976|1072) IIOP_Connector::connect - got an existing connection on HANDLE 316
127 Server ORB event loop finished
129 TAO (976|1072) IIOP_Client_Connection_Handler::handle_close (296, 511)
130 TAO (976|1072) IIOP_Client_Connection_Handler::handle_close (328, 511)
131 TAO (976|1072) IIOP_Client_Connection_Handler::handle_close (316, 511)