Occasional error in unittest TestExporterShutdown/testClientStopHonorsTimeout
#2989
Labels
area:trace
Part of OpenTelemetry tracing
bug
Something isn't working
help wanted
Extra attention is needed
pkg:exporter:otlp
Related to the OTLP exporter package
Description
This is an error in unittest
TestExporterShutdown/testClientStopHonorsTimeout
A few days ago, I open a pr #2987 , try fix golangci-lint not working correctly. But the pr checks occur a error in unittest
TestExporterShutdown/testClientStopHonorsTimeout
for exporter grpc clientStop()
function :exporters/otlp/otlptrace/otlptracegrpc/client.go#L130I figure out in
Stop(ctx context.Context)
theselect
for<-ctx.Done()
andacquired
may reach at the same time. Inselect
ifacquired
be exec first, TheStop(ctx context.Context)
function may return nil . whenStop(ctx context.Context)
function return nil, unittestTestExporterShutdown/testClientStopHonorsTimeout
andTestExporterShutdown/testClientStopHonorsTimeout
will failure.Environment
Steps To Reproduce
Wait for 2~3 minutes, the error while occur.
Expected behavior
The all unittest pass
The text was updated successfully, but these errors were encountered: