X-Git-Url: https://git.arvados.org/arvados.git/blobdiff_plain/4c1281bba5d3e01d677165b6e2fa7d9209e233b5..090e546b14e13798d15ac61728da05a0d9fb1317:/services/crunch-dispatch-local/crunch-dispatch-local_test.go?ds=sidebyside diff --git a/services/crunch-dispatch-local/crunch-dispatch-local_test.go b/services/crunch-dispatch-local/crunch-dispatch-local_test.go index ef8cb836c9..3ec1e2ec6b 100644 --- a/services/crunch-dispatch-local/crunch-dispatch-local_test.go +++ b/services/crunch-dispatch-local/crunch-dispatch-local_test.go @@ -145,14 +145,14 @@ func testWithServerStub(c *C, apiStubResponses map[string]arvadostest.StubRespon log.SetOutput(tempfile) go func() { - time.Sleep(1 * time.Second) + time.Sleep(2 * time.Second) sigChan <- syscall.SIGTERM }() runQueuedContainers(1, 1, crunchCmd) - // Give some time for run goroutine to complete - time.Sleep(5 * time.Second) + // Wait for all running crunch jobs to complete / terminate + waitGroup.Wait() buf, _ := ioutil.ReadFile(tempfile.Name()) c.Check(strings.Contains(string(buf), expected), Equals, true)