Skip to content

Commit

Permalink
* Improve comments in the test.
Browse files Browse the repository at this point in the history
  • Loading branch information
yhchiang-sol committed Jan 8, 2024
1 parent ddd34bc commit 5c0a0a8
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion accounts-db/src/tiered_storage/hot.rs
Original file line number Diff line number Diff line change
Expand Up @@ -1058,13 +1058,15 @@ pub mod tests {

#[test]
fn test_hot_storage_writer_twice_on_same_path() {
// Generate a new temp path that is guaranteed to NOT already have a file.
let temp_dir = TempDir::new().unwrap();
let path = temp_dir
.path()
.join("test_hot_storage_writer_twice_on_same_path");

// Expect the first returns Ok
assert_matches!(HotStorageWriter::new(&path), Ok(_));
// Expect the second call on the same path returns Err, as the
// HotStorageWriter only writes once.
assert_matches!(HotStorageWriter::new(&path), Err(_));
}
}

0 comments on commit 5c0a0a8

Please sign in to comment.