Skip to content

Commit

Permalink
fixing unit test and rustfmt
Browse files Browse the repository at this point in the history
  • Loading branch information
fulmicoton committed Oct 21, 2024
1 parent bc2cc48 commit 54cbc70
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 4 deletions.
4 changes: 2 additions & 2 deletions chitchat/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -361,8 +361,8 @@ impl Chitchat {
/// Disclaimer:
/// The callback is required to be as light as possible.
/// In particular,
/// - it should not access the cluster state (as it is locked at the moment of the
/// execution of the callback.
/// - it should not access the cluster state (as it is locked at the moment of the execution of
/// the callback.
/// - it should be fast: the callback is executed in an async context.
///
/// The callback is called with a [`KeyChangeEvent`] that contains the key stripped of the
Expand Down
5 changes: 3 additions & 2 deletions chitchat/src/state.rs
Original file line number Diff line number Diff line change
Expand Up @@ -1213,7 +1213,7 @@ mod tests {
// GC if tombstone (=100) + grace_period > heartbeat (=110).
tokio::time::advance(Duration::from_secs(5)).await;
cluster_state.gc_keys_marked_for_deletion(Duration::from_secs(10));
assert!(cluster_state
assert!(!cluster_state
.node_state(&node1)
.unwrap()
.key_values
Expand Down Expand Up @@ -1441,7 +1441,8 @@ mod tests {
node1_state.set_with_version("key_b".to_string(), "2".to_string(), 2); // 2

let node2_state = cluster_state.node_state_mut(&node2);
node2_state.set_with_version("key_c".to_string(), "3".to_string(), 2); // 2
node2_state.set_with_version("key_c".to_string(), "3".to_string(), 2);
// 2
}

{
Expand Down

0 comments on commit 54cbc70

Please sign in to comment.