Skip to content

Commit

Permalink
fix: fix compaction test in xline client
Browse files Browse the repository at this point in the history
Signed-off-by: bsbds <[email protected]>
  • Loading branch information
bsbds committed Aug 3, 2023
1 parent 7390aca commit 275471c
Showing 1 changed file with 3 additions and 6 deletions.
9 changes: 3 additions & 6 deletions xline-client/tests/kv.rs
Original file line number Diff line number Diff line change
Expand Up @@ -254,16 +254,13 @@ async fn compact_should_remove_previous_revision() -> Result<()> {
.await?;
assert_eq!(rev1_resp.kvs[0].value, b"1");

client.compact(CompactionRequest::new(4)).await?;
client.compact(CompactionRequest::new(3)).await?;

// after compacting
let rev0_resp = client
.range(RangeRequest::new("compact").with_revision(2))
.await?;
assert!(
rev0_resp.kvs.is_empty(),
"kvs should be empty after compaction"
);
.await;
assert!(rev0_resp.is_err(), "should be err after compaction");
let rev1_resp = client
.range(RangeRequest::new("compact").with_revision(3))
.await?;
Expand Down

0 comments on commit 275471c

Please sign in to comment.