From 35090ec339d8d8f5606f5f955e20304b7308991a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Gianguido=20Sor=C3=A0?= Date: Thu, 7 Mar 2024 12:28:45 +0100 Subject: [PATCH] testutil/compose: custom timeout for fuzzer (#2952) Add `fuzz-timeout` CLI parameter for `TestFuzzer` test, that replaces the 20 minutes constant fuzz duration. Defaults to 20 minutes. category: feature ticket: none --- testutil/compose/fuzz/fuzz_test.go | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/testutil/compose/fuzz/fuzz_test.go b/testutil/compose/fuzz/fuzz_test.go index 838fde959..0b54f32cf 100644 --- a/testutil/compose/fuzz/fuzz_test.go +++ b/testutil/compose/fuzz/fuzz_test.go @@ -21,6 +21,7 @@ var ( fuzzer = flag.Bool("fuzzer", false, "Enables docker based fuzz tests") sudoPerms = flag.Bool("sudo-perms", false, "Enables changing all compose artefacts file permissions using sudo.") logDir = flag.String("log-dir", "", "Specifies the directory to store test docker-compose logs. Empty defaults to stdout.") + timeout = flag.Duration("fuzz-timeout", time.Minute*20, "Timeout after which, if there were no failures, the fuzzing will stop.") ) func TestFuzzers(t *testing.T) { @@ -46,7 +47,7 @@ func TestFuzzers(t *testing.T) { return config }, - timeout: time.Minute * 20, + timeout: *timeout, }, { name: "p2p_fuzz_tests", @@ -55,7 +56,7 @@ func TestFuzzers(t *testing.T) { return config }, - timeout: time.Minute * 20, + timeout: *timeout, }, }