telepathy-gabble: servicetest: improve timeout output

Guillaume Desmottes gdesmott at kemper.freedesktop.org
Thu Oct 10 13:24:11 PDT 2013


Module: telepathy-gabble
Branch: master
Commit: d09a9aa8d1dbbabcb3f9b45649af0366f4a7d8d8
URL:    http://cgit.freedesktop.org/telepathy/telepathy-gabble/commit/?id=d09a9aa8d1dbbabcb3f9b45649af0366f4a7d8d8

Author: Guillaume Desmottes <guillaume.desmottes at collabora.co.uk>
Date:   Thu Oct 10 16:21:34 2013 -0400

servicetest: improve timeout output

Copied from MC master.

---

 tests/twisted/servicetest.py |    9 ++++++++-
 1 files changed, 8 insertions(+), 1 deletions(-)

diff --git a/tests/twisted/servicetest.py b/tests/twisted/servicetest.py
index e06d631..0beedb4 100644
--- a/tests/twisted/servicetest.py
+++ b/tests/twisted/servicetest.py
@@ -197,7 +197,14 @@ class BaseEventQueue:
         t = time.time()
 
         while True:
-            event = self.wait([pattern.subqueue])
+            try:
+                event = self.wait([pattern.subqueue])
+            except TimeoutError:
+                self.log('timeout')
+                self.log('still expecting:')
+                self.log(' - %r' % pattern)
+                raise
+
             self._check_forbidden(event)
 
             if pattern.match(event):



More information about the telepathy-commits mailing list