[telepathy-gabble/master] wait_bytestream_open: ensure we found one streamhost

Guillaume Desmottes guillaume.desmottes at collabora.co.uk
Fri Apr 3 08:41:31 PDT 2009


---
 tests/twisted/bytestream.py |    5 +++++
 1 files changed, 5 insertions(+), 0 deletions(-)

diff --git a/tests/twisted/bytestream.py b/tests/twisted/bytestream.py
index cb9caf6..92d3bc5 100644
--- a/tests/twisted/bytestream.py
+++ b/tests/twisted/bytestream.py
@@ -299,13 +299,18 @@ class BytestreamS5B(Bytestream):
         assert mode == 'tcp'
         assert sid == self.stream_id
 
+        stream_host_found = False
+
         for jid, host, port in hosts:
             if jid == self.initiator:
+                stream_host_found = True
                 if self._socks5_connect(host, port):
                     self._send_socks5_reply(id, jid)
                 else:
                     # Connection failed
                     self.send_not_found(id)
+                break
+        assert stream_host_found
 
     def get_data(self, size=0):
         binary = ''
-- 
1.5.6.5




More information about the telepathy-commits mailing list