From 08201c1e2b8a4f1eaba30d6c3d21a264b33e96e5 Mon Sep 17 00:00:00 2001 From: Paulo Janotti Date: Thu, 19 Sep 2024 11:22:06 -0700 Subject: [PATCH 1/3] [chore] Skip flaky test on Windows --- .../internal/filter/itemcardinality_test.go | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/receiver/googlecloudspannerreceiver/internal/filter/itemcardinality_test.go b/receiver/googlecloudspannerreceiver/internal/filter/itemcardinality_test.go index e89d2dafd500..e17de4363e5c 100644 --- a/receiver/googlecloudspannerreceiver/internal/filter/itemcardinality_test.go +++ b/receiver/googlecloudspannerreceiver/internal/filter/itemcardinality_test.go @@ -6,6 +6,7 @@ package filter import ( "testing" "time" + "runtime" "github.com/stretchr/testify/assert" "github.com/stretchr/testify/require" @@ -122,6 +123,9 @@ func TestItemCardinalityFilter_Shutdown(t *testing.T) { } func TestItemCardinalityFilter_Filter(t *testing.T) { + if runtime.GOOS == "windows" { + t.Skip("Skipping test on Windows due to https://github.com/open-telemetry/opentelemetry-collector-contrib/issues/32397") + } items := initialItems(t) logger := zaptest.NewLogger(t) filter, err := NewItemCardinalityFilter(metricName, totalLimit, limitByTimestamp, itemActivityPeriod, logger) From b8d5825990b1f38c2f3bfbbbf641127359e6cfdb Mon Sep 17 00:00:00 2001 From: Paulo Janotti Date: Thu, 19 Sep 2024 11:29:10 -0700 Subject: [PATCH 2/3] Fix import order --- .../internal/filter/itemcardinality_test.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/receiver/googlecloudspannerreceiver/internal/filter/itemcardinality_test.go b/receiver/googlecloudspannerreceiver/internal/filter/itemcardinality_test.go index e17de4363e5c..2b4d061b152c 100644 --- a/receiver/googlecloudspannerreceiver/internal/filter/itemcardinality_test.go +++ b/receiver/googlecloudspannerreceiver/internal/filter/itemcardinality_test.go @@ -4,9 +4,9 @@ package filter import ( + "runtime" "testing" "time" - "runtime" "github.com/stretchr/testify/assert" "github.com/stretchr/testify/require" From 2f5109a9bc9b88801ff97b7b443fba2e47feb7c9 Mon Sep 17 00:00:00 2001 From: Paulo Janotti Date: Thu, 19 Sep 2024 12:12:31 -0700 Subject: [PATCH 3/3] Skip another flaky test --- .../internal/filter/itemcardinality_test.go | 3 +++ 1 file changed, 3 insertions(+) diff --git a/receiver/googlecloudspannerreceiver/internal/filter/itemcardinality_test.go b/receiver/googlecloudspannerreceiver/internal/filter/itemcardinality_test.go index 2b4d061b152c..071ba7573ea5 100644 --- a/receiver/googlecloudspannerreceiver/internal/filter/itemcardinality_test.go +++ b/receiver/googlecloudspannerreceiver/internal/filter/itemcardinality_test.go @@ -179,6 +179,9 @@ func TestItemCardinalityFilter_Filter(t *testing.T) { } func TestItemCardinalityFilter_FilterItems(t *testing.T) { + if runtime.GOOS == "windows" { + t.Skip("Skipping test on Windows due to https://github.com/open-telemetry/opentelemetry-collector-contrib/issues/32397") + } items := initialItemsWithSameTimestamp(t) logger := zaptest.NewLogger(t) filter, err := NewItemCardinalityFilter(metricName, totalLimit, limitByTimestamp, itemActivityPeriod, logger)