Skip to content

Commit

Permalink
Merge pull request #116659 from claudiubelu/skip-flaky-tests-2
Browse files Browse the repository at this point in the history
unit tests: Skip flaky tests on Windows (part 2)
  • Loading branch information
k8s-ci-robot committed May 24, 2023
2 parents e28866e + 0979d55 commit 484645e
Show file tree
Hide file tree
Showing 4 changed files with 19 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -2433,6 +2433,10 @@ func TestApplyNoExecuteTaints(t *testing.T) {

// TestApplyNoExecuteTaintsToNodesEnqueueTwice ensures we taint every node with NoExecute even if enqueued twice
func TestApplyNoExecuteTaintsToNodesEnqueueTwice(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)

fakeNodeHandler := &testutil.FakeNodeHandler{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@ package reconciler
import (
"context"
"fmt"
goruntime "runtime"
"testing"
"time"

Expand Down Expand Up @@ -690,6 +691,10 @@ func Test_Run_UpdateNodeStatusFailBeforeOneVolumeDetachNodeWithReadWriteOnce(t *
}

func Test_Run_OneVolumeDetachFailNodeWithReadWriteOnce(t *testing.T) {
// TODO: Remove skip once https://github.com/kubernetes/kubernetes/issues/116693 is fixed.
if goruntime.GOOS == "windows" {
t.Skip("Skipping test on Windows.")
}
// Arrange
volumePluginMgr, _ := volumetesting.GetTestVolumePluginMgr(t)
dsw := cache.NewDesiredStateOfWorld(volumePluginMgr)
Expand Down
4 changes: 4 additions & 0 deletions pkg/kubelet/cm/devicemanager/manager_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -197,6 +197,10 @@ func TestDevicePluginReRegistration(t *testing.T) {
// While testing above scenario, plugin discovery and registration will be done using
// Kubelet probe based mechanism
func TestDevicePluginReRegistrationProbeMode(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)
Expand Down
6 changes: 6 additions & 0 deletions pkg/kubelet/stats/cri_stats_provider_windows_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -90,6 +90,7 @@ func Test_criStatsProvider_listContainerNetworkStats(t *testing.T) {
fields fakeNetworkStatsProvider
want map[string]*statsapi.NetworkStats
wantErr bool
skipped bool
}{
{
name: "basic example",
Expand Down Expand Up @@ -395,10 +396,15 @@ func Test_criStatsProvider_listContainerNetworkStats(t *testing.T) {
},
},
wantErr: false,
skipped: true,
},
}
for _, tt := range tests {
t.Run(tt.name, func(t *testing.T) {
// TODO: Remove skip once https://github.com/kubernetes/kubernetes/issues/116692 is fixed.
if tt.skipped {
t.Skip("Test temporarily skipped.")
}
p := &criStatsProvider{
windowsNetworkStatsProvider: fakeNetworkStatsProvider{
containers: tt.fields.containers,
Expand Down

0 comments on commit 484645e

Please sign in to comment.