Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit 6caf77e

Browse files
committed
tests: minor fixes
1 parent ffa63a2 commit 6caf77e

File tree

1 file changed

+29
-29
lines changed

1 file changed

+29
-29
lines changed

tests/retention.py

+29-29
Original file line numberDiff line numberDiff line change
@@ -798,26 +798,26 @@ def test_basic_window_merge_multiple_descendants(self):
798798

799799
# Take FULL BACKUPs
800800
backup_id_a = self.backup_node(backup_dir, 'node', node)
801-
pgbench = node.pgbench(options=['-T', '10', '-c', '2'])
802-
pgbench.wait()
801+
# pgbench = node.pgbench(options=['-T', '10', '-c', '2'])
802+
# pgbench.wait()
803803

804804
backup_id_b = self.backup_node(backup_dir, 'node', node)
805-
pgbench = node.pgbench(options=['-T', '10', '-c', '2'])
806-
pgbench.wait()
805+
# pgbench = node.pgbench(options=['-T', '10', '-c', '2'])
806+
# pgbench.wait()
807807

808808
# Change FULLb backup status to ERROR
809809
self.change_backup_status(backup_dir, 'node', backup_id_b, 'ERROR')
810810

811811
page_id_a1 = self.backup_node(
812812
backup_dir, 'node', node, backup_type='page')
813813

814-
pgbench = node.pgbench(options=['-T', '10', '-c', '2'])
815-
pgbench.wait()
814+
# pgbench = node.pgbench(options=['-T', '10', '-c', '2'])
815+
# pgbench.wait()
816816

817-
# Change FULLb backup status to OK
817+
# Change FULLb to OK
818818
self.change_backup_status(backup_dir, 'node', backup_id_b, 'OK')
819819

820-
# Change PAGEa1 backup status to ERROR
820+
# Change PAGEa1 to ERROR
821821
self.change_backup_status(backup_dir, 'node', page_id_a1, 'ERROR')
822822

823823
# PAGEa1 ERROR
@@ -832,13 +832,13 @@ def test_basic_window_merge_multiple_descendants(self):
832832
# FULLb OK
833833
# FULLa OK
834834

835-
pgbench = node.pgbench(options=['-T', '10', '-c', '2'])
836-
pgbench.wait()
835+
# pgbench = node.pgbench(options=['-T', '10', '-c', '2'])
836+
# pgbench.wait()
837837

838-
# Change PAGEa1 backup status to OK
838+
# Change PAGEa1 to OK
839839
self.change_backup_status(backup_dir, 'node', page_id_a1, 'OK')
840840

841-
# Change PAGEb1 and FULLb backup status to ERROR
841+
# Change PAGEb1 and FULLb to ERROR
842842
self.change_backup_status(backup_dir, 'node', page_id_b1, 'ERROR')
843843
self.change_backup_status(backup_dir, 'node', backup_id_b, 'ERROR')
844844

@@ -850,20 +850,20 @@ def test_basic_window_merge_multiple_descendants(self):
850850
page_id_a2 = self.backup_node(
851851
backup_dir, 'node', node, backup_type='page')
852852

853-
pgbench = node.pgbench(options=['-T', '10', '-c', '2'])
854-
pgbench.wait()
853+
# pgbench = node.pgbench(options=['-T', '10', '-c', '2'])
854+
# pgbench.wait()
855855

856856
# PAGEa2 OK
857857
# PAGEb1 ERROR
858858
# PAGEa1 OK
859859
# FULLb ERROR
860860
# FULLa OK
861861

862-
# Change PAGEb1 and FULLb backup status to OK
862+
# Change PAGEb1 and FULLb to OK
863863
self.change_backup_status(backup_dir, 'node', page_id_b1, 'OK')
864864
self.change_backup_status(backup_dir, 'node', backup_id_b, 'OK')
865865

