From 316bae58a0359f1a4796ea866440705775375bac Mon Sep 17 00:00:00 2001 From: Alan Conway Date: Tue, 8 Jun 2010 19:31:59 +0000 Subject: 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@952786 13f79535-47bb-0310-9956-ffa450edef68 --- qpid/python/qpid/brokertest.py | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) (limited to 'qpid/python') diff --git a/qpid/python/qpid/brokertest.py b/qpid/python/qpid/brokertest.py index 92a94a8d38..b400b0d3ee 100644 --- a/qpid/python/qpid/brokertest.py +++ b/qpid/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))) -- cgit v1.2.1