From 944c62daf4ec019331d2958ae2d0eeeeaf73fe72 Mon Sep 17 00:00:00 2001 From: Harshavardhana Date: Mon, 7 Nov 2022 00:11:21 -0800 Subject: [PATCH] skip flaky tests on windows OS (#16015) --- cmd/erasure-object_test.go | 5 +++++ internal/http/listener_test.go | 13 +++++++++++++ 2 files changed, 18 insertions(+) diff --git a/cmd/erasure-object_test.go b/cmd/erasure-object_test.go index 322c6f29f..5189ec869 100644 --- a/cmd/erasure-object_test.go +++ b/cmd/erasure-object_test.go @@ -27,6 +27,7 @@ import ( "io" "os" "path/filepath" + "runtime" "strconv" "testing" @@ -1123,6 +1124,10 @@ func TestGetObjectInlineNotInline(t *testing.T) { // Test reading an object with some outdated data in some disks func TestGetObjectWithOutdatedDisks(t *testing.T) { + if runtime.GOOS == globalWindowsOSName { + t.Skip() + } + ctx, cancel := context.WithCancel(context.Background()) defer cancel() diff --git a/internal/http/listener_test.go b/internal/http/listener_test.go index d48cdb3a2..df9790861 100644 --- a/internal/http/listener_test.go +++ b/internal/http/listener_test.go @@ -21,6 +21,7 @@ import ( "context" "crypto/tls" "net" + "runtime" "strconv" "strings" "sync/atomic" @@ -167,6 +168,10 @@ func TestNewHTTPListener(t *testing.T) { } func TestHTTPListenerStartClose(t *testing.T) { + if runtime.GOOS == "windows" { + t.Skip() + } + nonLoopBackIP := getNonLoopBackIP(t) testCases := []struct { @@ -208,6 +213,10 @@ func TestHTTPListenerStartClose(t *testing.T) { } func TestHTTPListenerAddr(t *testing.T) { + if runtime.GOOS == "windows" { + t.Skip() + } + nonLoopBackIP := getNonLoopBackIP(t) var casePorts []string for i := 0; i < 6; i++ { @@ -251,6 +260,10 @@ func TestHTTPListenerAddr(t *testing.T) { } func TestHTTPListenerAddrs(t *testing.T) { + if runtime.GOOS == "windows" { + t.Skip() + } + nonLoopBackIP := getNonLoopBackIP(t) var casePorts []string for i := 0; i < 6; i++ {