From f34562d677554d9816a364c496eb95a69f8cb128 Mon Sep 17 00:00:00 2001 From: Mathias Fussenegger Date: Mon, 9 Sep 2024 11:25:33 +0200 Subject: [PATCH] Update CrateDB versions in test_reindex to work with newer JDKs --- tests/test_reindex.py | 28 ++++++++++++++-------------- 1 file changed, 14 insertions(+), 14 deletions(-) diff --git a/tests/test_reindex.py b/tests/test_reindex.py index 49e8990..57829b9 100644 --- a/tests/test_reindex.py +++ b/tests/test_reindex.py @@ -26,14 +26,14 @@ def teardown(self): shutil.rmtree(self.data_path, ignore_errors=True) def test_reindex(self): - crate_v3 = CrateNode( - crate_dir=get_crate('3.x.x'), + crate_v4 = CrateNode( + crate_dir=get_crate('4.x.x'), keep_data=True, settings=self.crate_settings ) - self._to_stop.append(crate_v3) - crate_v3.start() - with client(crate_v3.http_url) as c: + self._to_stop.append(crate_v4) + crate_v4.start() + with client(crate_v4.http_url) as c: aio.run(c.execute, "create table t (x int)") args = ( (1,), @@ -41,21 +41,21 @@ def test_reindex(self): (3,), ) aio.run(c.execute_many, "insert into t (x) values (?)", args) - crate_v3.stop() - self._to_stop.remove(crate_v3) + crate_v4.stop() + self._to_stop.remove(crate_v4) - crate_v4 = CrateNode( - crate_dir=get_crate('4.0.3'), + crate_v5 = CrateNode( + crate_dir=get_crate('5.0.3'), keep_data=True, settings=self.crate_settings ) - self._to_stop.append(crate_v4) - crate_v4.start() - reindex(hosts=crate_v4.http_url) - with client(crate_v4.http_url) as c: + self._to_stop.append(crate_v5) + crate_v5.start() + reindex(hosts=crate_v5.http_url) + with client(crate_v5.http_url) as c: result = aio.run(c.execute, "SELECT version FROM information_schema.tables WHERE table_name = 't'") version = result['rows'][0][0] - self.assertEqual(version, {'upgraded': None, 'created': '4.0.3'}) + self.assertEqual(version, {'upgraded': None, 'created': '5.0.3'}) cnt = aio.run(c.execute, 'SELECT count(*) FROM t')['rows'][0][0] self.assertEqual(cnt, 3)