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 | 316bae58a0359f1a4796ea866440705775375bac (patch) | |
| tree | 01608b1d5466af37ea3950367fcb429c6bf73435 /qpid/python | |
| parent | 99811b3ed897871fb61a59712083e96a695ad04a (diff) | |
| download | qpid-python-316bae58a0359f1a4796ea866440705775375bac.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@952786 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'qpid/python')
| -rw-r--r-- | qpid/python/qpid/brokertest.py | 8 |
1 files changed, 6 insertions, 2 deletions
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))) |
