@@ -352,6 +352,7 @@ def run(self):
352
352
bound = 1 if is_single_test else versions_count - 1
353
353
354
354
for i in range (0 , bound ):
355
+ print ('yyyyyyyyyyyyyyyyyyyyyyy' )
355
356
self .old_installer = self .installers [i ][1 ]
356
357
if i == 0 :
357
358
# if i != 0, it means that self.cfg was already updated after chain-upgrade
@@ -385,6 +386,10 @@ def run(self):
385
386
self .finish_setup ()
386
387
if self .create_oneshard_db :
387
388
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
+
388
393
self .make_data ()
389
394
self .after_makedata_check ()
390
395
self .check_data_impl ()
@@ -425,6 +430,15 @@ def run(self):
425
430
self .check_data_impl ()
426
431
if not self .check_non_backup_data ():
427
432
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??" )
428
442
429
443
if self .new_installer :
430
444
if self .hot_backup :
@@ -891,6 +905,42 @@ def check_data_impl(self):
891
905
if not frontend_found :
892
906
raise Exception ("no frontend found." )
893
907
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
+
894
944
@step
895
945
def create_non_backup_data (self ):
896
946
"""create data to be zapped by the restore operation"""
@@ -1040,6 +1090,7 @@ def search_for_warnings(self, print_lines=True):
1040
1090
@step
1041
1091
def zip_test_dir (self ):
1042
1092
"""💾 store the test directory for later analysis"""
1093
+ return #TODO
1043
1094
build_number = os .environ .get ("BUILD_NUMBER" )
1044
1095
if build_number :
1045
1096
build_number = "_" + build_number
0 commit comments