866-
# Change PAGEa2 and FULLa backup status to ERROR
866+
# Change PAGEa2 and FULLa to ERROR
867867
self.change_backup_status(backup_dir, 'node', page_id_a2, 'ERROR')
868868
self.change_backup_status(backup_dir, 'node', backup_id_a, 'ERROR')
869869

@@ -876,8 +876,8 @@ def test_basic_window_merge_multiple_descendants(self):
876876
page_id_b2 = self.backup_node(
877877
backup_dir, 'node', node, backup_type='page')
878878

879-
pgbench = node.pgbench(options=['-T', '10', '-c', '2'])
880-
pgbench.wait()
879+
# pgbench = node.pgbench(options=['-T', '10', '-c', '2'])
880+
# pgbench.wait()
881881

882882
# PAGEb2 OK
883883
# PAGEa2 ERROR
@@ -886,7 +886,7 @@ def test_basic_window_merge_multiple_descendants(self):
886886
# FULLb OK
887887
# FULLa ERROR
888888

889-
# Change PAGEb2 and PAGEb1 status to ERROR
889+
# Change PAGEb2 and PAGEb1 to ERROR
890890
self.change_backup_status(backup_dir, 'node', page_id_b2, 'ERROR')
891891
self.change_backup_status(backup_dir, 'node', page_id_b1, 'ERROR')
892892

@@ -903,8 +903,8 @@ def test_basic_window_merge_multiple_descendants(self):
903903

904904
page_id_a3 = self.backup_node(
905905
backup_dir, 'node', node, backup_type='page')
906-
pgbench = node.pgbench(options=['-T', '10', '-c', '2'])
907-
pgbench.wait()
906+
# pgbench = node.pgbench(options=['-T', '10', '-c', '2'])
907+
# pgbench.wait()
908908

909909
# PAGEa3 OK
910910
# PAGEb2 ERROR
@@ -914,11 +914,12 @@ def test_basic_window_merge_multiple_descendants(self):
914914
# FULLb ERROR
915915
# FULLa OK
916916

917-
# Change PAGEa3 status to ERROR
917+
# Change PAGEa3 to ERROR
918918
self.change_backup_status(backup_dir, 'node', page_id_a3, 'ERROR')
919919

920-
# Change PAGEb2 status to OK
920+
# Change PAGEb2, PAGEb1 and FULLb to OK
921921
self.change_backup_status(backup_dir, 'node', page_id_b2, 'OK')
922+
self.change_backup_status(backup_dir, 'node', page_id_b1, 'OK')
922923
self.change_backup_status(backup_dir, 'node', backup_id_b, 'OK')
923924

924925
page_id_b3 = self.backup_node(
@@ -928,7 +929,7 @@ def test_basic_window_merge_multiple_descendants(self):
928929
# PAGEa3 ERROR
929930
# PAGEb2 OK
930931
# PAGEa2 ERROR
931-
# PAGEb1 ERROR
932+
# PAGEb1 OK
932933
# PAGEa1 OK
933934
# FULLb OK
934935
# FULLa OK
@@ -949,16 +950,15 @@ def test_basic_window_merge_multiple_descendants(self):
949950

950951
# Check that page_id_a3 and page_id_a2 are both direct descendants of page_id_a1
951952
self.assertEqual(
952-
self.show_pb(backup_dir, 'node', backup_id=page_id_a3)['parent-backup-id'],
953+
self.show_pb(
954+
backup_dir, 'node', backup_id=page_id_a3)['parent-backup-id'],
953955
page_id_a1)
954956

955957
self.assertEqual(
956-
self.show_pb(backup_dir, 'node', backup_id=page_id_a2)['parent-backup-id'],
958+
self.show_pb(
959+
backup_dir, 'node', backup_id=page_id_a2)['parent-backup-id'],
957960
page_id_a1)
958961

959-
print("Backups {0} and {1} are children of {2}".format(
960-
page_id_a3, page_id_a2, page_id_a1))
961-
962962
# Purge backups
963963
backups = os.path.join(backup_dir, 'backups', 'node')
964964
for backup in os.listdir(backups):

0 commit comments

Comments
 (0)