Skip to content

Commit

Permalink
fix flaky test
Browse files Browse the repository at this point in the history
  • Loading branch information
mikkeldenker committed Dec 11, 2024
1 parent 0912e15 commit ecb495a
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions crates/core/src/warc.rs
Original file line number Diff line number Diff line change
Expand Up @@ -265,6 +265,8 @@ impl Arbitrary for Request {
fn arbitrary_with(_args: ()) -> Self::Strategy {
(".+", any::<u64>())
.prop_map(|(url, timestamp)| {
let timestamp = timestamp % 1_733_000_000;

let date = match chrono::TimeZone::timestamp_opt(&chrono::Utc, timestamp as i64, 0)
{
chrono::LocalResult::Single(date) => Some(date),
Expand Down

0 comments on commit ecb495a

Please sign in to comment.