From 017b2540d0fabb9c8393833264a62118fdfeaf96 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Paolo=20Chil=C3=A0?= Date: Thu, 6 Feb 2025 19:30:59 +0100 Subject: [PATCH] Skip flaky tests on windows while root cause is being investigated (#6734) (cherry picked from commit 09c9abcba4fa91a84b26dacd0ed216a6679afa0c) --- testing/integration/upgrade_gpg_test.go | 5 +++++ testing/integration/upgrade_rollback_test.go | 4 ++++ testing/integration/upgrade_standalone_retry_test.go | 5 +++++ testing/integration/upgrade_standalone_same_commit_test.go | 6 ++++++ 4 files changed, 20 insertions(+) diff --git a/testing/integration/upgrade_gpg_test.go b/testing/integration/upgrade_gpg_test.go index 9b7a01ac76f..8d1832b3650 100644 --- a/testing/integration/upgrade_gpg_test.go +++ b/testing/integration/upgrade_gpg_test.go @@ -8,6 +8,7 @@ package integration import ( "context" + "runtime" "strings" "testing" "time" @@ -98,6 +99,10 @@ func TestStandaloneUpgradeWithGPGFallbackOneRemoteFailing(t *testing.T) { Sudo: true, // requires Agent installation }) + if runtime.GOOS == "windows" { + t.Skip("This test is flaky on windows. See https://github.com/elastic/elastic-agent/issues/6732") + } + minVersion := upgradetest.Version_8_10_0_SNAPSHOT currentVersion, err := version.ParseVersion(define.Version()) require.NoError(t, err) diff --git a/testing/integration/upgrade_rollback_test.go b/testing/integration/upgrade_rollback_test.go index d84c4702873..1f35e0c7de4 100644 --- a/testing/integration/upgrade_rollback_test.go +++ b/testing/integration/upgrade_rollback_test.go @@ -168,6 +168,10 @@ func TestStandaloneUpgradeRollbackOnRestarts(t *testing.T) { Sudo: true, // requires Agent installation }) + if runtime.GOOS == "windows" { + t.Skip("This test is flaky on windows. See https://github.com/elastic/elastic-agent/issues/6733") + } + ctx, cancel := testcontext.WithDeadline(t, context.Background(), time.Now().Add(10*time.Minute)) defer cancel() diff --git a/testing/integration/upgrade_standalone_retry_test.go b/testing/integration/upgrade_standalone_retry_test.go index 7ee2e558cc8..6031d12a60b 100644 --- a/testing/integration/upgrade_standalone_retry_test.go +++ b/testing/integration/upgrade_standalone_retry_test.go @@ -13,6 +13,7 @@ import ( "net/http" "path" "path/filepath" + "runtime" "strings" "testing" "time" @@ -33,6 +34,10 @@ func TestStandaloneUpgradeRetryDownload(t *testing.T) { Sudo: true, // requires Agent installation }) + if runtime.GOOS == "windows" { + t.Skip("This test is flaky on windows. See https://github.com/elastic/elastic-agent/issues/6731") + } + ctx, cancel := testcontext.WithDeadline(t, context.Background(), time.Now().Add(10*time.Minute)) defer cancel() diff --git a/testing/integration/upgrade_standalone_same_commit_test.go b/testing/integration/upgrade_standalone_same_commit_test.go index e493d184ac2..7c8156a9230 100644 --- a/testing/integration/upgrade_standalone_same_commit_test.go +++ b/testing/integration/upgrade_standalone_same_commit_test.go @@ -18,6 +18,7 @@ import ( "os" "path" "path/filepath" + "runtime" "strings" "testing" "time" @@ -81,6 +82,11 @@ func TestStandaloneUpgradeSameCommit(t *testing.T) { }) t.Run(fmt.Sprintf("Upgrade on a repackaged version of agent %s (%s)", currentVersion, unPrivilegedString), func(t *testing.T) { + + if runtime.GOOS == "windows" { + t.Skip("This test is flaky on windows. See https://github.com/elastic/elastic-agent/issues/6729") + } + ctx, cancel := testcontext.WithDeadline(t, context.Background(), time.Now().Add(10*time.Minute)) defer cancel()