Skip to content

Commit 24c9541

Browse files
committed
tests: minor fixes for page tests
1 parent 6d00162 commit 24c9541

File tree

1 file changed

+26
-10
lines changed

1 file changed

+26
-10
lines changed

tests/page.py

Lines changed: 26 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -711,8 +711,8 @@ def test_page_backup_with_lost_wal_segment(self):
711711
self.assertTrue(
712712
'INFO: Wait for LSN' in e.message and
713713
'in archived WAL segment' in e.message and
714-
'WARNING: could not read WAL record at' in e.message and
715-
'ERROR: WAL segment "{0}" is absent\n'.format(
714+
'could not read WAL record at' in e.message and
715+
'WAL segment "{0}" is absent\n'.format(
716716
file) in e.message,
717717
'\n Unexpected Error Message: {0}\n CMD: {1}'.format(
718718
repr(e.message), self.cmd))
@@ -737,8 +737,8 @@ def test_page_backup_with_lost_wal_segment(self):
737737
self.assertTrue(
738738
'INFO: Wait for LSN' in e.message and
739739
'in archived WAL segment' in e.message and
740-
'WARNING: could not read WAL record at' in e.message and
741-
'ERROR: WAL segment "{0}" is absent\n'.format(
740+
'could not read WAL record at' in e.message and
741+
'WAL segment "{0}" is absent\n'.format(
742742
file) in e.message,
743743
'\n Unexpected Error Message: {0}\n CMD: {1}'.format(
744744
repr(e.message), self.cmd))
@@ -808,9 +808,9 @@ def test_page_backup_with_corrupted_wal_segment(self):
808808
self.assertTrue(
809809
'INFO: Wait for LSN' in e.message and
810810
'in archived WAL segment' in e.message and
811-
'WARNING: could not read WAL record at' in e.message and
811+
'could not read WAL record at' in e.message and
812812
'incorrect resource manager data checksum in record at' in e.message and
813-
'ERROR: Possible WAL corruption. Error has occured during reading WAL segment "{0}"'.format(
813+
'Possible WAL corruption. Error has occured during reading WAL segment "{0}"'.format(
814814
file) in e.message,
815815
'\n Unexpected Error Message: {0}\n CMD: {1}'.format(
816816
repr(e.message), self.cmd))
@@ -834,9 +834,9 @@ def test_page_backup_with_corrupted_wal_segment(self):
834834
self.assertTrue(
835835
'INFO: Wait for LSN' in e.message and
836836
'in archived WAL segment' in e.message and
837-
'WARNING: could not read WAL record at' in e.message and
837+
'could not read WAL record at' in e.message and
838838
'incorrect resource manager data checksum in record at' in e.message and
839-
'ERROR: Possible WAL corruption. Error has occured during reading WAL segment "{0}"'.format(
839+
'Possible WAL corruption. Error has occured during reading WAL segment "{0}"'.format(
840840
file) in e.message,
841841
'\n Unexpected Error Message: {0}\n CMD: {1}'.format(
842842
repr(e.message), self.cmd))
@@ -932,7 +932,15 @@ def test_page_backup_with_alien_wal_segment(self):
932932
"Output: {0} \n CMD: {1}".format(
933933
self.output, self.cmd))
934934
except ProbackupException as e:
935-
print("SUCCESS")
935+
self.assertTrue(
936+
'INFO: Wait for LSN' in e.message and
937+
'in archived WAL segment' in e.message and
938+
'could not read WAL record at' in e.message and
939+
'incorrect resource manager data checksum in record at' in e.message and
940+
'Possible WAL corruption. Error has occured during reading WAL segment "{0}"'.format(
941+
file) in e.message,
942+
'\n Unexpected Error Message: {0}\n CMD: {1}'.format(
943+
repr(e.message), self.cmd))
936944

937945
self.assertEqual(
938946
'ERROR',
@@ -950,7 +958,15 @@ def test_page_backup_with_alien_wal_segment(self):
950958
"Output: {0} \n CMD: {1}".format(
951959
self.output, self.cmd))
952960
except ProbackupException as e:
953-
print("SUCCESS")
961+
self.assertTrue(
962+
'INFO: Wait for LSN' in e.message and
963+
'in archived WAL segment' in e.message and
964+
'could not read WAL record at' in e.message and
965+
'incorrect resource manager data checksum in record at' in e.message and
966+
'Possible WAL corruption. Error has occured during reading WAL segment "{0}"'.format(
967+
file) in e.message,
968+
'\n Unexpected Error Message: {0}\n CMD: {1}'.format(
969+
repr(e.message), self.cmd))
954970

955971
self.assertEqual(
956972
'ERROR',

0 commit comments

Comments
 (0)