Skip to content

Commit 221908d

Browse files
committed
document that meta_fuss tests are flaky, and to ignore.
1 parent 90a54dd commit 221908d

File tree

1 file changed

+12
-4
lines changed

1 file changed

+12
-4
lines changed

tests/testsuite/support/resolver.rs

Lines changed: 12 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -460,12 +460,16 @@ pub fn registry_strategy(
460460

461461
/// This test is to test the generator to ensure
462462
/// that it makes registries with large dependency trees
463+
///
464+
/// This is a form of randomized testing, if you are unlucky it can fail.
465+
/// A failure on it's own is not a big dael. If you did not change the
466+
/// `registry_strategy` then feel free to retry without concern.
463467
#[test]
464468
fn meta_test_deep_trees_from_strategy() {
465469
let mut dis = [0; 21];
466470

467471
let strategy = registry_strategy(50, 20, 60);
468-
for _ in 0..64 {
472+
for _ in 0..128 {
469473
let PrettyPrintRegistry(input) = strategy
470474
.new_tree(&mut TestRunner::default())
471475
.unwrap()
@@ -488,19 +492,23 @@ fn meta_test_deep_trees_from_strategy() {
488492
}
489493

490494
panic!(
491-
"In 640 tries we did not see a wide enough distribution of dependency trees! dis: {:?}",
495+
"In 1280 tries we did not see a wide enough distribution of dependency trees! dis: {:?}",
492496
dis
493497
);
494498
}
495499

496500
/// This test is to test the generator to ensure
497501
/// that it makes registries that include multiple versions of the same library
502+
///
503+
/// This is a form of randomized testing, if you are unlucky it can fail.
504+
/// A failure on its own is not a big deal. If you did not change the
505+
/// `registry_strategy` then feel free to retry without concern.
498506
#[test]
499507
fn meta_test_multiple_versions_strategy() {
500508
let mut dis = [0; 10];
501509

502510
let strategy = registry_strategy(50, 20, 60);
503-
for _ in 0..64 {
511+
for _ in 0..128 {
504512
let PrettyPrintRegistry(input) = strategy
505513
.new_tree(&mut TestRunner::default())
506514
.unwrap()
@@ -524,7 +532,7 @@ fn meta_test_multiple_versions_strategy() {
524532
}
525533
}
526534
panic!(
527-
"In 640 tries we did not see a wide enough distribution of multiple versions of the same library! dis: {:?}",
535+
"In 1280 tries we did not see a wide enough distribution of multiple versions of the same library! dis: {:?}",
528536
dis
529537
);
530538
}

0 commit comments

Comments
 (0)