Skip to content

Commit

Permalink
cleanup
Browse files Browse the repository at this point in the history
  • Loading branch information
paivagustavo committed Apr 29, 2021
1 parent 1d93b43 commit 0ad6cc6
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 5 deletions.
4 changes: 1 addition & 3 deletions sdk/trace/batch_span_processor.go
Original file line number Diff line number Diff line change
Expand Up @@ -158,9 +158,7 @@ func (bsp *batchSpanProcessor) ForceFlush(ctx context.Context) error {
if bsp.e != nil {
wait := make(chan error)
go func() {
if err := bsp.exportSpans(ctx); err != nil {
wait <- err
}
wait <- bsp.exportSpans(ctx)
close(wait)
}()
// Wait until the export is finished or the context is cancelled/timed out
Expand Down
4 changes: 2 additions & 2 deletions sdk/trace/batch_span_processor_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -407,12 +407,12 @@ func TestBatchSpanProcessorDropBatchIfFailed(t *testing.T) {
}
}

func assertMaxSpanDiff(t *testing.T, want int, got int, maxDif int) {
func assertMaxSpanDiff(t *testing.T, want, got, maxDif int) {
spanDifference := want - got
if spanDifference < 0 {
spanDifference = spanDifference * -1
}
if spanDifference > maxDif || spanDifference < 0 {
if spanDifference > maxDif {
t.Errorf("number of exported span not equal to or within %d less than: got %+v, want %+v\n",
maxDif, got, want)
}
Expand Down

0 comments on commit 0ad6cc6

Please sign in to comment.