From 1e9cb458e8dfbfbae5e396a2c5dad74787b12540 Mon Sep 17 00:00:00 2001 From: Dana Powers Date: Wed, 22 Apr 2026 19:24:54 -0700 Subject: [PATCH] Catch exceptions in fixture.open() -> close() --- test/integration/fixtures.py | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) 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,