Skip to content

Commit

Permalink
fix(xline): commit revision change in tests
Browse files Browse the repository at this point in the history
Signed-off-by: bsbds <69835502+bsbds@users.noreply.github.com>
  • Loading branch information
bsbds committed Jun 16, 2024
1 parent c9d3ad8 commit 94e9256
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions crates/xline/src/storage/compact/revision_compactor.rs
Original file line number Diff line number Diff line change
Expand Up @@ -135,11 +135,14 @@ mod test {
// auto_compactor works successfully
assert_eq!(revision_compactor.do_compact(None).await, Some(10));
revision_gen_state.next(); // current revision: 111
revision_gen_state.commit();
assert_eq!(revision_compactor.do_compact(Some(10)).await, Some(11));
revision_compactor.pause();
revision_gen_state.next(); // current revision 112
revision_gen_state.commit();
assert!(revision_compactor.do_compact(Some(11)).await.is_none());
revision_gen_state.next(); // current revision 113
revision_gen_state.commit();
assert!(revision_compactor.do_compact(Some(11)).await.is_none());
revision_compactor.resume();
assert_eq!(revision_compactor.do_compact(Some(11)).await, Some(13));
Expand Down

0 comments on commit 94e9256

Please sign in to comment.