diff options
author | Alan Conway <aconway@apache.org> | 2010-06-08 19:31:59 +0000 |
---|---|---|
committer | Alan Conway <aconway@apache.org> | 2010-06-08 19:31:59 +0000 |
commit | c0d66373d18381919835623f700fd66e8f399765 (patch) | |
tree | d5c91dfdfdb0c16ea18931930c3e40add12be251 /python | |
parent | 7bc7343d693ac6538635ed4e55ada5722b2070a1 (diff) | |
download | qpid-python-c0d66373d18381919835623f700fd66e8f399765.tar.gz |
brokertest.py: fix ready() test to create a session as well as a connection.
The change in r952692 means that just creating a connection will
return before a clustered broker is fully initialized. Creating a
session will block till the broker is initialized.
git-svn-id: https://svn.apache.org/repos/asf/qpid/trunk/qpid@952786 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'python')
-rw-r--r-- | python/qpid/brokertest.py | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/python/qpid/brokertest.py b/python/qpid/brokertest.py index 92a94a8d38..b400b0d3ee 100644 --- a/python/qpid/brokertest.py +++ b/python/qpid/brokertest.py @@ -384,8 +384,12 @@ class Broker(Popen): if not retry(self.log_ready): raise Exception( "Timed out waiting for broker %s%s"%(self.name, error_line(self.log,4))) - # Make a connection, this will wait for extended cluster init to finish. - try: self.connect(**kwargs).close() + # Create a connection and a session. For a cluster broker this will + # return after cluster init has finished. + try: + c = self.connect(**kwargs) + try: c.session() + finally: c.close() except: raise RethrownException( "Broker %s failed ready test%s"%(self.name,error_line(self.log,4))) |