diff --git a/test/integration/fixtures.py b/test/integration/fixtures.py index 4894bbcb4..56f31184a 100644 --- a/test/integration/fixtures.py +++ b/test/integration/fixtures.py @@ -186,7 +186,11 @@ def instance(cls, host=None, port=None, external=False): if host is None: host = "127.0.0.1" fixture = cls(host, port, external=external) - fixture.open() + try: + fixture.open() + except: + fixture.close() + raise return fixture def __init__(self, host, port, external=False, tmp_dir=None): @@ -297,7 +301,11 @@ def instance(cls, broker_id, zookeeper=None, zk_chroot=None, auto_create_topic=auto_create_topic, tmp_dir=tmp_dir) - fixture.open() + try: + fixture.open() + except: + fixture.close() + raise return fixture def __init__(self, host, port, broker_id, zookeeper=None, zk_chroot=None,