From 5ba74c81ca2b29704566d28f73f12ba635f1d15a Mon Sep 17 00:00:00 2001 From: Claudiu Belu Date: Tue, 21 Feb 2023 12:48:02 +0000 Subject: [PATCH] unit tests: Skip flaky tests on Windows Some of the unit tests are currently flaky on Windows. This commit skips them until they are resolved. --- .../nodelifecycle/node_lifecycle_controller_test.go | 5 +++++ pkg/kubelet/cm/devicemanager/manager_test.go | 5 +++++ 2 files changed, 10 insertions(+) diff --git a/pkg/controller/nodelifecycle/node_lifecycle_controller_test.go b/pkg/controller/nodelifecycle/node_lifecycle_controller_test.go index 60734b143f9..de4bff00802 100644 --- a/pkg/controller/nodelifecycle/node_lifecycle_controller_test.go +++ b/pkg/controller/nodelifecycle/node_lifecycle_controller_test.go @@ -19,6 +19,7 @@ package nodelifecycle import ( "context" "fmt" + goruntime "runtime" "strings" "testing" "time" @@ -2759,6 +2760,10 @@ func TestMonitorNodeHealthMarkPodsNotReadyRetry(t *testing.T) { // NodeController is just responsible for enqueuing the node to tainting queue from which taint manager picks up // and evicts the pods on the node. func TestApplyNoExecuteTaints(t *testing.T) { + // TODO: Remove skip once https://github.com/kubernetes/kubernetes/pull/114607 merges. + if goruntime.GOOS == "windows" { + t.Skip("Skipping test on Windows.") + } fakeNow := metav1.Date(2017, 1, 1, 12, 0, 0, 0, time.UTC) evictionTimeout := 10 * time.Minute diff --git a/pkg/kubelet/cm/devicemanager/manager_test.go b/pkg/kubelet/cm/devicemanager/manager_test.go index d44bbdd2d1c..8c0726d0a64 100644 --- a/pkg/kubelet/cm/devicemanager/manager_test.go +++ b/pkg/kubelet/cm/devicemanager/manager_test.go @@ -21,6 +21,7 @@ import ( "os" "path/filepath" "reflect" + goruntime "runtime" "sync" "sync/atomic" "testing" @@ -121,6 +122,10 @@ func TestNewManagerImplStartProbeMode(t *testing.T) { // making sure that after registration, devices are correctly updated and if a re-registration // happens, we will NOT delete devices; and no orphaned devices left. func TestDevicePluginReRegistration(t *testing.T) { + // TODO: Remove skip once https://github.com/kubernetes/kubernetes/pull/115269 merges. + if goruntime.GOOS == "windows" { + t.Skip("Skipping test on Windows.") + } socketDir, socketName, pluginSocketName, err := tmpSocketDir() require.NoError(t, err) defer os.RemoveAll(socketDir)