1
0
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:
Damien Mathieu
2023-03-27 18:38:47 +02:00
committed by GitHub
parent 89e383fa1c
commit ae90c4402e
4 changed files with 14 additions and 14 deletions

View File

@ -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) {