From 348b199068c8ffe4a8f62eab0e85d90528ea5415 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Fran=C3=A7ois=20Garillot?= Date: Tue, 28 Jun 2022 14:28:21 -0400 Subject: [PATCH] fix: relax bound checked in probabilistic check Fixes #375 --- narwhal/dag/src/node_dag.rs | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/narwhal/dag/src/node_dag.rs b/narwhal/dag/src/node_dag.rs index 5b07cf2c565a4..76b31adb9d6a0 100644 --- a/narwhal/dag/src/node_dag.rs +++ b/narwhal/dag/src/node_dag.rs @@ -385,11 +385,14 @@ mod tests { } #[test] - //#[ignore = "Issue #375"] fn test_dag_sanity_check( dag in arb_dag_complete(10, 10) ) { - assert!(dag.len() <= 100); + // the `prop_recursive` combinator used in `arb_dag_complete` is actually probabilistic, see: + // https://github.com/AltSysrq/proptest/blob/master/proptest/src/strategy/recursive.rs#L83-L110 + // so we can't test for our desired size here (100), we rather test for something that will pass + // with overwhelming probability + assert!(dag.len() <= 200); } #[test]