@@ -207,7 +207,10 @@ pub fn test(env: TestEnv) {
207
207
info ! ( log, "Start the backup process in a separate thread" ) ;
208
208
let ic_backup_path = binaries_path. join ( "ic-backup" ) ;
209
209
let mut command = Command :: new ( & ic_backup_path) ;
210
- command. arg ( "--config-file" ) . arg ( & config_file) ;
210
+ command
211
+ . arg ( "--config-file" )
212
+ . arg ( & config_file)
213
+ . arg ( "--debug" ) ;
211
214
info ! ( log, "Will execute: {:?}" , command) ;
212
215
213
216
let mut child = command
@@ -299,8 +302,8 @@ pub fn test(env: TestEnv) {
299
302
. join ( canister_id_hex)
300
303
. join ( "vmemory_0.bin" ) ;
301
304
assert ! ( memory_artifact_path. exists( ) ) ;
305
+ info ! ( log, "Modify memory file: {:?}" , memory_artifact_path) ;
302
306
modify_byte_in_file ( memory_artifact_path) . expect ( "Modifying a byte failed" ) ;
303
- info ! ( log, "Modified memory file" ) ;
304
307
305
308
let mut command = Command :: new ( & ic_backup_path) ;
306
309
command
@@ -321,14 +324,18 @@ pub fn test(env: TestEnv) {
321
324
info ! ( log, "Artifacts and states are moved to cold storage" ) ;
322
325
323
326
let mut hash_mismatch = false ;
324
- for _ in 0 ..13 {
327
+ for i in 0 ..60 {
325
328
info ! ( log, "Checking logs for hash mismatch..." ) ;
326
329
if let Ok ( dirs) = fs:: read_dir ( backup_dir. join ( "logs" ) ) {
327
330
for en in dirs {
331
+ info ! ( log, "DirEntry in logs: {:?}" , en) ;
328
332
match en {
329
333
Ok ( d) => {
330
334
let contents = fs:: read_to_string ( d. path ( ) )
331
335
. expect ( "Should have been able to read the log file" ) ;
336
+ if i == 15 {
337
+ println ! ( "{}" , contents) ;
338
+ }
332
339
333
340
if contents. contains ( DIVERGENCE_LOG_STR ) {
334
341
hash_mismatch = true ;
@@ -346,11 +353,12 @@ pub fn test(env: TestEnv) {
346
353
}
347
354
sleep_secs ( 10 ) ;
348
355
}
349
- assert ! ( hash_mismatch) ;
350
- info ! ( log, "There was a divergence of the state" ) ;
351
356
352
357
info ! ( log, "Kill child process" ) ;
353
358
child. kill ( ) . expect ( "Error killing backup process" ) ;
359
+
360
+ assert ! ( hash_mismatch) ;
361
+ info ! ( log, "There was a divergence of the state" ) ;
354
362
}
355
363
356
364
fn some_checkpoint_dir ( backup_dir : & Path , subnet_id : & SubnetId ) -> Option < PathBuf > {
0 commit comments