Skip to content

Commit

Permalink
util: Reduce number of proptest cases
Browse files Browse the repository at this point in the history
This commit reduces the number of cases run in our readyset_util::fmt
proptests from 1,000,000 to 10,000. The higher number of cases was
substantially increasing the time the tests were taking to run in CI,
and 10,000 should still give us good coverage.

Change-Id: Ia457920d4187da0fe0fe9a38cb3f647c3bd86576
  • Loading branch information
ethowitz committed Apr 18, 2024
1 parent c89c902 commit 28aac8f
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions readyset-util/src/fmt/datetime.rs
Original file line number Diff line number Diff line change
Expand Up @@ -470,7 +470,7 @@ mod tests {
fn test_write_date() {
let client = RefCell::new(config().connect(NoTls).unwrap());

proptest!(ProptestConfig::with_cases(1000000), |(date in arbitrary_naive_date())| {
proptest!(ProptestConfig::with_cases(10_000), |(date in arbitrary_naive_date())| {
compare_date_format(date, &mut client.borrow_mut());
})
}
Expand All @@ -479,7 +479,7 @@ mod tests {
fn test_write_time() {
let client = RefCell::new(config().connect(NoTls).unwrap());

proptest!(ProptestConfig::with_cases(1000000), |(time in arbitrary_naive_time())| {
proptest!(ProptestConfig::with_cases(10_000), |(time in arbitrary_naive_time())| {
compare_time_format(time, &mut client.borrow_mut());
})
}
Expand All @@ -497,7 +497,7 @@ mod tests {
fn test_write_timestamp() {
let client = RefCell::new(config().connect(NoTls).unwrap());

proptest!(ProptestConfig::with_cases(1000000), |(ts in arbitrary_naive_date_time())| {
proptest!(ProptestConfig::with_cases(10_000), |(ts in arbitrary_naive_date_time())| {
compare_timestamp_format(ts, &mut client.borrow_mut());
})
}
Expand Down Expand Up @@ -674,7 +674,7 @@ mod tests {

let client = RefCell::new(config().connect(NoTls).unwrap());

proptest!(ProptestConfig::with_cases(1000000), |((ts, tz) in arbitrary_naive_date_time_and_timezone())| {
proptest!(ProptestConfig::with_cases(10_000), |((ts, tz) in arbitrary_naive_date_time_and_timezone())| {
compare_timestamptz_format(ts, tz, &mut client.borrow_mut());
})
}
Expand Down

0 comments on commit 28aac8f

Please sign in to comment.