diff --git a/zebra-chain/src/block/tests.rs b/zebra-chain/src/block/tests.rs index eb6fd931..df708aee 100644 --- a/zebra-chain/src/block/tests.rs +++ b/zebra-chain/src/block/tests.rs @@ -15,6 +15,7 @@ use proptest::{ prelude::*, test_runner::Config, }; +use std::env; use std::io::{Cursor, ErrorKind, Write}; impl Arbitrary for BlockHeader { @@ -214,8 +215,12 @@ proptest! { } proptest! { - // The block roundtrip test can be really slow - #![proptest_config(Config::with_cases(16))] + // The block roundtrip test can be really slow, so we use fewer cases by + // default. Set the PROPTEST_CASES env var to override this default. + #![proptest_config(Config::with_cases(env::var("PROPTEST_CASES") + .ok() + .and_then(|v| v.parse().ok()) + .unwrap_or(16)))] #[test] fn block_roundtrip(block in any::()) {