diff options
| author | Paul Buetow <paul@buetow.org> | 2026-02-23 17:27:08 +0200 |
|---|---|---|
| committer | Paul Buetow <paul@buetow.org> | 2026-02-23 17:27:08 +0200 |
| commit | aa19be8c624a6adc3ecbf11a6ee0506a5c7d34fe (patch) | |
| tree | 6abf6475155980c4c663d04c24ac8f15ca51a166 /integrationtests/harness.go | |
| parent | 80d68b05199d288df8ccd7a073ac32ebfc90be62 (diff) | |
Run integration tests in parallel by default and stabilize flaky scenarios
Diffstat (limited to 'integrationtests/harness.go')
| -rw-r--r-- | integrationtests/harness.go | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/integrationtests/harness.go b/integrationtests/harness.go index a130c85..a8a73d0 100644 --- a/integrationtests/harness.go +++ b/integrationtests/harness.go @@ -146,8 +146,10 @@ func waitBoth(workloadCmd, iorCmd *exec.Cmd, duration int, grace time.Duration) workloadDone := make(chan error, 1) iorDone := make(chan error, 1) - go func() { workloadDone <- workloadCmd.Wait() }() - go func() { iorDone <- iorCmd.Wait() }() + // Pass channels as parameters so subsequent nil assignments in this + // function do not affect the goroutines' send targets. + go func(ch chan error) { ch <- workloadCmd.Wait() }(workloadDone) + go func(ch chan error) { ch <- iorCmd.Wait() }(iorDone) timeout := time.After(time.Duration(duration)*time.Second + grace) |
