mirror of
https://github.com/kemko/nomad.git
synced 2026-01-07 02:45:42 +03:00
tests: avoid assertion in goroutine
This commit is contained in:
@@ -410,16 +410,15 @@ func TestRktDriver_StartWaitRecoverWaitStop(t *testing.T) {
|
||||
ch, err = harness.WaitTask(context.Background(), task.ID)
|
||||
require.NoError(err)
|
||||
|
||||
go func() {
|
||||
time.Sleep(300 * time.Millisecond)
|
||||
require.NoError(d.StopTask(task.ID, 0, "SIGKILL"))
|
||||
}()
|
||||
require.NoError(d.StopTask(task.ID, 0, "SIGKILL"))
|
||||
|
||||
select {
|
||||
case result := <-ch:
|
||||
require.NoError(result.Err)
|
||||
require.NotZero(result.ExitCode)
|
||||
|
||||
// when killing a task, signal might not propagate
|
||||
// when executor proc.Wait() call gets "wait: no child processes" error
|
||||
//require.Equal(9, result.Signal)
|
||||
case <-time.After(time.Duration(testutil.TestMultiplier()*5) * time.Second):
|
||||
require.Fail("WaitTask timeout")
|
||||
|
||||
Reference in New Issue
Block a user