You've already forked opentelemetry-go
mirror of
https://github.com/open-telemetry/opentelemetry-go.git
synced 2025-11-25 22:41:46 +02:00
sdk/trace: Manage trace environment variables in testing package (#6552)
Fix: #6542 Co-authored-by: Damien Mathieu <42@dmathieu.com>
This commit is contained in:
@@ -16,7 +16,6 @@ import (
|
||||
"github.com/stretchr/testify/require"
|
||||
|
||||
"go.opentelemetry.io/otel/sdk/internal/env"
|
||||
ottest "go.opentelemetry.io/otel/sdk/internal/internaltest"
|
||||
"go.opentelemetry.io/otel/trace"
|
||||
)
|
||||
|
||||
@@ -247,16 +246,6 @@ func TestNewBatchSpanProcessorWithEnvOptions(t *testing.T) {
|
||||
},
|
||||
}
|
||||
|
||||
envStore := ottest.NewEnvStore()
|
||||
envStore.Record(env.BatchSpanProcessorScheduleDelayKey)
|
||||
envStore.Record(env.BatchSpanProcessorExportTimeoutKey)
|
||||
envStore.Record(env.BatchSpanProcessorMaxQueueSizeKey)
|
||||
envStore.Record(env.BatchSpanProcessorMaxExportBatchSizeKey)
|
||||
|
||||
defer func() {
|
||||
require.NoError(t, envStore.Restore())
|
||||
}()
|
||||
|
||||
for _, option := range options {
|
||||
t.Run(option.name, func(t *testing.T) {
|
||||
for k, v := range option.envs {
|
||||
|
||||
Reference in New Issue
Block a user