Skip to content

Commit

Permalink
fixup: tolerate time diff in timeout test
Browse files Browse the repository at this point in the history
  • Loading branch information
drmingdrmer committed Mar 5, 2024
1 parent bbeabf1 commit ffb278c
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion src/meta/kvapi/src/kvapi/test_suite.rs
Original file line number Diff line number Diff line change
Expand Up @@ -305,7 +305,9 @@ impl kvapi::TestSuite {
assert_eq!(v2.seq, 3);
assert_eq!(v2.data, b("v2"));
let v2_meta = v2.meta.unwrap();
assert_eq!(v2_meta.get_expire_at_ms().unwrap() / 1000, now_sec + 10);
let expire_at_sec = v2_meta.get_expire_at_ms().unwrap() / 1000;
let want = now_sec + 10;
assert!((want..want + 2).contains(&expire_at_sec));
}
}

Expand Down

0 comments on commit ffb278c

Please sign in to comment.