Skip to content

Commit

Permalink
Remove redundant TestBatchSpanProcessorForceFlushCancellation (#4367)
Browse files Browse the repository at this point in the history
  • Loading branch information
pellared authored Jul 26, 2023
1 parent 85afa3d commit d5d6318
Showing 1 changed file with 0 additions and 12 deletions.
12 changes: 0 additions & 12 deletions sdk/trace/batch_span_processor_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -549,18 +549,6 @@ func (indefiniteExporter) ExportSpans(ctx context.Context, _ []sdktrace.ReadOnly
return ctx.Err()
}

func TestBatchSpanProcessorForceFlushTimeout(t *testing.T) {
// Add timeout to context to test deadline
ctx, cancel := context.WithTimeout(context.Background(), time.Nanosecond)
defer cancel()
<-ctx.Done()

bsp := sdktrace.NewBatchSpanProcessor(indefiniteExporter{})
if got, want := bsp.ForceFlush(ctx), context.DeadlineExceeded; !errors.Is(got, want) {
t.Errorf("expected %q error, got %v", want, got)
}
}

func TestBatchSpanProcessorForceFlushCancellation(t *testing.T) {
ctx, cancel := context.WithCancel(context.Background())
// Cancel the context
Expand Down

0 comments on commit d5d6318

Please sign in to comment.