Skip to content

Commit

Permalink
Adjust write header fail expectation, from panic to error
Browse files Browse the repository at this point in the history
Signed-off-by: v01dstar <[email protected]>
  • Loading branch information
v01dstar committed Nov 9, 2023
1 parent c606f51 commit 61fbdb6
Showing 1 changed file with 3 additions and 4 deletions.
7 changes: 3 additions & 4 deletions tests/failpoints/test_io_error.rs
Original file line number Diff line number Diff line change
Expand Up @@ -174,10 +174,9 @@ fn test_file_rotate_error() {
{
// Fail to write header of new log file.
let _f = FailGuard::new("log_file::write::err", "1*off->return");
assert!(catch_unwind_silent(|| {
let _ = engine.write(&mut generate_batch(1, 4, 5, Some(&entry)), false);
})
.is_err());
assert!(engine
.write(&mut generate_batch(1, 4, 5, Some(&entry)), false)
.is_err());
assert_eq!(engine.file_span(LogQueue::Append).1, 1);
}
{
Expand Down

0 comments on commit 61fbdb6

Please sign in to comment.