Skip to content

Commit 9b1ff6f

Browse files
committed
and maybe do it gracefully
1 parent 7ff28ae commit 9b1ff6f

File tree

1 file changed

+5
-2
lines changed

1 file changed

+5
-2
lines changed

cmd/dbos/cli_integration_test.go

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -104,8 +104,11 @@ func TestCLIWorkflow(t *testing.T) {
104104
fmt.Println(cmd.Stderr)
105105
fmt.Println(cmd.Stdout)
106106
*/
107-
cmd.Process.Signal(os.Interrupt)
108-
cmd.Process.Kill()
107+
err := cmd.Process.Signal(os.Interrupt)
108+
require.NoError(t, err, "Failed to send interrupt signal to application process")
109+
time.Sleep(1 * time.Second) // Give it a moment to shut down gracefully
110+
err = cmd.Process.Kill()
111+
require.NoError(t, err, "Failed to kill application process")
109112
}
110113
})
111114
})

0 commit comments

Comments
 (0)