Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

unit tests: Skip flaky tests on Windows (part 2) #116659

Merged
merged 1 commit into from
May 24, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
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.")
}
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

#107414 is fixed by #116675 in April. So this can be removed now.

// 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.

This comment was marked as abuse.

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