1
0
mirror of https://github.com/postgrespro/pg_probackup.git synced 2025-02-03 14:01:57 +02:00

tests: minor fixes

This commit is contained in:
Grigory Smolkin 2019-04-20 12:42:17 +03:00
parent 58a3d2dcb0
commit 380d6c655f
2 changed files with 21 additions and 1 deletions

View File

@ -143,7 +143,7 @@ class ReplicaTest(ProbackupTest, unittest.TestCase):
pg_options={
'archive_timeout': '10s',
'checkpoint_timeout': '30s',
'max_wal_size': '16MB'})
'max_wal_size': '32MB'})
self.init_pb(backup_dir)
self.add_instance(backup_dir, 'master', master)

View File

@ -1753,8 +1753,28 @@ class ValidateTest(ProbackupTest, unittest.TestCase):
# if result == "":
# self.assertEqual(1, 0, 'Error is expected due to Master and Node1 having the common archive and archive_command')
node1.psql(
"postgres",
"create table t_heap_1 as select i as id, md5(i::text) as text, "
"md5(repeat(i::text,10))::tsvector as tsvector "
"from generate_series(0,10) i")
self.switch_wal_segment(node1)
# wals_dir = os.path.join(backup_dir, 'wal', 'node1')
# wals = [f for f in os.listdir(wals_dir) if os.path.isfile(os.path.join(
# wals_dir, f)) and not f.endswith('.backup') and not f.endswith('.partial')]
# wals = map(str, wals)
# print(wals)
self.switch_wal_segment(node2)
# wals_dir = os.path.join(backup_dir, 'wal', 'node1')
# wals = [f for f in os.listdir(wals_dir) if os.path.isfile(os.path.join(
# wals_dir, f)) and not f.endswith('.backup') and not f.endswith('.partial')]
# wals = map(str, wals)
# print(wals)
time.sleep(5)
log_file = os.path.join(node2.logs_dir, 'postgresql.log')