Skip to content

Commit 90a54dd

Browse files
committed
document that fuss tests are flaky, and how to report.
1 parent d08fd37 commit 90a54dd

File tree

1 file changed

+10
-0
lines changed

1 file changed

+10
-0
lines changed

tests/testsuite/resolve.rs

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,13 @@ use proptest::collection::vec;
1616
use proptest::prelude::*;
1717

1818
proptest! {
19+
/// NOTE: proptest is a form of fuzz testing. It generates random input and makes shore that
20+
/// certain universal truths are upheld. Therefore, it can pass when there is a problem,
21+
/// but if it fails then there really is something wrong. When testing something as
22+
/// complicated as the resolver, the problems can be very subtle and hard to generate.
23+
/// We have had a history of these tests only failing on PRs long after a bug is introduced.
24+
/// If you have one of these test fail please report it on #6258,
25+
/// and if you did not change the resolver then feel free to retry without concern.
1926
#![proptest_config(ProptestConfig {
2027
// Note that this is a little low in terms of cases we'd like to test,
2128
// but this number affects how long this function takes. It can be
@@ -34,6 +41,7 @@ proptest! {
3441
.. ProptestConfig::default()
3542
})]
3643

44+
/// NOTE: if you think this test has failed spuriously see the note at the top of this macro.
3745
#[test]
3846
fn passes_validation(
3947
PrettyPrintRegistry(input) in registry_strategy(50, 20, 60)
@@ -51,6 +59,7 @@ proptest! {
5159
}
5260
}
5361

62+
/// NOTE: if you think this test has failed spuriously see the note at the top of this macro.
5463
#[test]
5564
fn minimum_version_errors_the_same(
5665
PrettyPrintRegistry(input) in registry_strategy(50, 20, 60)
@@ -100,6 +109,7 @@ proptest! {
100109
}
101110
}
102111

112+
/// NOTE: if you think this test has failed spuriously see the note at the top of this macro.
103113
#[test]
104114
fn limited_independence_of_irrelevant_alternatives(
105115
PrettyPrintRegistry(input) in registry_strategy(50, 20, 60),

0 commit comments

Comments
 (0)