aboutsummaryrefslogtreecommitdiff
path: root/devel/ice/files/patch-cpp-test-Glacier2-override-Client.cpp
blob: 4a6ab66a09028a6c99dc1cd788519d2a50e3fe65 (plain) (blame)
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
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
--- cpp/test/Glacier2/override/Client.cpp.orig	2015-08-02 15:07:07.945090996 +0200
+++ cpp/test/Glacier2/override/Client.cpp	2015-08-02 15:08:39.753584996 +0200
@@ -102,59 +102,105 @@
 
     {
         cout << "testing server request override... " << flush;
+        cout << __LINE__ << endl;
         Ice::Context ctx;
+        cout << __LINE__ << endl;
         ctx["serverOvrd"] = "test";
+        cout << __LINE__ << endl;
         for(int i = 0; i < 5; i++)
         {
+        cout << __LINE__ << endl;
             oneway->initiateCallback(onewayR, i, ctx);
+        cout << __LINE__ << endl;
             oneway->initiateCallback(onewayR, i, ctx);
+        cout << __LINE__ << endl;
             oneway->initiateCallback(onewayR, i, ctx);
+        cout << __LINE__ << endl;
             IceUtil::ThreadControl::sleep(IceUtil::Time::milliSeconds(100));
+        cout << __LINE__ << endl;
             test(callbackReceiverImpl->callbackOK(1, i) < 3);
+        cout << __LINE__ << endl;
         }
+        cout << __LINE__ << endl;
         oneway->initiateCallback(twowayR, 0);
+        cout << __LINE__ << endl;
         test(callbackReceiverImpl->callbackOK(1, 0) == 0);
+        cout << __LINE__ << endl;
 
         int count = 0;
         int nRetry = 0;
         do
         {
+        cout << __LINE__ << endl;
             callbackReceiverImpl->hold();
+        cout << __LINE__ << endl;
             oneway->initiateCallbackWithPayload(onewayR, ctx);
+        cout << __LINE__ << endl;
             oneway->initiateCallbackWithPayload(onewayR, ctx);
+        cout << __LINE__ << endl;
             oneway->initiateCallbackWithPayload(onewayR, ctx);
+        cout << __LINE__ << endl;
             oneway->initiateCallbackWithPayload(onewayR, ctx);
+        cout << __LINE__ << endl;
             oneway->initiateCallbackWithPayload(onewayR, ctx);
+        cout << __LINE__ << endl;
             oneway->initiateCallbackWithPayload(onewayR, ctx);
+        cout << __LINE__ << endl;
             oneway->initiateCallbackWithPayload(onewayR, ctx);
+        cout << __LINE__ << endl;
             oneway->initiateCallbackWithPayload(onewayR, ctx);
+        cout << __LINE__ << endl;
             oneway->initiateCallbackWithPayload(onewayR, ctx);
+        cout << __LINE__ << endl;
             oneway->initiateCallbackWithPayload(onewayR, ctx);
+        cout << __LINE__ << endl;
             oneway->initiateCallback(twowayR, 0);
+        cout << __LINE__ << endl;
             IceUtil::ThreadControl::sleep(IceUtil::Time::milliSeconds(200 + nRetry * 200));
+        cout << __LINE__ << endl;
             callbackReceiverImpl->activate();
+        cout << __LINE__ << endl;
             test(callbackReceiverImpl->callbackOK(1, 0) == 0);
+        cout << __LINE__ << endl;
             count = callbackReceiverImpl->callbackWithPayloadOK(0);
+        cout << __LINE__ << endl;
             callbackReceiverImpl->callbackWithPayloadOK(count);
+        cout << __LINE__ << endl;
         }
         while(count == 10 && nRetry++ < 10);
+        cout << __LINE__ << endl;
         test(count < 10);
+        cout << __LINE__ << endl;
 
         oneway->initiateCallbackWithPayload(twowayR);
+        cout << __LINE__ << endl;
         oneway->initiateCallbackWithPayload(twowayR);
+        cout << __LINE__ << endl;
         callbackReceiverImpl->hold();
+        cout << __LINE__ << endl;
         oneway->initiateCallbackWithPayload(twowayR);
+        cout << __LINE__ << endl;
         oneway->initiateCallback(onewayR, 0, ctx);
+        cout << __LINE__ << endl;
         oneway->initiateCallback(onewayR, 0, ctx);
+        cout << __LINE__ << endl;
         oneway->initiateCallback(onewayR, 0, ctx);
+        cout << __LINE__ << endl;
         oneway->initiateCallback(onewayR, 0, ctx);
+        cout << __LINE__ << endl;
         oneway->initiateCallback(onewayR, 0, ctx);
+        cout << __LINE__ << endl;
         oneway->initiateCallbackWithPayload(twowayR);
+        cout << __LINE__ << endl;
         IceUtil::ThreadControl::sleep(IceUtil::Time::milliSeconds(1000));
+        cout << __LINE__ << endl;
         callbackReceiverImpl->activate();
+        cout << __LINE__ << endl;
         test(callbackReceiverImpl->callbackWithPayloadOK(4) == 0);
+        cout << __LINE__ << endl;
         
         int remainingCallbacks = callbackReceiverImpl->callbackOK(1, 0);
+        cout << __LINE__ << endl;
         //
         // Occasionally, Glacier2 flushes in the middle of our 5
         // callbacks, so we get more than 1 callback
@@ -164,26 +210,43 @@
         // time to receive this (these) extra callback(s).
         //
         test(remainingCallbacks <= 4);
+        cout << __LINE__ << endl;
         if(remainingCallbacks > 0)
         {
+        cout << __LINE__ << endl;
             test(callbackReceiverImpl->callbackOK(remainingCallbacks, 0) == 0);
         }
+        cout << __LINE__ << endl;
         
         ctx["_fwd"] = "O";
+        cout << __LINE__ << endl;
 
         oneway->initiateCallbackWithPayload(twowayR);
+        cout << __LINE__ << endl;
         callbackReceiverImpl->hold();
+        cout << __LINE__ << endl;
         oneway->initiateCallbackWithPayload(twowayR);
+        cout << __LINE__ << endl;
         oneway->initiateCallback(onewayR, 0, ctx);
+        cout << __LINE__ << endl;
         oneway->initiateCallback(onewayR, 0, ctx);
+        cout << __LINE__ << endl;
         oneway->initiateCallback(onewayR, 0, ctx);
+        cout << __LINE__ << endl;
         oneway->initiateCallback(onewayR, 0, ctx);
+        cout << __LINE__ << endl;
         oneway->initiateCallback(onewayR, 0, ctx);
+        cout << __LINE__ << endl;
         oneway->initiateCallbackWithPayload(twowayR);
+        cout << __LINE__ << endl;
         IceUtil::ThreadControl::sleep(IceUtil::Time::milliSeconds(200));
+        cout << __LINE__ << endl;
         callbackReceiverImpl->activate();
+        cout << __LINE__ << endl;
         test(callbackReceiverImpl->callbackWithPayloadOK(3) == 0);
+        cout << __LINE__ << endl;
         test(callbackReceiverImpl->callbackOK(1, 0) == 0);
+        cout << __LINE__ << endl;
 
         cout << "ok" << endl;
     }