Skip to content

Commit

Permalink
[chore] Fix flaky test in filelog receiver (#35012)
Browse files Browse the repository at this point in the history
Quick fix for
#35007.

Ideally we should not need to depend on order of files returned from the
finder but there are apparently some subtle implications which need to
be better understood before we remove the assumption.
  • Loading branch information
djaglowski committed Sep 4, 2024
1 parent 255aebe commit 548d95f
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion pkg/stanza/fileconsumer/matcher/internal/finder/finder.go
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand Down Expand Up @@ -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
}

0 comments on commit 548d95f

Please sign in to comment.