From 322bc827771c70c6f3559d502156daee58b14589 Mon Sep 17 00:00:00 2001 From: Jordan Liggitt Date: Fri, 20 Aug 2021 16:47:56 -0400 Subject: [PATCH] Fix buffered signal channel go vet error --- test/e2e_node/runner/remote/run_remote.go | 2 +- test/images/agnhost/nettest/nettest.go | 2 +- test/images/agnhost/pause/pause.go | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/test/e2e_node/runner/remote/run_remote.go b/test/e2e_node/runner/remote/run_remote.go index 6af4b9c23a7..d2699a97832 100644 --- a/test/e2e_node/runner/remote/run_remote.go +++ b/test/e2e_node/runner/remote/run_remote.go @@ -205,7 +205,7 @@ func main() { // process and all its children, we ignore it here, while our children ssh connections // are stopped. This allows us to gather artifacts and print out test state before // being killed. - c := make(chan os.Signal) + c := make(chan os.Signal, 2) signal.Notify(c, os.Interrupt) go func() { <-c diff --git a/test/images/agnhost/nettest/nettest.go b/test/images/agnhost/nettest/nettest.go index e971203d5d6..d28bbe46539 100644 --- a/test/images/agnhost/nettest/nettest.go +++ b/test/images/agnhost/nettest/nettest.go @@ -216,7 +216,7 @@ func main(cmd *cobra.Command, args []string) { } if delayShutdown > 0 { - termCh := make(chan os.Signal) + termCh := make(chan os.Signal, 1) signal.Notify(termCh, syscall.SIGTERM) go func() { <-termCh diff --git a/test/images/agnhost/pause/pause.go b/test/images/agnhost/pause/pause.go index 4d69a9816c7..bc49b835a8c 100644 --- a/test/images/agnhost/pause/pause.go +++ b/test/images/agnhost/pause/pause.go @@ -36,7 +36,7 @@ var CmdPause = &cobra.Command{ func pause(cmd *cobra.Command, args []string) { fmt.Println("Paused") - sigCh := make(chan os.Signal) + sigCh := make(chan os.Signal, 1) done := make(chan int, 1) signal.Notify(sigCh, syscall.SIGINT) signal.Notify(sigCh, syscall.SIGTERM)