You've already forked opentelemetry-go
mirror of
https://github.com/open-telemetry/opentelemetry-go.git
synced 2025-06-23 00:07:52 +02:00
SDK: Add Shutdown test for Span Processor (#169)
* SDK: Add Shutdown test for Span Processor * SDK: Shutdown test for Span Processor. Review fixes
This commit is contained in:
@ -201,4 +201,20 @@ func getSpanContext() core.SpanContext {
|
||||
SpanID: sid,
|
||||
TraceFlags: 0x1,
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
func TestBatchSpanProcessorShutdown(t *testing.T) {
|
||||
bsp, err := sdktrace.NewBatchSpanProcessor(&testBatchExporter{})
|
||||
if err != nil {
|
||||
t.Errorf("Unexpected error while creating processor\n")
|
||||
}
|
||||
|
||||
if bsp == nil {
|
||||
t.Fatalf("Error creating new instance of BatchSpanProcessor\n")
|
||||
}
|
||||
|
||||
bsp.Shutdown()
|
||||
|
||||
// Multiple call to Shutdown() should not panic.
|
||||
bsp.Shutdown()
|
||||
}
|
||||
|
Reference in New Issue
Block a user