Skip to content

Commit de497aa

Browse files
committed
Stabilize tests.ptrack.PtrackTest.test_horizon_lsn_ptrack
1 parent 76acd88 commit de497aa

File tree

2 files changed

+11
-10
lines changed

2 files changed

+11
-10
lines changed

tests/helpers/ptrack_helpers.py

+7
Original file line numberDiff line numberDiff line change
@@ -1602,6 +1602,13 @@ def get_version(self, node):
16021602
return self.version_to_num(
16031603
testgres.get_pg_config()['VERSION'].split(" ")[1])
16041604

1605+
def get_ptrack_version(self, node):
1606+
version = node.safe_psql(
1607+
"postgres",
1608+
"SELECT extversion "
1609+
"FROM pg_catalog.pg_extension WHERE extname = 'ptrack'").decode('utf-8').rstrip()
1610+
return self.version_to_num(version)
1611+
16051612
def get_bin_path(self, binary):
16061613
return testgres.get_bin_path(binary)
16071614

tests/ptrack.py

+4-10
Original file line numberDiff line numberDiff line change
@@ -4465,16 +4465,10 @@ def test_horizon_lsn_ptrack(self):
44654465
"postgres",
44664466
"CREATE EXTENSION ptrack")
44674467

4468-
# TODO: ptrack version must be 2.1
4469-
ptrack_version = node.safe_psql(
4470-
"postgres",
4471-
"SELECT extversion "
4472-
"FROM pg_catalog.pg_extension WHERE extname = 'ptrack'").decode('utf-8').rstrip()
4473-
4474-
self.assertEqual(
4475-
ptrack_version,
4476-
"2.1",
4477-
"You need ptrack 2.1 for this test")
4468+
self.assertGreaterEqual(
4469+
self.get_ptrack_version(node),
4470+
self.version_to_num("2.1"),
4471+
"You need ptrack >=2.1 for this test")
44784472

44794473
# set map_size to a minimal value
44804474
self.set_auto_conf(node, {'ptrack.map_size': '1'})

0 commit comments

Comments
 (0)