Skip to content

Commit

Permalink
log warnings if test cleanup fails
Browse files Browse the repository at this point in the history
  • Loading branch information
katiehockman committed Jan 18, 2024
1 parent eee0812 commit 7f1897c
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions ddtrace/opentelemetry/span_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -71,8 +71,12 @@ func mockTracerProvider(t *testing.T, opts ...tracer.StartOption) (tp *TracerPro
tp = NewTracerProvider(opts...)
otel.SetTracerProvider(tp)
return tp, payloads, func() {
s.Close()
tp.Shutdown()
if err := s.Close(); err != nil {
t.Fatalf("Test Agent server Close failure: %v", err)
}
if err := tp.Shutdown(); err != nil {
t.Fatalf("Tracer Provider shutdown failure: %v", err)
}
}
}

Expand Down

0 comments on commit 7f1897c

Please sign in to comment.