Skip to content

Commit

Permalink
chore(jans-cedarling): fix test case, rename key kkk to key to av…
Browse files Browse the repository at this point in the history
…oid misinterpreted

Signed-off-by: Oleh Bohzok <[email protected]>
Signed-off-by: Oleh Bohzok <[email protected]>
Signed-off-by: Oleh Bohzok <[email protected]>
Signed-off-by: Oleh Bohzok <[email protected]>
  • Loading branch information
olehbozhok committed Jan 9, 2025
1 parent 010a8fd commit 814e745
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions jans-cedarling/sparkv/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -234,14 +234,14 @@ mod tests {
fn test_get_item_return_none_if_expired() {
let mut sparkv = SparKV::new();
_ = sparkv.set_with_ttl(
"kkk",
"key",
"value",
Duration::new(0, 10000).expect("a valid duration"),
);
assert_eq!(sparkv.get("kkk"), Some(String::from("value")));
assert_eq!(sparkv.get("key"), Some(String::from("value")));

std::thread::sleep(std::time::Duration::from_nanos(30000));
assert_eq!(sparkv.get("kkk"), None);
assert_eq!(sparkv.get("key"), None);
}

#[test]
Expand Down

0 comments on commit 814e745

Please sign in to comment.