Skip to content

Commit

Permalink
fix test
Browse files Browse the repository at this point in the history
Signed-off-by: Little-Wallace <[email protected]>
  • Loading branch information
Little-Wallace committed May 23, 2024
1 parent 2af72b6 commit 0c25eb2
Showing 1 changed file with 5 additions and 7 deletions.
12 changes: 5 additions & 7 deletions src/storage/hummock_test/src/hummock_read_version_tests.rs
Original file line number Diff line number Diff line change
Expand Up @@ -130,14 +130,14 @@ async fn test_read_version_basic() {
assert_eq!(6, staging.data.len());
let batch_id_vec_for_clear = staging
.data
.iter()
.values()
.flat_map(|data| data.to_imm().map(|imm| imm.batch_id()))
.take(3)
.collect::<Vec<_>>();

let epoch_id_vec_for_clear = staging
.data
.iter()
.values()
.flat_map(|data| data.to_imm())
.map(|imm| imm.min_epoch())
.take(3)
Expand Down Expand Up @@ -197,12 +197,10 @@ async fn test_read_version_basic() {
// staging => {imm(3, 4, 5), sst[{sst_object_id: 1}, {sst_object_id: 2}]}
let staging = read_version.staging();
assert_eq!(4, read_version.staging().data.len());
let remain_batch_id_vec = staging
.data
let remain_batch_id_vec = staging.data.iter().collect::<Vec<_>>();
assert!(remain_batch_id_vec
.iter()
.flat_map(|data| data.to_imm().map(|imm| imm.batch_id()))
.collect::<Vec<_>>();
assert!(remain_batch_id_vec.iter().any(|batch_id| *batch_id > 2));
.any(|&(batch_id, _)| *batch_id > 2));
}

{
Expand Down

0 comments on commit 0c25eb2

Please sign in to comment.