Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
14 changes: 13 additions & 1 deletion exporter/prometheusremotewriteexporter/exporter_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,8 @@ import (
"net/http"
"net/http/httptest"
"net/url"
"os"
"runtime"
"strconv"
"strings"
"sync"
Expand Down Expand Up @@ -757,8 +759,18 @@ func Test_PushMetrics(t *testing.T) {
}

if useWAL {
var dir string
if runtime.GOOS == "windows" {
// On Windows, use os.MkdirTemp to create directory since t.TempDir results in an error during cleanup in scoped-tests.
// See https://github.com/open-telemetry/opentelemetry-collector-contrib/issues/42639
var err error
dir, err = os.MkdirTemp("", tt.name) //nolint:usetesting
require.NoError(t, err)
} else {
dir = t.TempDir()
}
cfg.WAL = configoptional.Some(WALConfig{
Directory: t.TempDir(),
Directory: dir,
})
}

Expand Down
Loading