Skip to content

Commit 95471ac

Browse files
authored
[PBCKP-257] fix time_consuming.TimeConsumingTests.test_pbckp150 (#525)
1 parent 7d3e7f8 commit 95471ac

File tree

1 file changed

+18
-12
lines changed

1 file changed

+18
-12
lines changed

tests/time_consuming.py

+18-12
Original file line numberDiff line numberDiff line change
@@ -15,22 +15,28 @@ def test_pbckp150(self):
1515
run pgbench, vacuum VERBOSE FULL and ptrack backups in parallel
1616
"""
1717
# init node
18+
if self.pg_config_version < self.version_to_num('11.0'):
19+
return unittest.skip('You need PostgreSQL >= 11 for this test')
20+
if not self.ptrack:
21+
return unittest.skip('Skipped because ptrack support is disabled')
22+
1823
fname = self.id().split('.')[3]
1924
node = self.make_simple_node(
2025
base_dir=os.path.join(module_name, fname, 'node'),
2126
set_replication=True,
22-
initdb_params=['--data-checksums'])
23-
node.append_conf('postgresql.conf',
24-
"""
25-
max_connections = 100
26-
wal_keep_size = 16000
27-
ptrack.map_size = 1
28-
shared_preload_libraries='ptrack'
29-
log_statement = 'none'
30-
fsync = off
31-
log_checkpoints = on
32-
autovacuum = off
33-
""")
27+
ptrack_enable=self.ptrack,
28+
initdb_params=['--data-checksums'],
29+
pg_options={
30+
'max_connections': 100,
31+
'log_statement': 'none',
32+
'log_checkpoints': 'on',
33+
'autovacuum': 'off',
34+
'ptrack.map_size': 1})
35+
36+
if node.major_version >= 13:
37+
self.set_auto_conf(node, {'wal_keep_size': '16000MB'})
38+
else:
39+
self.set_auto_conf(node, {'wal_keep_segments': '1000'})
3440

3541
# init probackup and add an instance
3642
backup_dir = os.path.join(self.tmp_path, module_name, fname, 'backup')

0 commit comments

Comments
 (0)