Avoid silent skip for zookeeper config problems

Change-Id: I9a50e9db9860c3736ad68136956b31d89e626552
Signed-off-by: Takashi Kajinami <kajinamit@oss.nttdata.com>
This commit is contained in:
Takashi Kajinami
2026-02-14 09:56:39 +09:00
parent d53c3023b7
commit 9d11fa7b2b

View File

@@ -58,16 +58,11 @@ class ZkPersistenceTest(test.TestCase, base.PersistenceTestMixin):
# Create a unique path just for this test (so that we don't overwrite
# what other tests are doing).
conf['path'] = TEST_PATH_TPL % (uuidutils.generate_uuid())
try:
self.backend = impl_zookeeper.ZkBackend(conf)
except Exception as e:
self.skipTest("Failed creating backend created from configuration"
" %s due to %s" % (conf, e))
else:
self.addCleanup(self.backend.close)
self.addCleanup(clean_backend, self.backend, conf)
with contextlib.closing(self.backend.get_connection()) as conn:
conn.upgrade()
self.backend = impl_zookeeper.ZkBackend(conf)
self.addCleanup(self.backend.close)
self.addCleanup(clean_backend, self.backend, conf)
with contextlib.closing(self.backend.get_connection()) as conn:
conn.upgrade()
def test_zk_persistence_entry_point(self):
conf = {'connection': 'zookeeper:'}