summaryrefslogtreecommitdiff
path: root/trunk/TAO/tests/RTCORBA/Private_Connection/README
blob: 8ba353b0f573cfb8ebca077488861ff2989b4852 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
$Id$

This is a unit test for RTCORBA::PrivateConnectionPolicy.

Description.  
-------- 
The server creates two servants, registers them with the Root POA,
prints out their IORs and waits for the requests from the client.  The
client obtains the IORs, makes several invocations on the objects,
then sets RTCORBA::PrivateConnectionPolicy on PolicyCurrent (i.e.,
thread-level) and makes a few more invocations on the objects.

The goal of the test is to check that new connections are established
only when expected, and that appropriate connection is used for each
invocation.  Since what we are trying to verify are the internal
workings of the ORB, we are relying on ORB debug messages to do it.

Client makes a total of 8 invocations (not counting the shutdown
request at the end).  A message containing invocation number, whether
the new connection is to be established, and, if not, which one should
be reused, is printed out before each invocation.  ORB debug messages
that follow allow us to verify whether things worked as expected.  See
Expected output section below for more information.

To run (on Unix):
-------
$./server [-o <ior_output_file1> -p <ior_output_file2>]
$./client [-o <ior1> -p <ior2>] -ORBdebuglevel 3


Options:
--------
        Server:

-o <ior_output_file1>      Default: test1.ior
                           Filename for output of the IOR of the first
                           testing object.

-p <ior_output_file2>      Default: test2.ior
                           Filename for output of the IOR of the
                           second testing object.

        Client:

-o <ior1>                  Default: file://test1.ior
                           IOR of the first test object.

-p <ior2>                  Default: file://test2.ior
                           IOR of the second test object.

-ORBdebuglevel 3           Default: none
                           Recommended debug level is 3 or higher.

Expected output:
----------------
Below is a sample output from run_test.pl on NT.  Please note that
since in this test we are relying on ORB debug messages

1) test output may look different from that shown below as ORB debug
   messages are modified
2) the output may contain some debug information irrelevant to this
   test, e.g., parsed header info in the output below


********** RTCORBA Private Connection Unit Test

<IOR:010000000d00000049444c3a546573743a312e300000000001000000000000007e00000001
102cd050000006865726100cdc3051b00000014010f0052535422181a3a88bb0600000000000100
00001000000cd03000000000000000800000001cdcdcd004f4154010000001400000001cdcdcd01
00100000000000901010000000000024f41541600000001cdcdcd01000000050000006865726100
dc305ffff>

<IOR:010000000d00000049444c3a546573743a312e300000000001000000000000007e00000001
102cd050000006865726100cdc3051b00000014010f0052535422181a3a88bb0600010000000100
00002000000cd03000000000000000800000001cdcdcd004f4154010000001400000001cdcdcd01
00100000000000901010000000000024f41541600000001cdcdcd01000000050000006865726100
dc305ffff>

TAO (976|1072) Loaded default protocol <IIOP_Factory>
TAO (976|1072) created new ORB <>

  Invocation 1 --> new connection
(976|1072) IIOP_Connector::connect - making a new connection
(976|1072) IIOP_Connector::connect - new connection on HANDLE 296
Server: test_method invoked.
TAO (976|1072) Parsed header = <1,2,1,1,12>

  Invocation 2 --> use connection from invocation 1
(976|1072) IIOP_Connector::connect - got an existing connection on HANDLE 296
Server: test_method invoked.
TAO (976|1072) Parsed header = <1,2,1,1,12>

  Invocation 3 --> use connection from invocation 1
(976|1072) IIOP_Connector::connect - got an existing connection on HANDLE 296
Server: test_method invoked.
TAO (976|1072) Parsed header = <1,2,1,1,12>

  Invocation 4 --> use connection from invocation 1
(976|1072) IIOP_Connector::connect - got an existing connection on HANDLE 296
Server: test_method invoked.
TAO (976|1072) Parsed header = <1,2,1,1,12>

  Invocation 5 --> new connection
(976|1072) IIOP_Connector::connect - making a new connection
(976|1072) IIOP_Connector::connect - new connection on HANDLE 316
Server: test_method invoked.
TAO (976|1072) Parsed header = <1,2,1,1,12>

  Invocation 6 --> new connection
(976|1072) IIOP_Connector::connect - making a new connection
(976|1072) IIOP_Connector::connect - new connection on HANDLE 328
Server: test_method invoked.
TAO (976|1072) Parsed header = <1,2,1,1,12>

  Invocation 7 --> use connection from invocation 5
(976|1072) IIOP_Connector::connect - got an existing connection on HANDLE 316
Server: test_method invoked.
TAO (976|1072) Parsed header = <1,2,1,1,12>

  Invocation 8 --> use connection from invocation 6
(976|1072) IIOP_Connector::connect - got an existing connection on HANDLE 328
Server: test_method invoked.
TAO (976|1072) Parsed header = <1,2,1,1,12>

  Testing over - shutting down
(976|1072) IIOP_Connector::connect - got an existing connection on HANDLE 316
Server ORB event loop finished
Destroying ORB <>
TAO (976|1072) IIOP_Client_Connection_Handler::handle_close (296, 511)
TAO (976|1072) IIOP_Client_Connection_Handler::handle_close (328, 511)
TAO (976|1072) IIOP_Client_Connection_Handler::handle_close (316, 511)