Skip to content

Commit

Permalink
Fix tests
Browse files Browse the repository at this point in the history
  • Loading branch information
XSAM committed Jan 8, 2021
1 parent 8bd9fcc commit 213311d
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 2 deletions.
6 changes: 4 additions & 2 deletions sdk/trace/batch_span_processor.go
Original file line number Diff line number Diff line change
Expand Up @@ -132,8 +132,10 @@ func (bsp *BatchSpanProcessor) Shutdown(ctx context.Context) error {
go func() {
close(bsp.stopCh)
bsp.stopWait.Wait()
if err := bsp.e.Shutdown(ctx); err != nil {
otel.Handle(err)
if bsp.e != nil {
if err := bsp.e.Shutdown(ctx); err != nil {
otel.Handle(err)
}
}
close(wait)
}()
Expand Down
1 change: 1 addition & 0 deletions sdk/trace/batch_span_processor_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@ import (
"time"

"github.com/stretchr/testify/assert"

"go.opentelemetry.io/otel/trace"

export "go.opentelemetry.io/otel/sdk/export/trace"
Expand Down

0 comments on commit 213311d

Please sign in to comment.