Author: mattip <[email protected]>
Branch: 
Changeset: r63273:edbc461c0354
Date: 2013-04-12 13:19 +0300
http://bitbucket.org/pypy/pypy/changeset/edbc461c0354/

Log:    make test that fails on windows more robust

diff --git a/rpython/rlib/test/test_rsocket.py 
b/rpython/rlib/test/test_rsocket.py
--- a/rpython/rlib/test/test_rsocket.py
+++ b/rpython/rlib/test/test_rsocket.py
@@ -165,8 +165,12 @@
     s2 = RSocket(AF_INET, SOCK_STREAM)
     s2.settimeout(10.0) # test one side with timeouts so select is used, 
shouldn't affect test
     def connecting():
-        s2.connect(addr)
-        lock.release()
+        try:
+            s2.connect(addr)
+            lock.release()
+        except:
+            import traceback
+            traceback.print_exc()
     lock = thread.allocate_lock()
     lock.acquire()
     thread.start_new_thread(connecting, ())
@@ -174,6 +178,7 @@
     fd1, addr2 = sock.accept()
     s1 = RSocket(fd=fd1)
     print 'connection accepted'
+    assert not lock.locked()
     lock.acquire()
     print 'connecting side knows that the connection was accepted too'
     assert addr.eq(s2.getpeername())
_______________________________________________
pypy-commit mailing list
[email protected]
http://mail.python.org/mailman/listinfo/pypy-commit

Reply via email to