Continue reducing the test flakiness. Limit the container size, otherwise mutation can time out due to mutating a batch of large inputs. PiperOrigin-RevId: 756881055
diff --git a/e2e_tests/corpus_database_test.cc b/e2e_tests/corpus_database_test.cc index ff470e2..b9136d1 100644 --- a/e2e_tests/corpus_database_test.cc +++ b/e2e_tests/corpus_database_test.cc
@@ -351,7 +351,7 @@ run_options.fuzztest_flags = {{"corpus_database", GetCorpusDatabasePath()}, {"fuzz_for", "20s"}}; run_options.env = {{"TEST_TIMEOUT", "30"}}; - run_options.timeout = absl::Seconds(40); + run_options.timeout = absl::Seconds(60); auto [status, std_out, std_err] = RunBinaryMaybeWithCentipede( GetCorpusDatabaseTestingBinaryPath(), run_options); EXPECT_THAT(std_err, AllOf(HasSubstr("Fuzzing FuzzTest.FailsInTwoWays"),
diff --git a/e2e_tests/testdata/fuzz_tests_for_corpus_database_testing.cc b/e2e_tests/testdata/fuzz_tests_for_corpus_database_testing.cc index 54b7d4a..8a4bdcc 100644 --- a/e2e_tests/testdata/fuzz_tests_for_corpus_database_testing.cc +++ b/e2e_tests/testdata/fuzz_tests_for_corpus_database_testing.cc
@@ -25,7 +25,6 @@ // 1. It fails with an assertion failure, e.g., when `v == {100}`. // 2. It fails with a heap buffer overflow, e.g., when `v == {101}`. void FailsInTwoWays(const std::vector<int>& v) { - if (v.size() % 7 != 1) return; // Compare A - B and 0 instead of A and B to not rely on auto-dictionary for // flipping the branches. Otherwise due to the current auto-dictionary // implementation sometimes the branches are not flipped evenly, causing test @@ -37,7 +36,9 @@ .WithDomains( // Use a range that begins/ends with multiples of 3 to avoid unwanted // bias. - fuzztest::ContainerOf<std::vector<int>>(fuzztest::InRange(99, 255))); + fuzztest::ContainerOf<std::vector<int>>(fuzztest::InRange(99, 255)) + // Limit the size to avoid batch timeouts in the e2e test setting. + .WithSize(1)); int ReachStackOverflow(int n) { // Use volatile to prevent the compiler from inlining the recursion.