@@ -936,7 +936,7 @@ def test_backward_compatibility_merge_3(self):
936
936
def test_backward_compatibility_merge_4 (self ):
937
937
"""
938
938
Start merge between minor version, crash and retry it.
939
- old binary version =< 2.2.7
939
+ old binary version =< 2.4.0
940
940
"""
941
941
fname = self .id ().split ('.' )[3 ]
942
942
backup_dir = os .path .join (self .tmp_path , module_name , fname , 'backup' )
@@ -982,17 +982,25 @@ def test_backward_compatibility_merge_4(self):
982
982
983
983
gdb .set_breakpoint ('rename' )
984
984
gdb .run_until_break ()
985
- gdb .continue_execution_until_break (1000 )
985
+ gdb .continue_execution_until_break (500 )
986
986
gdb ._execute ('signal SIGKILL' )
987
987
988
- self .merge_backup (backup_dir , "node" , page_id )
989
-
990
- # check data correctness for PAGE
991
- node_restored .cleanup ()
992
- self .restore_node (backup_dir , 'node' , node_restored , backup_id = page_id )
993
-
994
- pgdata_restored = self .pgdata_content (node_restored .data_dir )
995
- self .compare_pgdata (pgdata , pgdata_restored )
988
+ try :
989
+ self .merge_backup (backup_dir , "node" , page_id )
990
+ self .assertEqual (
991
+ 1 , 0 ,
992
+ "Expecting Error because of format changes.\n "
993
+ "Output: {0} \n CMD: {1}" .format (
994
+ repr (self .output ), self .cmd ))
995
+ except ProbackupException as e :
996
+ self .assertIn (
997
+ "ERROR: Retry of failed merge for backups with different "
998
+ "between minor versions is forbidden to avoid data corruption "
999
+ "because of storage format changes introduced in 2.4.0 version, "
1000
+ "please take a new full backup" ,
1001
+ e .message ,
1002
+ '\n Unexpected Error Message: {0}\n CMD: {1}' .format (
1003
+ repr (e .message ), self .cmd ))
996
1004
997
1005
# Clean after yourself
998
1006
self .del_test_dir (module_name , fname )
0 commit comments