Skip to content

Commit

Permalink
Merge pull request #952 from pfwang80s/main
Browse files Browse the repository at this point in the history
Chore: make case append_to_log more rigorous
  • Loading branch information
drmingdrmer authored Nov 26, 2023
2 parents f5d7e54 + 97d8c21 commit 9c04cb0
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions openraft/src/testing/suite.rs
Original file line number Diff line number Diff line change
Expand Up @@ -936,13 +936,13 @@ where

store.purge(log_id_0(0, 0)).await?;

append(&mut store, [blank_ent_0::<C>(2, 10)]).await?;
append(&mut store, [blank_ent_0::<C>(2, 11)]).await?;

let l = store.try_get_log_entries(0..).await?.len();
let last = store.try_get_log_entries(0..).await?.into_iter().last().unwrap();

assert_eq!(l, 10, "expected 10 entries to exist in the log");
assert_eq!(*last.get_log_id(), log_id_0(2, 10), "unexpected log id");
assert_eq!(l, 11, "expected 11 entries to exist in the log");
assert_eq!(*last.get_log_id(), log_id_0(2, 11), "unexpected log id");
Ok(())
}

Expand Down

0 comments on commit 9c04cb0

Please sign in to comment.