You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@qpid.apache.org by rh...@apache.org on 2008/11/10 16:41:42 UTC
svn commit: r712679 - in /incubator/qpid/trunk/qpid/python: qpid/util.py
tests/assembler.py tests/connection.py tests/framer.py
Author: rhs
Date: Mon Nov 10 07:41:42 2008
New Revision: 712679
URL: http://svn.apache.org/viewvc?rev=712679&view=rev
Log:
fixed potential race condition in qpid.util.listen; added asserts to internal test cases to ensure that the test only proceeds when the server is bound
Modified:
incubator/qpid/trunk/qpid/python/qpid/util.py
incubator/qpid/trunk/qpid/python/tests/assembler.py
incubator/qpid/trunk/qpid/python/tests/connection.py
incubator/qpid/trunk/qpid/python/tests/framer.py
Modified: incubator/qpid/trunk/qpid/python/qpid/util.py
URL: http://svn.apache.org/viewvc/incubator/qpid/trunk/qpid/python/qpid/util.py?rev=712679&r1=712678&r2=712679&view=diff
==============================================================================
--- incubator/qpid/trunk/qpid/python/qpid/util.py (original)
+++ incubator/qpid/trunk/qpid/python/qpid/util.py Mon Nov 10 07:41:42 2008
@@ -34,8 +34,8 @@
sock = socket.socket()
sock.setsockopt(socket.SOL_SOCKET, socket.SO_REUSEADDR, 1)
sock.bind((host, port))
- bound()
sock.listen(5)
+ bound()
while predicate():
s, a = sock.accept()
yield s
Modified: incubator/qpid/trunk/qpid/python/tests/assembler.py
URL: http://svn.apache.org/viewvc/incubator/qpid/trunk/qpid/python/tests/assembler.py?rev=712679&r1=712678&r2=712679&view=diff
==============================================================================
--- incubator/qpid/trunk/qpid/python/tests/assembler.py (original)
+++ incubator/qpid/trunk/qpid/python/tests/assembler.py Mon Nov 10 07:41:42 2008
@@ -47,6 +47,7 @@
self.server.start()
started.wait(3)
+ assert started.isSet()
def tearDown(self):
self.running = False
Modified: incubator/qpid/trunk/qpid/python/tests/connection.py
URL: http://svn.apache.org/viewvc/incubator/qpid/trunk/qpid/python/tests/connection.py?rev=712679&r1=712678&r2=712679&view=diff
==============================================================================
--- incubator/qpid/trunk/qpid/python/tests/connection.py (original)
+++ incubator/qpid/trunk/qpid/python/tests/connection.py Mon Nov 10 07:41:42 2008
@@ -87,6 +87,7 @@
self.server.start()
started.wait(3)
+ assert started.isSet()
def tearDown(self):
self.running = False
Modified: incubator/qpid/trunk/qpid/python/tests/framer.py
URL: http://svn.apache.org/viewvc/incubator/qpid/trunk/qpid/python/tests/framer.py?rev=712679&r1=712678&r2=712679&view=diff
==============================================================================
--- incubator/qpid/trunk/qpid/python/tests/framer.py (original)
+++ incubator/qpid/trunk/qpid/python/tests/framer.py Mon Nov 10 07:41:42 2008
@@ -46,6 +46,7 @@
self.server.start()
started.wait(3)
+ assert started.isSet()
def tearDown(self):
self.running = False