Skip to content

Commit 07a7158

Browse files
committed
refactor
1 parent 845316b commit 07a7158

File tree

1 file changed

+9
-9
lines changed

1 file changed

+9
-9
lines changed

sdk/trace/provider_test.go

+9-9
Original file line numberDiff line numberDiff line change
@@ -382,16 +382,16 @@ func testStoredError(t *testing.T, target interface{}) {
382382
}
383383
}
384384

385-
func TestLoggerProviderReturnsSameLogger(t *testing.T) {
385+
func TestTracerProviderReturnsSameTracer(t *testing.T) {
386386
p := NewTracerProvider()
387387

388-
l0, l1, l2 := p.Tracer("t0"), p.Tracer("t1"), p.Tracer("t0", trace.WithInstrumentationAttributes(attribute.String("foo", "bar")))
389-
assert.NotSame(t, l0, l1)
390-
assert.Same(t, l0, l2) // TODO (#3368): Change to assert.NotSame.
391-
assert.NotSame(t, l1, l2)
388+
t0, t1, t2 := p.Tracer("t0"), p.Tracer("t1"), p.Tracer("t0", trace.WithInstrumentationAttributes(attribute.String("foo", "bar")))
389+
assert.NotSame(t, t0, t1)
390+
assert.Same(t, t0, t2) // TODO (#3368): Change to assert.NotSame.
391+
assert.NotSame(t, t1, t2)
392392

393-
l3, l4, l5 := p.Tracer("t0"), p.Tracer("t1"), p.Tracer("t0", trace.WithInstrumentationAttributes(attribute.String("foo", "bar")))
394-
assert.Same(t, l0, l3)
395-
assert.Same(t, l1, l4)
396-
assert.Same(t, l2, l5)
393+
t3, t4, t5 := p.Tracer("t0"), p.Tracer("t1"), p.Tracer("t0", trace.WithInstrumentationAttributes(attribute.String("foo", "bar")))
394+
assert.Same(t, t0, t3)
395+
assert.Same(t, t1, t4)
396+
assert.Same(t, t2, t5)
397397
}

0 commit comments

Comments
 (0)