fix: Allow PROPTEST_CASES to override the lower block case default
This commit is contained in:
parent
82da4a5326
commit
d49c11ee70
|
|
@ -15,6 +15,7 @@ use proptest::{
|
||||||
prelude::*,
|
prelude::*,
|
||||||
test_runner::Config,
|
test_runner::Config,
|
||||||
};
|
};
|
||||||
|
use std::env;
|
||||||
use std::io::{Cursor, ErrorKind, Write};
|
use std::io::{Cursor, ErrorKind, Write};
|
||||||
|
|
||||||
impl Arbitrary for BlockHeader {
|
impl Arbitrary for BlockHeader {
|
||||||
|
|
@ -214,8 +215,12 @@ proptest! {
|
||||||
}
|
}
|
||||||
|
|
||||||
proptest! {
|
proptest! {
|
||||||
// The block roundtrip test can be really slow
|
// The block roundtrip test can be really slow, so we use fewer cases by
|
||||||
#![proptest_config(Config::with_cases(16))]
|
// 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]
|
#[test]
|
||||||
fn block_roundtrip(block in any::<Block>()) {
|
fn block_roundtrip(block in any::<Block>()) {
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue