Skip to content

Commit

Permalink
Fix wrong set max value in RandomDuration
Browse files Browse the repository at this point in the history
  • Loading branch information
mkutz committed Aug 19, 2024
1 parent bd2bcdf commit 51f328d
Showing 1 changed file with 2 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -20,10 +20,10 @@ public static Duration aDurationBetween(Duration minInclusive, Duration maxInclu
}

/**
* @return a {@link Duration} between {@link Duration#ZERO} and {@link Long#MAX_VALUE} seconds
* @return a {@link Duration} between {@link Duration#ZERO} and {@link Long#MAX_VALUE} - 1 seconds
*/
public static RandomDurationBuilder aDuration() {
return new RandomDurationBuilder(Duration.ZERO, Duration.ofSeconds(Long.MAX_VALUE));
return new RandomDurationBuilder(Duration.ZERO, Duration.ofSeconds(Long.MAX_VALUE - 1));
}

/** Builds a random {@link Duration} within a specified range. */
Expand Down

0 comments on commit 51f328d

Please sign in to comment.