From 88fa0e298207387fcb4c7de1ed014cf4bdea4a62 Mon Sep 17 00:00:00 2001 From: Dan Jaglowski Date: Wed, 4 Sep 2024 12:42:15 -0400 Subject: [PATCH] [chore] Fix flaky test in filelog receiver --- pkg/stanza/fileconsumer/matcher/internal/finder/finder.go | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/pkg/stanza/fileconsumer/matcher/internal/finder/finder.go b/pkg/stanza/fileconsumer/matcher/internal/finder/finder.go index 6d99edbbf8ec..caa447bda7ee 100644 --- a/pkg/stanza/fileconsumer/matcher/internal/finder/finder.go +++ b/pkg/stanza/fileconsumer/matcher/internal/finder/finder.go @@ -6,6 +6,7 @@ package finder // import "github.com/open-telemetry/opentelemetry-collector-cont import ( "errors" "fmt" + "slices" "github.com/bmatcuk/doublestar/v4" "golang.org/x/exp/maps" @@ -46,5 +47,7 @@ func FindFiles(includes []string, excludes []string) ([]string, error) { } } - return maps.Keys(allSet), errs + keys := maps.Keys(allSet) + slices.Sort(keys) + return keys, errs }