Skip to content

Commit

Permalink
[chore][fileconsumer] Skip flaky TestFlushPeriodEOF on windows (open-…
Browse files Browse the repository at this point in the history
…telemetry#32946)

See
open-telemetry#32715

This also adds a bit more debugging info for other tests which fail on
the same expectation, since it's not very obvious what was expected vs
actually found.
  • Loading branch information
djaglowski authored May 8, 2024
1 parent fec5543 commit b1bbd58
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 1 deletion.
2 changes: 1 addition & 1 deletion pkg/stanza/fileconsumer/internal/emittest/sink.go
Original file line number Diff line number Diff line change
Expand Up @@ -119,7 +119,7 @@ func (s *Sink) ExpectTokens(t *testing.T, expected ...[]byte) {
return
}
}
require.ElementsMatch(t, expected, actual)
require.ElementsMatch(t, expected, actual, fmt.Sprintf("expected: %v, actual: %v", expected, actual))
}

func (s *Sink) ExpectCall(t *testing.T, expected []byte, attrs map[string]any) {
Expand Down
4 changes: 4 additions & 0 deletions pkg/stanza/fileconsumer/internal/reader/reader_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ package reader
import (
"context"
"fmt"
"runtime"
"strings"
"testing"
"time"
Expand Down Expand Up @@ -188,6 +189,9 @@ func TestFingerprintChangeSize(t *testing.T) {
}

func TestFlushPeriodEOF(t *testing.T) {
if runtime.GOOS == "windows" {
t.Skip("Skipping test on Windows; See https://github.com/open-telemetry/opentelemetry-collector-contrib/issues/32715")
}
tempDir := t.TempDir()
temp := filetest.OpenTemp(t, tempDir)
// Create a long enough initial token, so the scanner can't read the whole file at once
Expand Down

0 comments on commit b1bbd58

Please sign in to comment.