From 56bf782cc64d7b7d4b1abc500ea71ecceedbca70 Mon Sep 17 00:00:00 2001 From: Andrew Gillis <11790789+gammazero@users.noreply.github.com> Date: Tue, 13 Jan 2026 02:38:44 -0800 Subject: [PATCH] test: fix flaky ipfswatch test (#11142) Gracefully shutdown the ipfs node to ensure data is saved. Forceful shutdown is done if there is an error sending the interrupt signal to the process, such as on Windows. --- test/cli/ipfswatch_test.go | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/test/cli/ipfswatch_test.go b/test/cli/ipfswatch_test.go index 07e73a7ec..cd6859176 100644 --- a/test/cli/ipfswatch_test.go +++ b/test/cli/ipfswatch_test.go @@ -86,7 +86,9 @@ func TestIPFSWatch(t *testing.T) { // Kill ipfswatch to release the repo lock if result.Cmd.Process != nil { - _ = result.Cmd.Process.Kill() + if err = result.Cmd.Process.Signal(os.Interrupt); err != nil { + _ = result.Cmd.Process.Kill() + } _, _ = result.Cmd.Process.Wait() }