diff options
author | feistel <6742251-feistel@users.noreply.gitlab.com> | 2022-01-15 20:51:44 +0300 |
---|---|---|
committer | feistel <6742251-feistel@users.noreply.gitlab.com> | 2022-01-20 01:49:29 +0300 |
commit | b2b9c8d346f96257cd0fbc9577df1b9e81c28d21 (patch) | |
tree | 8f84102d4f965e3db4d3c79322f44d0443103757 /test/acceptance | |
parent | a7e130776d934a12ab000bee930c5c353b772635 (diff) |
feat: implement graceful shutdown
Changelog: added
Diffstat (limited to 'test/acceptance')
-rw-r--r-- | test/acceptance/helpers_test.go | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/test/acceptance/helpers_test.go b/test/acceptance/helpers_test.go index 5fae1349..d21df0a8 100644 --- a/test/acceptance/helpers_test.go +++ b/test/acceptance/helpers_test.go @@ -288,11 +288,12 @@ func runPagesProcess(t *testing.T, wait bool, pagesBinary string, listeners []Li cmd.Stdout = out cmd.Stderr = out require.NoError(t, cmd.Start()) + t.Logf("Running %s %v", pagesBinary, args) waitCh := make(chan struct{}) go func() { - cmd.Wait() + require.NoError(t, cmd.Wait()) for _, tempfile := range tempfiles { os.Remove(tempfile) } @@ -300,8 +301,7 @@ func runPagesProcess(t *testing.T, wait bool, pagesBinary string, listeners []Li }() cleanup := func() { - cmd.Process.Signal(os.Interrupt) - cmd.Process.Wait() + require.NoError(t, cmd.Process.Signal(os.Interrupt)) <-waitCh } |