From 05efd64320472d70bd86a6984f25b569867c4b10 Mon Sep 17 00:00:00 2001 From: Mathias Fredriksson Date: Fri, 26 May 2023 16:17:09 +0300 Subject: [PATCH] test: Skip tests that send `os.Interrupt` to test pid (#7695) This can cause test flakes due to clitest commands running in memory and listening to interrupt signals. --- cli/cliui/provisionerjob_test.go | 2 ++ cli/server_test.go | 2 ++ 2 files changed, 4 insertions(+) diff --git a/cli/cliui/provisionerjob_test.go b/cli/cliui/provisionerjob_test.go index 4795867843..2aa25b6046 100644 --- a/cli/cliui/provisionerjob_test.go +++ b/cli/cliui/provisionerjob_test.go @@ -82,6 +82,8 @@ func TestProvisionerJob(t *testing.T) { // This cannot be ran in parallel because it uses a signal. // nolint:paralleltest t.Run("Cancel", func(t *testing.T) { + t.Skip("This test issues an interrupt signal which will propagate to the test runner.") + if runtime.GOOS == "windows" { // Sending interrupt signal isn't supported on Windows! t.SkipNow() diff --git a/cli/server_test.go b/cli/server_test.go index d5620b261b..5c8af2f2ca 100644 --- a/cli/server_test.go +++ b/cli/server_test.go @@ -1491,6 +1491,8 @@ func TestServer_Production(t *testing.T) { //nolint:tparallel,paralleltest // This test cannot be run in parallel due to signal handling. func TestServer_Shutdown(t *testing.T) { + t.Skip("This test issues an interrupt signal which will propagate to the test runner.") + if runtime.GOOS == "windows" { // Sending interrupt signal isn't supported on Windows! t.SkipNow()