Skip to content

Commit

Permalink
update tests
Browse files Browse the repository at this point in the history
  • Loading branch information
giangndm committed Dec 13, 2024
1 parent a1170b6 commit 5d5f61c
Showing 1 changed file with 11 additions and 0 deletions.
11 changes: 11 additions & 0 deletions src/service/replicate_kv_service/remote_storage.rs
Original file line number Diff line number Diff line change
Expand Up @@ -422,6 +422,17 @@ mod tests {
assert_eq!(ctx.outs.pop_front(), Some(Event::KvEvent(KvEvent::Set(Some(1), 1, 2))));
assert_eq!(ctx.outs.pop_front(), Some(Event::KvEvent(KvEvent::Set(Some(1), 1, 1))));
assert_eq!(ctx.outs.pop_front(), None);

// after received FetchChanged, it should be rejected
state.on_rpc_res(
&mut ctx,
RpcRes::FetchChanged(Ok(vec![Changed {
key: 1,
version: Version(1),
action: Action::Set(2),
}])),
);
assert_eq!(ctx.outs.pop_front(), None);
}

/// After missing changed we got FetchChanged response
Expand Down

0 comments on commit 5d5f61c

Please sign in to comment.