Merge lp:~facundo/magicicada-client/wait-less-to-reconnect into lp:magicicada-client

Proposed by Facundo Batista
Status: Merged
Approved by: Natalia Bidart
Approved revision: 1436
Merged at revision: 1436
Proposed branch: lp:~facundo/magicicada-client/wait-less-to-reconnect
Merge into: lp:magicicada-client
Diff against target: 77 lines (+13/-7)
3 files modified
HACKING (+4/-3)
ubuntuone/syncdaemon/states.py (+1/-1)
ubuntuone/syncdaemon/tests/test_states.py (+8/-3)
To merge this branch: bzr merge lp:~facundo/magicicada-client/wait-less-to-reconnect
Reviewer Review Type Date Requested Status
Natalia Bidart Approve
Review via email: mp+341173@code.launchpad.net

Commit message

Wait only 20s to reconnect.

Description of the change

Wait only 20s to reconnect.

To post a comment you must log in.
Revision history for this message
Natalia Bidart (nataliabidart) :
review: Approve

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'HACKING'
2--- HACKING 2015-09-29 21:05:26 +0000
3+++ HACKING 2018-03-08 18:33:23 +0000
4@@ -5,12 +5,13 @@
5
6 Or you can simply bootstrap and everything will happen automagically:
7
8-$: make boostrap
9+$: sudo apt-get install make
10+$: make bootstrap
11
12 After configuring, in order to run the tests, all you need to do is run
13-make check.
14+make test.
15
16-$: make check
17+$: make test
18
19
20 Magicicada uses branch based development on Launchpad, and bugs to track
21
22=== modified file 'ubuntuone/syncdaemon/states.py'
23--- ubuntuone/syncdaemon/states.py 2017-02-10 01:15:07 +0000
24+++ ubuntuone/syncdaemon/states.py 2018-03-08 18:33:23 +0000
25@@ -33,7 +33,7 @@
26
27 # the WAITING time will double itself until it gets into
28 # these seconds
29-MAX_WAITING = 120
30+MAX_WAITING = 20
31
32
33 class BadEventError(Exception):
34
35=== modified file 'ubuntuone/syncdaemon/tests/test_states.py'
36--- ubuntuone/syncdaemon/tests/test_states.py 2016-06-04 21:14:35 +0000
37+++ ubuntuone/syncdaemon/tests/test_states.py 2018-03-08 18:33:23 +0000
38@@ -34,8 +34,12 @@
39 from twisted.trial.unittest import TestCase as TwistedTestCase
40
41 from contrib.testing.testcase import FakeLogger
42+from ubuntuone.syncdaemon import states
43 from ubuntuone.syncdaemon.states import (
44- StateManager, ConnectionManager, QueueManager, Node
45+ ConnectionManager,
46+ Node,
47+ QueueManager,
48+ StateManager,
49 )
50
51
52@@ -398,6 +402,7 @@
53
54 def test_waiting_behaviour(self):
55 """Check WAITING increases values ok."""
56+ self.patch(states, 'MAX_WAITING', 120)
57 timeouts = [2, 4, 8, 16, 32, 64, 120, 120, 120]
58 self.sm.connection.waiting_timeout = 1
59 for t in timeouts:
60@@ -831,7 +836,7 @@
61 cnt += 1
62 self.sm.state = node
63 self.sm.handle_default(event)
64- self.assertEqual(self.aq.actions, ['disconnect']*cnt)
65+ self.assertEqual(self.aq.actions, ['disconnect'] * cnt)
66
67 self.aq.actions[:] = []
68 cnt = 0
69@@ -888,7 +893,7 @@
70 cnt += 1
71 self.sm.state = node
72 self.sm.handle_default(event)
73- self.assertEqual(self.called_events, [event]*cnt)
74+ self.assertEqual(self.called_events, [event] * cnt)
75
76 def test_meta_waiting(self):
77 """SYS_QUEUE_WAITING should go to QueueMgr no matter where."""

Subscribers

People subscribed via source and target branches

to all changes: