You've already forked opentelemetry-go
mirror of
https://github.com/open-telemetry/opentelemetry-go.git
synced 2025-06-25 00:16:49 +02:00
switch atomic.Value to atomic.Pointer for spanProcessorStates (#3926)
Co-authored-by: Chester Cheung <cheung.zhy.csu@gmail.com> Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
This commit is contained in:
@ -135,7 +135,7 @@ func TestRegisterAfterShutdownWithoutProcessors(t *testing.T) {
|
||||
|
||||
sp := &basicSpanProcessor{}
|
||||
stp.RegisterSpanProcessor(sp) // no-op
|
||||
assert.Empty(t, stp.spanProcessors.Load().(spanProcessorStates))
|
||||
assert.Empty(t, stp.spanProcessors.Load())
|
||||
}
|
||||
|
||||
func TestRegisterAfterShutdownWithProcessors(t *testing.T) {
|
||||
@ -146,11 +146,11 @@ func TestRegisterAfterShutdownWithProcessors(t *testing.T) {
|
||||
err := stp.Shutdown(context.Background())
|
||||
assert.NoError(t, err)
|
||||
assert.True(t, stp.isShutdown)
|
||||
assert.Empty(t, stp.spanProcessors.Load().(spanProcessorStates))
|
||||
assert.Empty(t, stp.spanProcessors.Load())
|
||||
|
||||
sp2 := &basicSpanProcessor{}
|
||||
stp.RegisterSpanProcessor(sp2) // no-op
|
||||
assert.Empty(t, stp.spanProcessors.Load().(spanProcessorStates))
|
||||
assert.Empty(t, stp.spanProcessors.Load())
|
||||
}
|
||||
|
||||
func TestTracerProviderSamplerConfigFromEnv(t *testing.T) {
|
||||
|
Reference in New Issue
Block a user