Stop using deprecated zake coordination driver

The zake driver in tooz was deprecated[1] because the zake library has
been archived[2].

[1] 9acbc5391521155b04aa6654fb91c90b467b5750
[2] https://github.com/yahoo/Zake

Change-Id: I0fabc466c045c2dc20c88932b061422612c48005
This commit is contained in:
Takashi Kajinami 2024-01-21 23:49:21 +09:00
parent 002005a440
commit f7ab684d1b
2 changed files with 9 additions and 3 deletions

View File

@ -14,6 +14,8 @@
# License for the specific language governing permissions and limitations
# under the License.
import shutil
import tempfile
from unittest import mock
from oslo_config import fixture as cfg_fixture
@ -34,7 +36,10 @@ class TestCoordination(oslotest.base.BaseTestCase):
self.useFixture(cfg_fixture.Config(CONF))
self.name = 'coordination'
self.tg = mock.Mock()
CONF.set_override('backend_url', 'zake://', group='coordination')
self.tempdir = tempfile.mkdtemp()
CONF.set_override('backend_url', "file://%s" % self.tempdir,
group='coordination')
self.addCleanup(shutil.rmtree, self.tempdir, ignore_errors=True)
def test_retry_if_tooz_error(self):
self.assertFalse(coordination._retry_if_tooz_error(Exception()))
@ -158,10 +163,12 @@ class TestCoordination(oslotest.base.BaseTestCase):
class TestPartitioner(oslotest.base.BaseTestCase):
def setUp(self):
super().setUp()
self.tempdir = tempfile.mkdtemp()
self.addCleanup(shutil.rmtree, self.tempdir, ignore_errors=True)
def _get_partitioner(self, partitions, host=b'a'):
fixture = self.useFixture(base_fixtures.CoordinatorFixture(
'zake://', host)
"file://%s" % self.tempdir, host)
)
group = 'group'
fixture.coordinator.create_group(group)

View File

@ -15,7 +15,6 @@ WebTest>=2.0.27 # MIT
tempest>=21.0.0 # Apache-2.0
# Bandit security code scanner
bandit>=1.1.0 # Apache-2.0
zake>=0.1.6 # Apache-2.0
doc8>=0.6.0 # Apache-2.0
Pygments>=2.2.0 # BSD license
pymemcache!=1.3.0,>=1.2.9 # Apache 2.0 License