File tree Expand file tree Collapse file tree 1 file changed +10
-7
lines changed Expand file tree Collapse file tree 1 file changed +10
-7
lines changed Original file line number Diff line number Diff line change @@ -299,13 +299,16 @@ mod tests {
299
299
immutable_file_number : 4831 ,
300
300
..Beacon :: default ( )
301
301
} ;
302
- let cardano_transaction_parser =
303
- CardanoTransactionParser :: new ( create_file_logger ( & filepath) , true ) ;
304
-
305
- cardano_transaction_parser
306
- . parse ( db_path, & beacon)
307
- . await
308
- . unwrap ( ) ;
302
+ // We create a block to drop the logger and force a flush before we read the log file.
303
+ {
304
+ let cardano_transaction_parser =
305
+ CardanoTransactionParser :: new ( create_file_logger ( & filepath) , true ) ;
306
+
307
+ cardano_transaction_parser
308
+ . parse ( db_path, & beacon)
309
+ . await
310
+ . unwrap ( ) ;
311
+ }
309
312
310
313
let log_file = std:: fs:: read_to_string ( & filepath) . unwrap ( ) ;
311
314
assert ! ( log_file. contains( "The cbor encoded block could not be parsed" ) ) ;
You can’t perform that action at this time.
0 commit comments