From ba373fee2aa4be5b09aa3bc3c1440aad9ab1346b Mon Sep 17 00:00:00 2001 From: Mahmood Ali Date: Thu, 25 Apr 2019 17:16:29 -0400 Subject: [PATCH] try sleeping for stop signal to take effect --- client/allocrunner/taskrunner/logmon_hook_unix_test.go | 2 ++ 1 file changed, 2 insertions(+) diff --git a/client/allocrunner/taskrunner/logmon_hook_unix_test.go b/client/allocrunner/taskrunner/logmon_hook_unix_test.go index 1d9e66c16..890b67501 100644 --- a/client/allocrunner/taskrunner/logmon_hook_unix_test.go +++ b/client/allocrunner/taskrunner/logmon_hook_unix_test.go @@ -135,6 +135,8 @@ func TestTaskRunner_LogmonHook_ShutdownMidStart(t *testing.T) { // exited; so this causes process to be non-exited at beginning of call // then we kill process while Start call is running require.NoError(t, proc.Signal(syscall.SIGSTOP)) + // sleep for the signal to take effect + time.Sleep(1 * time.Second) go func() { time.Sleep(2 * time.Second)