From 1e72a2ffb82f14f6c4eb958daea386e08e775c72 Mon Sep 17 00:00:00 2001 From: Janos Guljas Date: Wed, 20 Feb 2019 16:54:16 +0100 Subject: [PATCH] cmd/swarm/global-store: terminate subprocess with Kill in tests --- cmd/swarm/global-store/explorer_test.go | 4 ++-- cmd/swarm/global-store/global_store_test.go | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/cmd/swarm/global-store/explorer_test.go b/cmd/swarm/global-store/explorer_test.go index c19e8e075e..2e4928c8fc 100644 --- a/cmd/swarm/global-store/explorer_test.go +++ b/cmd/swarm/global-store/explorer_test.go @@ -35,7 +35,7 @@ func TestExplorer(t *testing.T) { addr := findFreeTCPAddress(t) explorerAddr := findFreeTCPAddress(t) testCmd := runGlobalStore(t, "ws", "--addr", addr, "--explorer-address", explorerAddr) - defer testCmd.Interrupt() + defer testCmd.Kill() client := websocketClient(t, addr) @@ -137,7 +137,7 @@ func TestExplorer_CORSOrigin(t *testing.T) { "--explorer-address", explorerAddr, "--explorer-cors-origin", origin, ) - defer testCmd.Interrupt() + defer testCmd.Kill() // wait until the server is started waitHTTPEndpoint(t, explorerAddr) diff --git a/cmd/swarm/global-store/global_store_test.go b/cmd/swarm/global-store/global_store_test.go index e73cf6d7a3..c437c9d453 100644 --- a/cmd/swarm/global-store/global_store_test.go +++ b/cmd/swarm/global-store/global_store_test.go @@ -60,7 +60,7 @@ func TestHTTP_Database(t *testing.T) { func testHTTP(t *testing.T, put bool, args ...string) { addr := findFreeTCPAddress(t) testCmd := runGlobalStore(t, append([]string{"http", "--addr", addr}, args...)...) - defer testCmd.Interrupt() + defer testCmd.Kill() client, err := rpc.DialHTTP("http://" + addr) if err != nil { @@ -126,7 +126,7 @@ func TestWebsocket_Database(t *testing.T) { func testWebsocket(t *testing.T, put bool, args ...string) { addr := findFreeTCPAddress(t) testCmd := runGlobalStore(t, append([]string{"ws", "--addr", addr}, args...)...) - defer testCmd.Interrupt() + defer testCmd.Kill() client := websocketClient(t, addr)