diff --git a/pkg/runner/local_docker.go b/pkg/runner/local_docker.go index 21787e68e..35807b9d3 100644 --- a/pkg/runner/local_docker.go +++ b/pkg/runner/local_docker.go @@ -71,6 +71,9 @@ type LocalDockerRunnerConfig struct { Ulimits []string `toml:"ulimits"` ExposedPorts ExposedPorts `toml:"exposed_ports"` + // Collection timeout is the time we wait for the sync service to send us the test outcomes after + // all instances have finished. + OutcomesCollectionTimeout time.Duration `toml:"outcomes_collection_timeout"` } type testContainerInstance struct { @@ -82,10 +85,11 @@ type testContainerInstance struct { // defaultConfig is the default configuration. Incoming configurations will be // merged with this object. var defaultConfig = LocalDockerRunnerConfig{ - KeepContainers: false, - Unstarted: false, - Background: false, - Ulimits: []string{"nofile=1048576:1048576"}, + KeepContainers: false, + Unstarted: false, + Background: false, + Ulimits: []string{"nofile=1048576:1048576"}, + OutcomesCollectionTimeout: time.Second * 30, } // LocalDockerRunner is a runner that manually stands up as many docker @@ -639,7 +643,7 @@ func (r *LocalDockerRunner) Run(ctx context.Context, input *api.RunInput, ow *rp }() startOutcomesCollectTimeout := func() { - time.Sleep(30 * time.Second) + time.Sleep(cfg.OutcomesCollectionTimeout) outcomesCollectTimeout <- true }