mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2024-11-09 18:16:09 +03:00
LibTest: Bump up MAX_GEN_ATTEMPTS_PER_VALUE to 30
The original value 15 was too little: it made our `weighted_boolean_fair_false` test fail every now and then. This is because a fair coin (P(false) = 0.5) will hit the same value 15 times in a row with a probability (1/2)^15: around once in a 32k tries. With the bumped up value, this is now once in 1 billion tries. Should lower the test flakiness enough (if our random number generator is truly uniform), while 30 tries is still an OK amount of computation for randomized tests to do, compared to 15.
This commit is contained in:
parent
7e3cfaf08c
commit
49dbc4b5a5
Notes:
sideshowbarker
2024-07-17 23:07:41 +09:00
Author: https://github.com/Janiczek 🔰 Commit: https://github.com/SerenityOS/serenity/commit/49dbc4b5a5 Pull-request: https://github.com/SerenityOS/serenity/pull/21816
@ -46,7 +46,7 @@ public:
|
||||
{
|
||||
using namespace Randomized;
|
||||
|
||||
constexpr u8 MAX_GEN_ATTEMPTS_PER_VALUE = 15;
|
||||
constexpr u8 MAX_GEN_ATTEMPTS_PER_VALUE = 30;
|
||||
|
||||
TestFunction test_case_function = [test_function = move(test_function)]() {
|
||||
u64 max_randomized_runs = randomized_runs();
|
||||
|
Loading…
Reference in New Issue
Block a user