Merge lp:~nataliabidart/ubuntuone-client/handle-sys-server-error into lp:ubuntuone-client
- handle-sys-server-error
- Merge into trunk
Status: | Merged | ||||||||
---|---|---|---|---|---|---|---|---|---|
Approved by: | Facundo Batista | ||||||||
Approved revision: | 484 | ||||||||
Merged at revision: | not available | ||||||||
Proposed branch: | lp:~nataliabidart/ubuntuone-client/handle-sys-server-error | ||||||||
Merge into: | lp:ubuntuone-client | ||||||||
Diff against target: |
665 lines (+405/-45) 3 files modified
docs/states_manager.svg (+368/-43) tests/syncdaemon/test_states.py (+28/-2) ubuntuone/syncdaemon/states.py (+9/-0) |
||||||||
To merge this branch: | bzr merge lp:~nataliabidart/ubuntuone-client/handle-sys-server-error | ||||||||
Related bugs: |
|
Reviewer | Review Type | Date Requested | Status |
---|---|---|---|
Facundo Batista (community) | Approve | ||
John Lenton (community) | Approve | ||
Review via email: mp+23139@code.launchpad.net |
Commit message
States now handles a new event called SYS_SERVER_ERROR.
Description of the change
States now handles a new event called SYS_SERVER_ERROR.
This new event is emitted when the server sends any error message in (TRY_AGAIN, INTERNAL_ERROR, PROTOCOL_ERROR, or any queue_manager related event) while the client is in either of these states:
* check_version, set_capabilities, authenticate, server_rescan
Natalia Bidart (nataliabidart) wrote : | # |
John Lenton (chipaca) wrote : | # |
Is this a fix for something that is going into Lucid? If so, please link it. If not, I'm afraid it would be a lot easier if we merge it after the freeze.
John Lenton (chipaca) wrote : | # |
OK, brown paper bag for me. I promise I *looked* for the bugs.
Getting more coffee, now.
John Lenton (chipaca) : | # |
- 483. By Natalia Bidart
-
Correctly updated the diagram (match typography and arrow colors).
- 484. By Natalia Bidart
-
Merged trunk in.
- 485. By Natalia Bidart
-
Adding on_enter signaling in SVG diagram for SYS_SERVER_ERROR.
- 486. By Natalia Bidart
-
Adding test cases for asserting that SYS_SERVER_ERROR execute AQ.diconnect when enetring STANDOFF.
- 487. By Natalia Bidart
-
Adding missing test.
Preview Diff
1 | === modified file 'docs/states_manager.svg' |
2 | --- docs/states_manager.svg 2010-03-11 15:29:45 +0000 |
3 | +++ docs/states_manager.svg 2010-04-12 16:25:47 +0000 |
4 | @@ -28,15 +28,15 @@ |
5 | inkscape:pageopacity="0.0" |
6 | inkscape:pageshadow="2" |
7 | inkscape:zoom="1.0427072" |
8 | - inkscape:cx="427.40282" |
9 | - inkscape:cy="337.25026" |
10 | + inkscape:cx="495.3424" |
11 | + inkscape:cy="229.5042" |
12 | inkscape:document-units="px" |
13 | inkscape:current-layer="layer1" |
14 | showgrid="false" |
15 | - inkscape:window-width="1920" |
16 | - inkscape:window-height="1010" |
17 | + inkscape:window-width="1410" |
18 | + inkscape:window-height="875" |
19 | inkscape:window-x="0" |
20 | - inkscape:window-y="24" |
21 | + inkscape:window-y="0" |
22 | inkscape:window-maximized="1" |
23 | showguides="true" |
24 | inkscape:guide-bbox="true" /> |
25 | @@ -5773,6 +5773,222 @@ |
26 | style="fill:#796a69;fill-rule:evenodd;stroke:#000000;stroke-width:1pt;marker-start:none" |
27 | transform="matrix(-0.4,0,0,-0.4,-4,0)" /> |
28 | </marker> |
29 | + <inkscape:perspective |
30 | + id="perspective3950" |
31 | + inkscape:persp3d-origin="0.5 : 0.33333333 : 1" |
32 | + inkscape:vp_z="1 : 0.5 : 1" |
33 | + inkscape:vp_y="0 : 1000 : 0" |
34 | + inkscape:vp_x="0 : 0.5 : 1" |
35 | + sodipodi:type="inkscape:persp3d" /> |
36 | + <marker |
37 | + inkscape:stockid="Arrow1Mend" |
38 | + orient="auto" |
39 | + refY="0" |
40 | + refX="0" |
41 | + id="Arrow1Mend-50" |
42 | + style="overflow:visible"> |
43 | + <path |
44 | + id="path3429-963" |
45 | + d="M 0,0 5,-5 -12.5,0 5,5 0,0 z" |
46 | + style="fill-rule:evenodd;stroke:#000000;stroke-width:1pt;marker-start:none" |
47 | + transform="matrix(-0.4,0,0,-0.4,-4,0)" /> |
48 | + </marker> |
49 | + <inkscape:perspective |
50 | + id="perspective3978" |
51 | + inkscape:persp3d-origin="0.5 : 0.33333333 : 1" |
52 | + inkscape:vp_z="1 : 0.5 : 1" |
53 | + inkscape:vp_y="0 : 1000 : 0" |
54 | + inkscape:vp_x="0 : 0.5 : 1" |
55 | + sodipodi:type="inkscape:persp3d" /> |
56 | + <marker |
57 | + inkscape:stockid="Arrow1Mend1u64" |
58 | + orient="auto" |
59 | + refY="0" |
60 | + refX="0" |
61 | + id="Arrow1Mend1u64-085" |
62 | + style="overflow:visible"> |
63 | + <path |
64 | + id="path7114-06" |
65 | + d="M 0,0 5,-5 -12.5,0 5,5 0,0 z" |
66 | + style="fill:#796a69;fill-rule:evenodd;stroke:#000000;stroke-width:1pt;marker-start:none" |
67 | + transform="matrix(-0.4,0,0,-0.4,-4,0)" /> |
68 | + </marker> |
69 | + <inkscape:perspective |
70 | + id="perspective4005" |
71 | + inkscape:persp3d-origin="0.5 : 0.33333333 : 1" |
72 | + inkscape:vp_z="1 : 0.5 : 1" |
73 | + inkscape:vp_y="0 : 1000 : 0" |
74 | + inkscape:vp_x="0 : 0.5 : 1" |
75 | + sodipodi:type="inkscape:persp3d" /> |
76 | + <inkscape:perspective |
77 | + id="perspective4035" |
78 | + inkscape:persp3d-origin="0.5 : 0.33333333 : 1" |
79 | + inkscape:vp_z="1 : 0.5 : 1" |
80 | + inkscape:vp_y="0 : 1000 : 0" |
81 | + inkscape:vp_x="0 : 0.5 : 1" |
82 | + sodipodi:type="inkscape:persp3d" /> |
83 | + <marker |
84 | + inkscape:stockid="Arrow1Mend" |
85 | + orient="auto" |
86 | + refY="0" |
87 | + refX="0" |
88 | + id="Arrow1Mend-00" |
89 | + style="overflow:visible"> |
90 | + <path |
91 | + id="path3429-46" |
92 | + d="M 0,0 5,-5 -12.5,0 5,5 0,0 z" |
93 | + style="fill-rule:evenodd;stroke:#000000;stroke-width:1pt;marker-start:none" |
94 | + transform="matrix(-0.4,0,0,-0.4,-4,0)" /> |
95 | + </marker> |
96 | + <inkscape:perspective |
97 | + id="perspective4063" |
98 | + inkscape:persp3d-origin="0.5 : 0.33333333 : 1" |
99 | + inkscape:vp_z="1 : 0.5 : 1" |
100 | + inkscape:vp_y="0 : 1000 : 0" |
101 | + inkscape:vp_x="0 : 0.5 : 1" |
102 | + sodipodi:type="inkscape:persp3d" /> |
103 | + <marker |
104 | + inkscape:stockid="Arrow1Mend1u64" |
105 | + orient="auto" |
106 | + refY="0" |
107 | + refX="0" |
108 | + id="Arrow1Mend1u64-52" |
109 | + style="overflow:visible"> |
110 | + <path |
111 | + id="path7114-90" |
112 | + d="M 0,0 5,-5 -12.5,0 5,5 0,0 z" |
113 | + style="fill:#796a69;fill-rule:evenodd;stroke:#000000;stroke-width:1pt;marker-start:none" |
114 | + transform="matrix(-0.4,0,0,-0.4,-4,0)" /> |
115 | + </marker> |
116 | + <inkscape:perspective |
117 | + id="perspective4090" |
118 | + inkscape:persp3d-origin="0.5 : 0.33333333 : 1" |
119 | + inkscape:vp_z="1 : 0.5 : 1" |
120 | + inkscape:vp_y="0 : 1000 : 0" |
121 | + inkscape:vp_x="0 : 0.5 : 1" |
122 | + sodipodi:type="inkscape:persp3d" /> |
123 | + <inkscape:perspective |
124 | + id="perspective4115" |
125 | + inkscape:persp3d-origin="0.5 : 0.33333333 : 1" |
126 | + inkscape:vp_z="1 : 0.5 : 1" |
127 | + inkscape:vp_y="0 : 1000 : 0" |
128 | + inkscape:vp_x="0 : 0.5 : 1" |
129 | + sodipodi:type="inkscape:persp3d" /> |
130 | + <marker |
131 | + inkscape:stockid="Arrow1Mend" |
132 | + orient="auto" |
133 | + refY="0" |
134 | + refX="0" |
135 | + id="Arrow1Mend-38" |
136 | + style="overflow:visible"> |
137 | + <path |
138 | + id="path3429-33" |
139 | + d="M 0,0 5,-5 -12.5,0 5,5 0,0 z" |
140 | + style="fill-rule:evenodd;stroke:#000000;stroke-width:1pt;marker-start:none" |
141 | + transform="matrix(-0.4,0,0,-0.4,-4,0)" /> |
142 | + </marker> |
143 | + <inkscape:perspective |
144 | + id="perspective4143" |
145 | + inkscape:persp3d-origin="0.5 : 0.33333333 : 1" |
146 | + inkscape:vp_z="1 : 0.5 : 1" |
147 | + inkscape:vp_y="0 : 1000 : 0" |
148 | + inkscape:vp_x="0 : 0.5 : 1" |
149 | + sodipodi:type="inkscape:persp3d" /> |
150 | + <marker |
151 | + inkscape:stockid="Arrow1Mend1u64" |
152 | + orient="auto" |
153 | + refY="0" |
154 | + refX="0" |
155 | + id="Arrow1Mend1u64-80" |
156 | + style="overflow:visible"> |
157 | + <path |
158 | + id="path7114-47" |
159 | + d="M 0,0 5,-5 -12.5,0 5,5 0,0 z" |
160 | + style="fill:#796a69;fill-rule:evenodd;stroke:#000000;stroke-width:1pt;marker-start:none" |
161 | + transform="matrix(-0.4,0,0,-0.4,-4,0)" /> |
162 | + </marker> |
163 | + <inkscape:perspective |
164 | + id="perspective4170" |
165 | + inkscape:persp3d-origin="0.5 : 0.33333333 : 1" |
166 | + inkscape:vp_z="1 : 0.5 : 1" |
167 | + inkscape:vp_y="0 : 1000 : 0" |
168 | + inkscape:vp_x="0 : 0.5 : 1" |
169 | + sodipodi:type="inkscape:persp3d" /> |
170 | + <inkscape:perspective |
171 | + id="perspective4195" |
172 | + inkscape:persp3d-origin="0.5 : 0.33333333 : 1" |
173 | + inkscape:vp_z="1 : 0.5 : 1" |
174 | + inkscape:vp_y="0 : 1000 : 0" |
175 | + inkscape:vp_x="0 : 0.5 : 1" |
176 | + sodipodi:type="inkscape:persp3d" /> |
177 | + <marker |
178 | + inkscape:stockid="Arrow1Mend" |
179 | + orient="auto" |
180 | + refY="0" |
181 | + refX="0" |
182 | + id="Arrow1Mend-49" |
183 | + style="overflow:visible"> |
184 | + <path |
185 | + id="path3429-274" |
186 | + d="M 0,0 5,-5 -12.5,0 5,5 0,0 z" |
187 | + style="fill-rule:evenodd;stroke:#000000;stroke-width:1pt;marker-start:none" |
188 | + transform="matrix(-0.4,0,0,-0.4,-4,0)" /> |
189 | + </marker> |
190 | + <inkscape:perspective |
191 | + id="perspective4223" |
192 | + inkscape:persp3d-origin="0.5 : 0.33333333 : 1" |
193 | + inkscape:vp_z="1 : 0.5 : 1" |
194 | + inkscape:vp_y="0 : 1000 : 0" |
195 | + inkscape:vp_x="0 : 0.5 : 1" |
196 | + sodipodi:type="inkscape:persp3d" /> |
197 | + <marker |
198 | + inkscape:stockid="Arrow1Mend1u64" |
199 | + orient="auto" |
200 | + refY="0" |
201 | + refX="0" |
202 | + id="Arrow1Mend1u64-524" |
203 | + style="overflow:visible"> |
204 | + <path |
205 | + id="path7114-43" |
206 | + d="M 0,0 5,-5 -12.5,0 5,5 0,0 z" |
207 | + style="fill:#796a69;fill-rule:evenodd;stroke:#000000;stroke-width:1pt;marker-start:none" |
208 | + transform="matrix(-0.4,0,0,-0.4,-4,0)" /> |
209 | + </marker> |
210 | + <inkscape:perspective |
211 | + id="perspective4250" |
212 | + inkscape:persp3d-origin="0.5 : 0.33333333 : 1" |
213 | + inkscape:vp_z="1 : 0.5 : 1" |
214 | + inkscape:vp_y="0 : 1000 : 0" |
215 | + inkscape:vp_x="0 : 0.5 : 1" |
216 | + sodipodi:type="inkscape:persp3d" /> |
217 | + <inkscape:perspective |
218 | + id="perspective6024" |
219 | + inkscape:persp3d-origin="0.5 : 0.33333333 : 1" |
220 | + inkscape:vp_z="1 : 0.5 : 1" |
221 | + inkscape:vp_y="0 : 1000 : 0" |
222 | + inkscape:vp_x="0 : 0.5 : 1" |
223 | + sodipodi:type="inkscape:persp3d" /> |
224 | + <inkscape:perspective |
225 | + id="perspective6049" |
226 | + inkscape:persp3d-origin="0.5 : 0.33333333 : 1" |
227 | + inkscape:vp_z="1 : 0.5 : 1" |
228 | + inkscape:vp_y="0 : 1000 : 0" |
229 | + inkscape:vp_x="0 : 0.5 : 1" |
230 | + sodipodi:type="inkscape:persp3d" /> |
231 | + <inkscape:perspective |
232 | + id="perspective6071" |
233 | + inkscape:persp3d-origin="0.5 : 0.33333333 : 1" |
234 | + inkscape:vp_z="1 : 0.5 : 1" |
235 | + inkscape:vp_y="0 : 1000 : 0" |
236 | + inkscape:vp_x="0 : 0.5 : 1" |
237 | + sodipodi:type="inkscape:persp3d" /> |
238 | + <inkscape:perspective |
239 | + id="perspective6093" |
240 | + inkscape:persp3d-origin="0.5 : 0.33333333 : 1" |
241 | + inkscape:vp_z="1 : 0.5 : 1" |
242 | + inkscape:vp_y="0 : 1000 : 0" |
243 | + inkscape:vp_x="0 : 0.5 : 1" |
244 | + sodipodi:type="inkscape:persp3d" /> |
245 | </defs> |
246 | <metadata |
247 | id="metadata7"> |
248 | @@ -6336,12 +6552,12 @@ |
249 | sodipodi:nodetypes="cc" /> |
250 | <path |
251 | style="color:#000000;fill:none;stroke:#000000;stroke-width:1.5;stroke-linecap:round;stroke-linejoin:miter;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none;stroke-dashoffset:0;marker:none;marker-end:url(#Arrow1Mend);visibility:visible;display:inline;overflow:visible;enable-background:accumulate" |
252 | - d="m 571.8587,341.01188 -145.11447,0" |
253 | + d="m 572.26135,343.4914 -145.51712,0" |
254 | id="path9275-2" |
255 | sodipodi:nodetypes="cc" /> |
256 | <path |
257 | style="color:#000000;fill:none;stroke:#000000;stroke-width:1.5;stroke-linecap:round;stroke-linejoin:miter;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none;stroke-dashoffset:0;marker:none;marker-end:url(#Arrow1Mend);visibility:visible;display:inline;overflow:visible;enable-background:accumulate" |
258 | - d="m 372.71993,490.07195 0,-94.59591" |
259 | + d="m 362.71993,490.07195 0,-94.59591" |
260 | id="path9275-6" |
261 | sodipodi:nodetypes="cc" /> |
262 | <path |
263 | @@ -6648,7 +6864,7 @@ |
264 | style="opacity:0.65322583;color:#000000;fill:#00ff00;fill-opacity:1;stroke:none;stroke-width:3;marker:none;visibility:visible;display:inline;overflow:visible;enable-background:accumulate" |
265 | sodipodi:type="arc" /> |
266 | <path |
267 | - transform="matrix(0.24411038,0,0,0.22458156,478.23982,249.72461)" |
268 | + transform="matrix(0.24411038,0,0,0.22458156,478.23982,252.20413)" |
269 | d="m -147.4098,407.55515 a 42.646858,47.282387 0 1 1 -85.29371,0 42.646858,47.282387 0 1 1 85.29371,0 z" |
270 | sodipodi:ry="47.282387" |
271 | sodipodi:rx="42.646858" |
272 | @@ -6668,7 +6884,7 @@ |
273 | style="opacity:0.65322583;color:#000000;fill:#00ff00;fill-opacity:1;stroke:none;stroke-width:3;marker:none;visibility:visible;display:inline;overflow:visible;enable-background:accumulate" |
274 | sodipodi:type="arc" /> |
275 | <path |
276 | - transform="matrix(0.24411038,0,0,0.22458156,418.94169,307.73364)" |
277 | + transform="matrix(0.24411038,0,0,0.22458156,408.94169,307.89244)" |
278 | d="m -147.4098,407.55515 a 42.646858,47.282387 0 1 1 -85.29371,0 42.646858,47.282387 0 1 1 85.29371,0 z" |
279 | sodipodi:ry="47.282387" |
280 | sodipodi:rx="42.646858" |
281 | @@ -6912,51 +7128,50 @@ |
282 | sodipodi:role="line">main.server_rescan()</tspan></text> |
283 | </g> |
284 | <g |
285 | - id="g18667" |
286 | - transform="translate(-958.19986,-397.59227)"> |
287 | + id="g6115"> |
288 | <rect |
289 | style="opacity:0.65322583;color:#000000;fill:#00ff00;fill-opacity:1;fill-rule:nonzero;stroke:none;stroke-width:0.847;marker:none;visibility:visible;display:inline;overflow:visible;enable-background:accumulate" |
290 | id="rect5912-2-48-2-9" |
291 | - width="129.83394" |
292 | + width="86.677048" |
293 | height="19.030485" |
294 | - x="1082.8829" |
295 | - y="699.63757" |
296 | + x="146.26151" |
297 | + y="304.41919" |
298 | ry="4.5156531" |
299 | - rx="4.5156531" /> |
300 | + rx="3.014647" /> |
301 | <text |
302 | id="text2461-6-7-4-5" |
303 | - y="712.1601" |
304 | - x="1112.7266" |
305 | + y="316.94171" |
306 | + x="154.5267" |
307 | style="font-size:10.90068817px;font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;text-align:start;line-height:125%;writing-mode:lr-tb;text-anchor:start;fill:#000000;fill-opacity:1;stroke:none;display:inline;font-family:DejaVu Sans;-inkscape-font-specification:DejaVu Sans" |
308 | xml:space="preserve" |
309 | sodipodi:linespacing="125%"><tspan |
310 | id="tspan2463-3-5-2-7" |
311 | - y="712.1601" |
312 | - x="1112.7266" |
313 | + y="316.94171" |
314 | + x="154.5267" |
315 | sodipodi:role="line">AQ.cleanup()</tspan></text> |
316 | </g> |
317 | <g |
318 | - id="g18737" |
319 | - transform="translate(-809.4024,-486.18015)"> |
320 | + id="g6107" |
321 | + transform="translate(0,-2.3738785)"> |
322 | <rect |
323 | style="opacity:0.65322583;color:#000000;fill:#00ff00;fill-opacity:1;fill-rule:nonzero;stroke:none;stroke-width:0.847;marker:none;visibility:visible;display:inline;overflow:visible;enable-background:accumulate" |
324 | id="rect5912-2-48-2-9-2" |
325 | - width="129.83394" |
326 | + width="99.624115" |
327 | height="19.030485" |
328 | - x="1116.191" |
329 | - y="840.97321" |
330 | + x="307.89352" |
331 | + y="306.79306" |
332 | ry="4.5156531" |
333 | - rx="4.5156531" /> |
334 | + rx="3.4649487" /> |
335 | <text |
336 | id="text2461-6-7-4-26" |
337 | - y="853.91089" |
338 | - x="1138.0615" |
339 | + y="319.73074" |
340 | + x="314.65912" |
341 | style="font-size:10.90068817px;font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;text-align:start;line-height:125%;writing-mode:lr-tb;text-anchor:start;fill:#000000;fill-opacity:1;stroke:none;display:inline;font-family:DejaVu Sans;-inkscape-font-specification:DejaVu Sans" |
342 | xml:space="preserve" |
343 | sodipodi:linespacing="125%"><tspan |
344 | id="tspan2463-3-5-2-6" |
345 | - y="853.91089" |
346 | - x="1138.0615" |
347 | + y="319.73074" |
348 | + x="314.65912" |
349 | sodipodi:role="line">AQ.disconnect()</tspan></text> |
350 | </g> |
351 | <text |
352 | @@ -7060,36 +7275,36 @@ |
353 | xml:space="preserve" |
354 | style="font-size:25.45085716px;font-style:italic;font-weight:normal;text-align:start;line-height:125%;writing-mode:lr-tb;text-anchor:start;fill:#ff6600;fill-opacity:1;stroke:none;display:inline;font-family:Bitstream Vera Sans;-inkscape-font-specification:Sans" |
355 | x="492.18253" |
356 | - y="336.1264" |
357 | + y="339.92773" |
358 | id="text2467-1-5-4-8-7"><tspan |
359 | sodipodi:role="line" |
360 | id="tspan2469-4-3-8-6-75" |
361 | x="492.18253" |
362 | - y="336.1264" |
363 | + y="339.92773" |
364 | style="font-size:16.19600105px;font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;text-align:start;line-height:125%;writing-mode:lr-tb;text-anchor:start;fill:#ff6600;font-family:Bitstream Vera Sans Mono;-inkscape-font-specification:Bitstream Vera Sans Mono">5,6,8</tspan></text> |
365 | <text |
366 | sodipodi:linespacing="125%" |
367 | xml:space="preserve" |
368 | style="font-size:25.45085716px;font-style:italic;font-weight:normal;text-align:start;line-height:125%;writing-mode:lr-tb;text-anchor:start;fill:#ff6600;fill-opacity:1;stroke:none;display:inline;font-family:Bitstream Vera Sans;-inkscape-font-specification:Sans" |
369 | - x="361.26068" |
370 | - y="454.80966" |
371 | + x="324.56741" |
372 | + y="425.54156" |
373 | id="text2467-1-5-4-8-7-2"><tspan |
374 | sodipodi:role="line" |
375 | id="tspan2469-4-3-8-6-75-3" |
376 | - x="361.26068" |
377 | - y="454.80966" |
378 | + x="324.56741" |
379 | + y="425.54156" |
380 | style="font-size:16.19600105px;font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;text-align:start;line-height:125%;writing-mode:lr-tb;text-anchor:start;fill:#ff6600;font-family:Bitstream Vera Sans Mono;-inkscape-font-specification:Bitstream Vera Sans Mono">5,6,8</tspan></text> |
381 | <text |
382 | sodipodi:linespacing="125%" |
383 | xml:space="preserve" |
384 | style="font-size:25.45085716px;font-style:italic;font-weight:normal;text-align:start;line-height:125%;writing-mode:lr-tb;text-anchor:start;fill:#ff6600;fill-opacity:1;stroke:none;display:inline;font-family:Bitstream Vera Sans;-inkscape-font-specification:Sans" |
385 | - x="464.76147" |
386 | - y="451.65814" |
387 | + x="419.70853" |
388 | + y="425.54156" |
389 | id="text2467-1-5-4-8-7-7"><tspan |
390 | sodipodi:role="line" |
391 | id="tspan2469-4-3-8-6-75-2" |
392 | - x="464.76147" |
393 | - y="451.65814" |
394 | + x="419.70853" |
395 | + y="425.54156" |
396 | style="font-size:16.19600105px;font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;text-align:start;line-height:125%;writing-mode:lr-tb;text-anchor:start;fill:#ff6600;font-family:Bitstream Vera Sans Mono;-inkscape-font-specification:Bitstream Vera Sans Mono">5,6,8</tspan></text> |
397 | <text |
398 | sodipodi:linespacing="125%" |
399 | @@ -7353,13 +7568,13 @@ |
400 | sodipodi:linespacing="125%" |
401 | xml:space="preserve" |
402 | style="font-size:25.45085716px;font-style:italic;font-weight:normal;text-align:start;line-height:125%;writing-mode:lr-tb;text-anchor:start;fill:#ff6600;fill-opacity:1;stroke:none;display:inline;font-family:Bitstream Vera Sans;-inkscape-font-specification:Sans" |
403 | - x="234.69305" |
404 | - y="438.2403" |
405 | + x="275.69043" |
406 | + y="425.54156" |
407 | id="text2467-1-5-4-8-7-4-1"><tspan |
408 | sodipodi:role="line" |
409 | id="tspan2469-4-3-8-6-75-4-5" |
410 | - x="234.69305" |
411 | - y="438.2403" |
412 | + x="275.69043" |
413 | + y="425.54156" |
414 | style="font-size:16.19600105px;font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;text-align:start;line-height:125%;writing-mode:lr-tb;text-anchor:start;fill:#ff6600;font-family:Bitstream Vera Sans Mono;-inkscape-font-specification:Bitstream Vera Sans Mono">5,6</tspan></text> |
415 | <g |
416 | style="display:inline" |
417 | @@ -7496,5 +7711,115 @@ |
418 | x="916.75098" |
419 | y="655.28705" |
420 | style="font-size:8.20300102px;font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;text-align:start;line-height:125%;writing-mode:lr-tb;text-anchor:start;color:#000000;fill:#967b71;fill-opacity:1;stroke:none;stroke-width:2;marker:none;marker-end:url(#Arrow1Mend1u64);visibility:visible;display:inline;overflow:visible;enable-background:accumulate;font-family:Bitstream Vera Sans Mono;-inkscape-font-specification:Bitstream Vera Sans Mono">SYS_ROOT_MISMATCH</tspan></text> |
421 | + <path |
422 | + style="color:#000000;fill:none;stroke:#967b71;stroke-width:2;stroke-linecap:round;stroke-linejoin:miter;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none;stroke-dashoffset:0;marker:none;marker-end:url(#Arrow1Mend1u64);visibility:visible;display:inline;overflow:visible;enable-background:accumulate" |
423 | + d="M 557.37378,496.31282 421.57479,365.62324" |
424 | + id="path8788-5-8" |
425 | + sodipodi:nodetypes="cc" /> |
426 | + <text |
427 | + sodipodi:linespacing="125%" |
428 | + xml:space="preserve" |
429 | + style="font-size:16.76553154px;font-style:italic;font-weight:normal;text-align:start;line-height:125%;writing-mode:lr-tb;text-anchor:start;color:#000000;fill:#967b71;fill-opacity:1;stroke:none;stroke-width:2;marker:none;marker-end:url(#Arrow1Mend1u64);visibility:visible;display:inline;overflow:visible;enable-background:accumulate;font-family:Bitstream Vera Sans;-inkscape-font-specification:Sans" |
430 | + x="380.17734" |
431 | + y="482.4263" |
432 | + id="text2467-1-5-4-7-3-63-2-2"><tspan |
433 | + sodipodi:role="line" |
434 | + x="380.17734" |
435 | + y="482.4263" |
436 | + style="font-size:10.66897488px;font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;text-align:start;line-height:125%;writing-mode:lr-tb;text-anchor:start;color:#000000;fill:#967b71;fill-opacity:1;stroke:none;stroke-width:2;marker:none;marker-end:url(#Arrow1Mend1u64);visibility:visible;display:inline;overflow:visible;enable-background:accumulate;font-family:Bitstream Vera Sans Mono;-inkscape-font-specification:Bitstream Vera Sans Mono" |
437 | + id="tspan6246-8">SYS_SERVER_ERROR</tspan></text> |
438 | + <path |
439 | + style="color:#000000;fill:none;stroke:#967b71;stroke-width:2;stroke-linecap:round;stroke-linejoin:miter;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none;stroke-dashoffset:0;marker:none;marker-end:url(#Arrow1Mend1u64);visibility:visible;display:inline;overflow:visible;enable-background:accumulate" |
440 | + d="m 378.61158,489.54194 0,-94.59591" |
441 | + id="path9275-6-2" |
442 | + sodipodi:nodetypes="cc" /> |
443 | + <text |
444 | + sodipodi:linespacing="125%" |
445 | + xml:space="preserve" |
446 | + style="font-size:16.76553154px;font-style:italic;font-weight:normal;text-align:start;line-height:125%;writing-mode:lr-tb;text-anchor:start;color:#000000;fill:#967b71;fill-opacity:1;stroke:none;stroke-width:2;marker:none;marker-end:url(#Arrow1Mend1u64);visibility:visible;display:inline;overflow:visible;enable-background:accumulate;font-family:Bitstream Vera Sans;-inkscape-font-specification:Sans" |
447 | + x="600.11841" |
448 | + y="-29.468037" |
449 | + id="text2467-1-5-4-7-3-63-2-2-4" |
450 | + transform="matrix(0.7250614,0.68868423,-0.68868423,0.7250614,0,0)"><tspan |
451 | + sodipodi:role="line" |
452 | + x="600.11841" |
453 | + y="-29.468037" |
454 | + style="font-size:10.66897488px;font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;text-align:start;line-height:125%;writing-mode:lr-tb;text-anchor:start;color:#000000;fill:#967b71;fill-opacity:1;stroke:none;stroke-width:2;marker:none;marker-end:url(#Arrow1Mend1u64);visibility:visible;display:inline;overflow:visible;enable-background:accumulate;font-family:Bitstream Vera Sans Mono;-inkscape-font-specification:Bitstream Vera Sans Mono" |
455 | + id="tspan6246-8-0">SYS_SERVER_ERROR</tspan></text> |
456 | + <path |
457 | + style="color:#000000;fill:none;stroke:#967b71;stroke-width:2;stroke-linecap:round;stroke-linejoin:miter;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none;stroke-dashoffset:0;marker:none;marker-end:url(#Arrow1Mend1u64);visibility:visible;display:inline;overflow:visible;enable-background:accumulate" |
458 | + d="M 185.31373,496.90742 321.11272,365.6576" |
459 | + id="path8788-3" |
460 | + sodipodi:nodetypes="cc" /> |
461 | + <text |
462 | + sodipodi:linespacing="125%" |
463 | + xml:space="preserve" |
464 | + style="font-size:16.76553154px;font-style:italic;font-weight:normal;text-align:start;line-height:125%;writing-mode:lr-tb;text-anchor:start;color:#000000;fill:#967b71;fill-opacity:1;stroke:none;stroke-width:2;marker:none;marker-end:url(#Arrow1Mend1u64);visibility:visible;display:inline;overflow:visible;enable-background:accumulate;font-family:Bitstream Vera Sans;-inkscape-font-specification:Sans" |
465 | + x="-153.51541" |
466 | + y="485.33597" |
467 | + id="text2467-1-5-4-7-3-63-2-2-4-8" |
468 | + transform="matrix(0.73963232,-0.67301117,0.67301117,0.73963232,0,0)"><tspan |
469 | + sodipodi:role="line" |
470 | + x="-153.51541" |
471 | + y="485.33597" |
472 | + style="font-size:10.66897488px;font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;text-align:start;line-height:125%;writing-mode:lr-tb;text-anchor:start;color:#000000;fill:#967b71;fill-opacity:1;stroke:none;stroke-width:2;marker:none;marker-end:url(#Arrow1Mend1u64);visibility:visible;display:inline;overflow:visible;enable-background:accumulate;font-family:Bitstream Vera Sans Mono;-inkscape-font-specification:Bitstream Vera Sans Mono" |
473 | + id="tspan6246-8-0-3">SYS_SERVER_ERROR</tspan></text> |
474 | + <path |
475 | + style="color:#000000;fill:none;stroke:#967b71;stroke-width:2;stroke-linecap:round;stroke-linejoin:miter;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none;stroke-dashoffset:0;marker:none;marker-end:url(#Arrow1Mend1u64);visibility:visible;display:inline;overflow:visible;enable-background:accumulate" |
476 | + d="m 574.95502,323.51184 -149.79791,0" |
477 | + id="path9275-2-2" |
478 | + sodipodi:nodetypes="cc" /> |
479 | + <text |
480 | + sodipodi:linespacing="125%" |
481 | + xml:space="preserve" |
482 | + style="font-size:16.76553154px;font-style:italic;font-weight:normal;text-align:start;line-height:125%;writing-mode:lr-tb;text-anchor:start;color:#000000;fill:#967b71;fill-opacity:1;stroke:none;stroke-width:2;marker:none;marker-end:url(#Arrow1Mend1u64);visibility:visible;display:inline;overflow:visible;enable-background:accumulate;font-family:Bitstream Vera Sans;-inkscape-font-specification:Sans" |
483 | + x="455.54834" |
484 | + y="319.22873" |
485 | + id="text2467-1-5-4-7-3-63-2-2-4-3"><tspan |
486 | + sodipodi:role="line" |
487 | + x="455.54834" |
488 | + y="319.22873" |
489 | + style="font-size:10.66897488px;font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;text-align:start;line-height:125%;writing-mode:lr-tb;text-anchor:start;color:#000000;fill:#967b71;fill-opacity:1;stroke:none;stroke-width:2;marker:none;marker-end:url(#Arrow1Mend1u64);visibility:visible;display:inline;overflow:visible;enable-background:accumulate;font-family:Bitstream Vera Sans Mono;-inkscape-font-specification:Bitstream Vera Sans Mono" |
490 | + id="tspan6246-8-0-37">SYS_SERVER_ERROR</tspan></text> |
491 | + <path |
492 | + transform="matrix(0.24411038,0,0,0.22458156,477.77985,231.98247)" |
493 | + d="m -147.4098,407.55515 a 42.646858,47.282387 0 1 1 -85.29371,0 42.646858,47.282387 0 1 1 85.29371,0 z" |
494 | + sodipodi:ry="47.282387" |
495 | + sodipodi:rx="42.646858" |
496 | + sodipodi:cy="407.55515" |
497 | + sodipodi:cx="-190.05666" |
498 | + id="path4627-2-8-04-9-0" |
499 | + style="opacity:0.65322583;color:#000000;fill:#00ff00;fill-opacity:1;stroke:none;stroke-width:3;marker:none;visibility:visible;display:inline;overflow:visible;enable-background:accumulate" |
500 | + sodipodi:type="arc" /> |
501 | + <path |
502 | + transform="matrix(0.24411038,0,0,0.22458156,424.90668,307.89244)" |
503 | + d="m -147.4098,407.55515 a 42.646858,47.282387 0 1 1 -85.29371,0 42.646858,47.282387 0 1 1 85.29371,0 z" |
504 | + sodipodi:ry="47.282387" |
505 | + sodipodi:rx="42.646858" |
506 | + sodipodi:cy="407.55515" |
507 | + sodipodi:cx="-190.05666" |
508 | + id="path4627-2-8-04-2-8" |
509 | + style="opacity:0.65322583;color:#000000;fill:#00ff00;fill-opacity:1;stroke:none;stroke-width:3;marker:none;visibility:visible;display:inline;overflow:visible;enable-background:accumulate" |
510 | + sodipodi:type="arc" /> |
511 | + <path |
512 | + transform="matrix(0.24411038,0,0,0.22458156,363.47805,278.43485)" |
513 | + d="m -147.4098,407.55515 a 42.646858,47.282387 0 1 1 -85.29371,0 42.646858,47.282387 0 1 1 85.29371,0 z" |
514 | + sodipodi:ry="47.282387" |
515 | + sodipodi:rx="42.646858" |
516 | + sodipodi:cy="407.55515" |
517 | + sodipodi:cx="-190.05666" |
518 | + id="path4627-2-8-04-3-2" |
519 | + style="opacity:0.65322583;color:#000000;fill:#00ff00;fill-opacity:1;stroke:none;stroke-width:3;marker:none;visibility:visible;display:inline;overflow:visible;enable-background:accumulate" |
520 | + sodipodi:type="arc" /> |
521 | + <path |
522 | + transform="matrix(0.24411038,0,0,0.22458156,472.12752,278.49479)" |
523 | + d="m -147.4098,407.55515 a 42.646858,47.282387 0 1 1 -85.29371,0 42.646858,47.282387 0 1 1 85.29371,0 z" |
524 | + sodipodi:ry="47.282387" |
525 | + sodipodi:rx="42.646858" |
526 | + sodipodi:cy="407.55515" |
527 | + sodipodi:cx="-190.05666" |
528 | + id="path4627-2-8-04-1-5" |
529 | + style="opacity:0.65322583;color:#000000;fill:#00ff00;fill-opacity:1;stroke:none;stroke-width:3;marker:none;visibility:visible;display:inline;overflow:visible;enable-background:accumulate" |
530 | + sodipodi:type="arc" /> |
531 | </g> |
532 | </svg> |
533 | |
534 | === modified file 'tests/syncdaemon/test_states.py' |
535 | --- tests/syncdaemon/test_states.py 2010-03-15 19:18:32 +0000 |
536 | +++ tests/syncdaemon/test_states.py 2010-04-12 16:25:47 +0000 |
537 | @@ -630,6 +630,7 @@ |
538 | |
539 | class TestConnectionManagerTimings(Base): |
540 | """Times handled by ConnectionManager.""" |
541 | + |
542 | def setUp(self): |
543 | Base.setUp(self) |
544 | |
545 | @@ -651,7 +652,7 @@ |
546 | def test_handshaketimeout_setcapabilities(self): |
547 | """Handshake timing is controlled in SetCapabilities.""" |
548 | return self.check('CHECK_VERSION', 'SYS_PROTOCOL_VERSION_OK', |
549 | - 'SYS_HANDSHAKE_TIMEOUT') |
550 | + 'SYS_HANDSHAKE_TIMEOUT') |
551 | |
552 | def test_handshaketimeout_authenticate(self): |
553 | """Handshake timing is controlled in Authenticate.""" |
554 | @@ -755,6 +756,10 @@ |
555 | return self.check('CHECK_VERSION', 'SYS_PROTOCOL_VERSION_ERROR', |
556 | 'BAD_VERSION') |
557 | |
558 | + def test_checkversion_server_error(self): |
559 | + """Transition CheckVersion -> Standoff.""" |
560 | + return self.check('CHECK_VERSION', 'SYS_SERVER_ERROR', 'STANDOFF') |
561 | + |
562 | def test_setcapabilities_authenticate(self): |
563 | """Transition SetCapabilities -> Authenticate.""" |
564 | return self.check('SET_CAPABILITIES', 'SYS_SET_CAPABILITIES_OK', |
565 | @@ -765,6 +770,10 @@ |
566 | return self.check('SET_CAPABILITIES', 'SYS_SET_CAPABILITIES_ERROR', |
567 | 'CAPABILITIES_MISMATCH') |
568 | |
569 | + def test_setcapabilities_server_error(self): |
570 | + """Transition SetCapabilities -> Standoff.""" |
571 | + return self.check('SET_CAPABILITIES', 'SYS_SERVER_ERROR', 'STANDOFF') |
572 | + |
573 | def test_authenticate_serverrescan(self): |
574 | """Transition Authenticate -> ServerRescan.""" |
575 | return self.check('AUTHENTICATE', 'SYS_AUTH_OK', 'SERVER_RESCAN') |
576 | @@ -773,11 +782,19 @@ |
577 | """Transition Authenticate -> Error.""" |
578 | return self.check('AUTHENTICATE', 'SYS_AUTH_ERROR', 'AUTH_FAILED') |
579 | |
580 | + def test_authenticate_server_error(self): |
581 | + """Transition Authenticate -> Standoff.""" |
582 | + return self.check('AUTHENTICATE', 'SYS_SERVER_ERROR', 'STANDOFF') |
583 | + |
584 | def test_serverrescan_queuemanager(self): |
585 | """Transition ServerRescan -> QueueManager.""" |
586 | return self.check('SERVER_RESCAN', 'SYS_SERVER_RESCAN_DONE', |
587 | 'QUEUE_MANAGER') |
588 | |
589 | + def test_serverrescan_standoff(self): |
590 | + """Transition ServerRescan -> Standoff.""" |
591 | + return self.check('SERVER_RESCAN', 'SYS_SERVER_ERROR', 'STANDOFF') |
592 | + |
593 | def test_network_events(self): |
594 | """Don't make transition, and don't log warning.""" |
595 | nodes = ['INIT', 'READY', 'STANDOFF', 'QUEUE_MANAGER'] # examples |
596 | @@ -953,6 +970,7 @@ |
597 | d.append(self.check(node, 'SYS_CONNECTION_LOST', node)) |
598 | d.append(self.check(node, 'SYS_HANDSHAKE_TIMEOUT', node)) |
599 | d.append(self.check(node, 'SYS_CONNECTION_MADE', node)) |
600 | + d.append(self.check(node, 'SYS_SERVER_ERROR', node)) |
601 | return defer.DeferredList(d) |
602 | |
603 | |
604 | @@ -1093,7 +1111,7 @@ |
605 | nodes = (StateManager.CHECK_VERSION, StateManager.SET_CAPABILITIES, |
606 | StateManager.AUTHENTICATE) |
607 | events = ('SYS_NET_DISCONNECTED', 'SYS_USER_DISCONNECT', |
608 | - 'SYS_HANDSHAKE_TIMEOUT') |
609 | + 'SYS_HANDSHAKE_TIMEOUT', 'SYS_SERVER_ERROR') |
610 | cnt = 0 |
611 | for node in nodes: |
612 | for event in events: |
613 | @@ -1113,6 +1131,14 @@ |
614 | # from QUEUE_MANAGER |
615 | self.assertEqual(self.aq.actions.count('disconnect'), cnt) |
616 | |
617 | + def test_server_rescan_to_standoff(self): |
618 | + """ServerRescan transitions to Standoff generates an AQ.disconnect.""" |
619 | + # case of ServerRescan and SYS_SERVER_ERROR |
620 | + self.aq.actions[:] = [] |
621 | + self.sm.state = StateManager.SERVER_RESCAN |
622 | + self.sm.handle_default('SYS_SERVER_ERROR') |
623 | + self.assertEqual(self.aq.actions, ['disconnect']) |
624 | + |
625 | def test_exit_queuemanager(self): |
626 | """Exit transitions from QueueManager.""" |
627 | events = ('SYS_NET_DISCONNECTED', 'SYS_USER_DISCONNECT', |
628 | |
629 | === modified file 'ubuntuone/syncdaemon/states.py' |
630 | --- ubuntuone/syncdaemon/states.py 2010-03-11 15:29:45 +0000 |
631 | +++ ubuntuone/syncdaemon/states.py 2010-04-12 16:25:47 +0000 |
632 | @@ -343,6 +343,7 @@ |
633 | 'SYS_PROTOCOL_VERSION_OK', |
634 | 'SYS_ROOT_MISMATCH', |
635 | 'SYS_SERVER_RESCAN_DONE', |
636 | + 'SYS_SERVER_ERROR', |
637 | 'SYS_SET_CAPABILITIES_ERROR', |
638 | 'SYS_SET_CAPABILITIES_OK', |
639 | 'SYS_UNKNOWN_ERROR', |
640 | @@ -406,17 +407,25 @@ |
641 | (self.READY, 'SYS_CONNECTION_MADE'): _from_ready, |
642 | (self.READY, 'SYS_CONNECTION_FAILED'): self.WAITING, |
643 | (self.WAITING, 'SYS_CONNECTION_RETRY'): self.READY, |
644 | + |
645 | (self.CHECK_VERSION, 'SYS_PROTOCOL_VERSION_OK'): |
646 | self.SET_CAPABILITIES, |
647 | (self.CHECK_VERSION, 'SYS_PROTOCOL_VERSION_ERROR'): |
648 | self.BAD_VERSION, |
649 | + (self.CHECK_VERSION, 'SYS_SERVER_ERROR'): self.STANDOFF, |
650 | + |
651 | (self.SET_CAPABILITIES, 'SYS_SET_CAPABILITIES_OK'): |
652 | self.AUTHENTICATE, |
653 | (self.SET_CAPABILITIES, 'SYS_SET_CAPABILITIES_ERROR'): |
654 | self.CAPABILITIES_MISMATCH, |
655 | + (self.SET_CAPABILITIES, 'SYS_SERVER_ERROR'): self.STANDOFF, |
656 | + |
657 | (self.AUTHENTICATE, 'SYS_AUTH_OK'): self.SERVER_RESCAN, |
658 | (self.AUTHENTICATE, 'SYS_AUTH_ERROR'): self.AUTH_FAILED, |
659 | + (self.AUTHENTICATE, 'SYS_SERVER_ERROR'): self.STANDOFF, |
660 | + |
661 | (self.SERVER_RESCAN, 'SYS_SERVER_RESCAN_DONE'): self.QUEUE_MANAGER, |
662 | + (self.SERVER_RESCAN, 'SYS_SERVER_ERROR'): self.STANDOFF, |
663 | } |
664 | |
665 | def handle_default(self, event, *args, **kwargs): |
Please note that the first file in the diff below is the state manager diagram update.