Skip to content

Commit

Permalink
chore(spanner): remove deprecated usages of internal/trace from tests
Browse files Browse the repository at this point in the history
  • Loading branch information
quartzmo committed Dec 5, 2024
1 parent 8d5c3ff commit c20120f
Showing 1 changed file with 0 additions and 11 deletions.
11 changes: 0 additions & 11 deletions spanner/test/opentelemetry/test/ot_traces_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,6 @@ import (
"errors"
"testing"

"cloud.google.com/go/internal/trace"
"cloud.google.com/go/spanner"
stestutil "cloud.google.com/go/spanner/internal/testutil"
"go.opentelemetry.io/otel/sdk/trace/tracetest"
Expand All @@ -33,21 +32,11 @@ import (
func TestSpannerTracesWithOpenTelemetry(t *testing.T) {
ctx := context.Background()
te := newOpenTelemetryTestExporter(false, true)
old := trace.IsOpenTelemetryTracingEnabled()
trace.SetOpenTelemetryTracingEnabledField(true)

t.Cleanup(func() {
trace.SetOpenTelemetryTracingEnabledField(old)
te.Unregister(ctx)
})

if trace.IsOpenCensusTracingEnabled() {
t.Errorf("got true, want false")
}
if !trace.IsOpenTelemetryTracingEnabled() {
t.Errorf("got false, want true")
}

minOpened := uint64(1)
server, client, teardown := setupMockedTestServerWithConfig(t, spanner.ClientConfig{
SessionPoolConfig: spanner.SessionPoolConfig{
Expand Down

0 comments on commit c20120f

Please sign in to comment.