Skip to content

Commit

Permalink
testutil/compose: custom timeout for fuzzer (#2952)
Browse files Browse the repository at this point in the history
Add `fuzz-timeout` CLI parameter for `TestFuzzer` test, that replaces the 20 minutes constant fuzz duration.

Defaults to 20 minutes.

category: feature
ticket: none
  • Loading branch information
gsora authored Mar 7, 2024
1 parent 52aa93e commit 35090ec
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions testutil/compose/fuzz/fuzz_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -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) {
Expand All @@ -46,7 +47,7 @@ func TestFuzzers(t *testing.T) {

return config
},
timeout: time.Minute * 20,
timeout: *timeout,
},
{
name: "p2p_fuzz_tests",
Expand All @@ -55,7 +56,7 @@ func TestFuzzers(t *testing.T) {

return config
},
timeout: time.Minute * 20,
timeout: *timeout,
},
}

Expand Down

0 comments on commit 35090ec

Please sign in to comment.