unit tests: Skip flaky tests on Windows (part 2)
Some of the unit tests are currently flaky on Windows. This commit skips them until they are resolved.
This commit is contained in:
		@@ -2433,6 +2433,10 @@ func TestApplyNoExecuteTaints(t *testing.T) {
 | 
				
			|||||||
 | 
					
 | 
				
			||||||
// TestApplyNoExecuteTaintsToNodesEnqueueTwice ensures we taint every node with NoExecute even if enqueued twice
 | 
					// TestApplyNoExecuteTaintsToNodesEnqueueTwice ensures we taint every node with NoExecute even if enqueued twice
 | 
				
			||||||
func TestApplyNoExecuteTaintsToNodesEnqueueTwice(t *testing.T) {
 | 
					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)
 | 
						fakeNow := metav1.Date(2017, 1, 1, 12, 0, 0, 0, time.UTC)
 | 
				
			||||||
 | 
					
 | 
				
			||||||
	fakeNodeHandler := &testutil.FakeNodeHandler{
 | 
						fakeNodeHandler := &testutil.FakeNodeHandler{
 | 
				
			||||||
 
 | 
				
			|||||||
@@ -19,6 +19,7 @@ package reconciler
 | 
				
			|||||||
import (
 | 
					import (
 | 
				
			||||||
	"context"
 | 
						"context"
 | 
				
			||||||
	"fmt"
 | 
						"fmt"
 | 
				
			||||||
 | 
						goruntime "runtime"
 | 
				
			||||||
	"testing"
 | 
						"testing"
 | 
				
			||||||
	"time"
 | 
						"time"
 | 
				
			||||||
 | 
					
 | 
				
			||||||
@@ -690,6 +691,10 @@ func Test_Run_UpdateNodeStatusFailBeforeOneVolumeDetachNodeWithReadWriteOnce(t *
 | 
				
			|||||||
}
 | 
					}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
func Test_Run_OneVolumeDetachFailNodeWithReadWriteOnce(t *testing.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
 | 
						// Arrange
 | 
				
			||||||
	volumePluginMgr, _ := volumetesting.GetTestVolumePluginMgr(t)
 | 
						volumePluginMgr, _ := volumetesting.GetTestVolumePluginMgr(t)
 | 
				
			||||||
	dsw := cache.NewDesiredStateOfWorld(volumePluginMgr)
 | 
						dsw := cache.NewDesiredStateOfWorld(volumePluginMgr)
 | 
				
			||||||
 
 | 
				
			|||||||
@@ -197,6 +197,10 @@ func TestDevicePluginReRegistration(t *testing.T) {
 | 
				
			|||||||
// While testing above scenario, plugin discovery and registration will be done using
 | 
					// While testing above scenario, plugin discovery and registration will be done using
 | 
				
			||||||
// Kubelet probe based mechanism
 | 
					// Kubelet probe based mechanism
 | 
				
			||||||
func TestDevicePluginReRegistrationProbeMode(t *testing.T) {
 | 
					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()
 | 
						socketDir, socketName, pluginSocketName, err := tmpSocketDir()
 | 
				
			||||||
	require.NoError(t, err)
 | 
						require.NoError(t, err)
 | 
				
			||||||
	defer os.RemoveAll(socketDir)
 | 
						defer os.RemoveAll(socketDir)
 | 
				
			||||||
 
 | 
				
			|||||||
@@ -90,6 +90,7 @@ func Test_criStatsProvider_listContainerNetworkStats(t *testing.T) {
 | 
				
			|||||||
		fields  fakeNetworkStatsProvider
 | 
							fields  fakeNetworkStatsProvider
 | 
				
			||||||
		want    map[string]*statsapi.NetworkStats
 | 
							want    map[string]*statsapi.NetworkStats
 | 
				
			||||||
		wantErr bool
 | 
							wantErr bool
 | 
				
			||||||
 | 
							skipped bool
 | 
				
			||||||
	}{
 | 
						}{
 | 
				
			||||||
		{
 | 
							{
 | 
				
			||||||
			name: "basic example",
 | 
								name: "basic example",
 | 
				
			||||||
@@ -395,10 +396,15 @@ func Test_criStatsProvider_listContainerNetworkStats(t *testing.T) {
 | 
				
			|||||||
				},
 | 
									},
 | 
				
			||||||
			},
 | 
								},
 | 
				
			||||||
			wantErr: false,
 | 
								wantErr: false,
 | 
				
			||||||
 | 
								skipped: true,
 | 
				
			||||||
		},
 | 
							},
 | 
				
			||||||
	}
 | 
						}
 | 
				
			||||||
	for _, tt := range tests {
 | 
						for _, tt := range tests {
 | 
				
			||||||
		t.Run(tt.name, func(t *testing.T) {
 | 
							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{
 | 
								p := &criStatsProvider{
 | 
				
			||||||
				windowsNetworkStatsProvider: fakeNetworkStatsProvider{
 | 
									windowsNetworkStatsProvider: fakeNetworkStatsProvider{
 | 
				
			||||||
					containers: tt.fields.containers,
 | 
										containers: tt.fields.containers,
 | 
				
			||||||
 
 | 
				
			|||||||
		Reference in New Issue
	
	Block a user