@@ -352,6 +352,7 @@ def run(self):
352352 bound = 1 if is_single_test else versions_count - 1
353353
354354 for i in range (0 , bound ):
355+ print ('yyyyyyyyyyyyyyyyyyyyyyy' )
355356 self .old_installer = self .installers [i ][1 ]
356357 if i == 0 :
357358 # if i != 0, it means that self.cfg was already updated after chain-upgrade
@@ -385,6 +386,10 @@ def run(self):
385386 self .finish_setup ()
386387 if self .create_oneshard_db :
387388 self .custom_databases .append (["system_oneshard_makedata" , True , 1 ])
389+ if self .hot_backup :
390+ self .progress (False , "TESTING empty HOTBACKUP" )
391+ self .empty_backup_name = self .create_backup ("empty_" + self .name )
392+
388393 self .make_data ()
389394 self .after_makedata_check ()
390395 self .check_data_impl ()
@@ -425,6 +430,15 @@ def run(self):
425430 self .check_data_impl ()
426431 if not self .check_non_backup_data ():
427432 raise Exception ("data created after backup is still there??" )
433+ self .clear_data_impl ()
434+ print ('zzzzzzzzzzzzzzzzzzzzzzzzzz' )
435+ self .restore_backup (backups [len (backups ) - 1 ])
436+ self .tcp_ping_all_nodes ()
437+ self .after_backup ()
438+ time .sleep (20 ) # TODO fix
439+ self .check_data_impl ()
440+ if not self .check_non_backup_data ():
441+ raise Exception ("data created after backup is still there??" )
428442
429443 if self .new_installer :
430444 if self .hot_backup :
@@ -891,6 +905,42 @@ def check_data_impl(self):
891905 if not frontend_found :
892906 raise Exception ("no frontend found." )
893907
908+ @step
909+ def clear_data_impl (self ):
910+ """clear the data on the installation"""
911+ frontend_found = False
912+ if self .has_makedata_data :
913+ print (self .makedata_instances )
914+ for starter in self .makedata_instances :
915+ if not starter .is_leader :
916+ continue
917+ assert starter .arangosh , "check: this starter doesn't have an arangosh!"
918+ frontend_found = True
919+ arangosh = starter .arangosh
920+ for db_name , one_shard , count_offset in self .makedata_databases ():
921+ try :
922+ print (count_offset )
923+ starter .arangosh .clear_test_data (
924+ self .name ,
925+ starter .supports_foxx_tests ,
926+ args = ["--countOffset" , str (count_offset )],
927+ database_name = db_name ,
928+ one_shard = one_shard ,
929+ )
930+ break
931+ except CliExecutionException as exc :
932+ if not self .cfg .verbose :
933+ print (exc .execution_result [1 ])
934+ self .ask_continue_or_exit (
935+ f"check_data has failed for { self .name } in database { db_name } with { exc } " ,
936+ exc .execution_result [1 ],
937+ False ,
938+ exc ,
939+ )
940+ return
941+ if not frontend_found :
942+ raise Exception ("no frontend found." )
943+
894944 @step
895945 def create_non_backup_data (self ):
896946 """create data to be zapped by the restore operation"""
@@ -1040,6 +1090,7 @@ def search_for_warnings(self, print_lines=True):
10401090 @step
10411091 def zip_test_dir (self ):
10421092 """💾 store the test directory for later analysis"""
1093+ return #TODO
10431094 build_number = os .environ .get ("BUILD_NUMBER" )
10441095 if build_number :
10451096 build_number = "_" + build_number
0 commit comments