Skip to content

Commit 0b1ae53

Browse files
ololobusgsmolk
authored andcommitted
Fix (?) test_ptrack_uncommitted_xact
1 parent 8a6b5af commit 0b1ae53

File tree

1 file changed

+10
-4
lines changed

1 file changed

+10
-4
lines changed

tests/ptrack.py

Lines changed: 10 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -413,7 +413,11 @@ def test_ptrack_uncommitted_xact(self):
413413
backup_dir, 'node', node, backup_type='ptrack',
414414
options=['--stream'])
415415

416-
pgdata = self.pgdata_content(node.data_dir)
416+
# TODO: what's the point in taking pgdata content, then taking
417+
# backup, and the trying to compare those two? Backup issues a
418+
# checkpoint, so it will modify pgdata with close to 100% chance.
419+
if self.paranoia:
420+
pgdata = self.pgdata_content(node.data_dir)
417421

418422
self.backup_node(
419423
backup_dir, 'node', node, backup_type='ptrack',
@@ -427,16 +431,18 @@ def test_ptrack_uncommitted_xact(self):
427431
backup_dir, 'node', node_restored,
428432
node_restored.data_dir, options=["-j", "4"])
429433

430-
pgdata_restored = self.pgdata_content(
431-
node_restored.data_dir, ignore_ptrack=False)
434+
if self.paranoia:
435+
pgdata_restored = self.pgdata_content(
436+
node_restored.data_dir, ignore_ptrack=False)
432437

433438
self.set_auto_conf(
434439
node_restored, {'port': node_restored.port})
435440

436441
node_restored.slow_start()
437442

438443
# Physical comparison
439-
self.compare_pgdata(pgdata, pgdata_restored)
444+
if self.paranoia:
445+
self.compare_pgdata(pgdata, pgdata_restored)
440446

441447
# Clean after yourself
442448
self.del_test_dir(module_name, fname)

0 commit comments

Comments
 (0)