@cryptotaxi247 / kubo / commits / 56bf782cc

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.

Andrew Gillis committed Jan 13, 2026 at 02:38 UTC 56bf782cc64d7b7d4b1abc500ea71ecceedbca70
1 file changed +3 -1
test/cli/ipfswatch_test.go
+3 -1
@@ -86,7 +86,9 @@ func TestIPFSWatch(t *testing.T) {
86
87 // Kill ipfswatch to release the repo lock
88 if result.Cmd.Process != nil {
89 - _ = result.Cmd.Process.Kill()
89 + if err = result.Cmd.Process.Signal(os.Interrupt); err != nil {
90 + _ = result.Cmd.Process.Kill()
91 + }
92 _, _ = result.Cmd.Process.Wait()
93 }
94