[Pkg-telepathy-commits] [telepathy-mission-control-6] 10/90: account-manager/server-drops-us.py: update so it actually passes

Simon McVittie smcv at debian.org
Wed May 14 12:08:59 UTC 2014


This is an automated email from the git hooks/post-receive script.

smcv pushed a commit to branch debian
in repository telepathy-mission-control-6.

commit 43e2a1bacc556dc66524e79fdc42f96cfdc37e3d
Author: Simon McVittie <simon.mcvittie at collabora.co.uk>
Date:   Wed Mar 26 08:43:25 2014 +0000

    account-manager/server-drops-us.py: update so it actually passes
    
    The backoff algorithm changed in 5.4.2 and 5.5.3, and the test framework
    now requires events to contain at least one "-"; but this test isn't
    run by default, so we never found out that it would fail.
    
    It's still disabled by default, because it takes about 30 seconds.
---
 tests/twisted/account-manager/server-drops-us.py | 11 ++++++++---
 1 file changed, 8 insertions(+), 3 deletions(-)

diff --git a/tests/twisted/account-manager/server-drops-us.py b/tests/twisted/account-manager/server-drops-us.py
index 0176b95..8a335f4 100644
--- a/tests/twisted/account-manager/server-drops-us.py
+++ b/tests/twisted/account-manager/server-drops-us.py
@@ -77,8 +77,9 @@ def test(q, bus, mc):
     # Connect succeeds
     conn.StatusChanged(cs.CONN_STATUS_CONNECTED, cs.CSR_NONE_SPECIFIED)
 
+    # With current MC constants this happens after 3 seconds
     conn = drop_and_expect_reconnect(q, bus, conn)
-    conn = drop_and_expect_reconnect(q, bus, conn)
+    # With current MC constants this happens after a further 9 seconds
     conn = drop_and_expect_reconnect(q, bus, conn)
 
     forbidden = [EventPattern('dbus-method-call', method='RequestConnection')]
@@ -91,8 +92,10 @@ def test(q, bus, mc):
 
     # This test can be considered to have succeeded if we don't
     # RequestConnection again before the test fails due to timeout.
+    # With current MC constants the next attempt is after 27 seconds,
+    # which is more than the 15 second timeout hard-coded below.
     try:
-        q.expect('the end of the world')
+        q.expect('the-end-of-the-world')
     except TimeoutError:
         return
     else:
@@ -128,4 +131,6 @@ def drop_and_expect_reconnect(q, bus, conn):
     return conn
 
 if __name__ == '__main__':
-    exec_test(test, {})
+    # A 15 second timeout is enough to retry after 3 seconds, then 9 seconds,
+    # but not 27 seconds.
+    exec_test(test, {}, timeout=15)

-- 
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-telepathy/telepathy-mission-control-6.git



More information about the Pkg-telepathy-commits mailing list