Skip to content

Commit 2d2da50

Browse files
committed
tests: minor fixes
1 parent d2c60ca commit 2d2da50

File tree

4 files changed

+14
-5
lines changed

4 files changed

+14
-5
lines changed

tests/backup.py

+4-3
Original file line numberDiff line numberDiff line change
@@ -2019,6 +2019,7 @@ def test_backup_with_less_privileges_role(self):
20192019
self.set_replica(node, replica)
20202020
self.add_instance(backup_dir, 'replica', replica)
20212021
self.set_archiving(backup_dir, 'replica', replica, replica=True)
2022+
self.set_auto_conf(replica, {'hot_standby': 'on'})
20222023

20232024
# freeze bgwriter to get rid of RUNNING XACTS records
20242025
bgwriter_pid = node.auxiliary_pids[ProcessType.BackgroundWriter][0]
@@ -2036,13 +2037,13 @@ def test_backup_with_less_privileges_role(self):
20362037
# FULL backup from replica
20372038
self.backup_node(
20382039
backup_dir, 'replica', replica,
2039-
datname='backupdb', options=['--stream', '-U', 'backup'])
2040+
datname='backupdb', options=['--stream', '-U', 'backup', '--archive-timeout=30s'])
20402041

2041-
self.switch_wal_segment(node)
2042+
# self.switch_wal_segment(node)
20422043

20432044
self.backup_node(
20442045
backup_dir, 'replica', replica, datname='backupdb',
2045-
options=['-U', 'backup', '--log-level-file=verbose', '--archive-timeout=30s'])
2046+
options=['-U', 'backup', '--archive-timeout=300s'])
20462047

20472048
# PAGE backup from replica
20482049
self.backup_node(

tests/merge.py

+2
Original file line numberDiff line numberDiff line change
@@ -1051,6 +1051,8 @@ def test_continue_failed_merge(self):
10511051
gdb.continue_execution_until_break(5)
10521052

10531053
gdb._execute('signal SIGKILL')
1054+
gdb._execute('detach')
1055+
time.sleep(1)
10541056

10551057
print(self.show_pb(backup_dir, as_text=True, as_json=False))
10561058

tests/replica.py

+7-1
Original file line numberDiff line numberDiff line change
@@ -402,7 +402,13 @@ def test_take_backup_from_delayed_replica(self):
402402

403403
self.wait_until_replica_catch_with_master(master, replica)
404404

405-
self.set_auto_conf(replica, {'recovery_min_apply_delay': '300s'})
405+
if self.get_version(master) >= self.version_to_num('12.0'):
406+
self.set_auto_conf(
407+
replica, {'recovery_min_apply_delay': '300s'})
408+
else:
409+
replica.append_conf(
410+
'postgresql.auto.conf',
411+
'recovery_min_apply_delay = 300s')
406412

407413
replica.stop()
408414
replica.slow_start(replica=True)

tests/time_stamp.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -60,7 +60,7 @@ def test_server_date_style(self):
6060
base_dir="{0}/{1}/node".format(module_name, fname),
6161
set_replication=True,
6262
initdb_params=['--data-checksums'],
63-
pg_options={"datestyle": "'GERMAN, DMY'"})
63+
pg_options={"datestyle": "GERMAN, DMY"})
6464

6565
backup_dir = os.path.join(self.tmp_path, module_name, fname, 'backup')
6666
self.init_pb(backup_dir)

0 commit comments

Comments
 (0)