Skip to content

Commit

Permalink
speed up test
Browse files Browse the repository at this point in the history
  • Loading branch information
axw committed Jul 8, 2021
1 parent d136210 commit 6db6c7f
Showing 1 changed file with 2 additions and 9 deletions.
11 changes: 2 additions & 9 deletions sourcemap/processor_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -291,19 +291,12 @@ func TestBatchProcessorTimeout(t *testing.T) {
}
span := &model.Span{
Metadata: metadata,
Stacktrace: make(model.Stacktrace, 100),
}
for i := range span.Stacktrace {
span.Stacktrace[i] = cloneFrame(frame)
}
batch := make(model.Batch, 100)
for i := range batch {
batch[i].Span = span
Stacktrace: model.Stacktrace{cloneFrame(frame)},
}

before := time.Now()
processor := sourcemap.BatchProcessor{Store: store, Timeout: 100 * time.Millisecond}
err = processor.ProcessBatch(context.Background(), &batch)
err = processor.ProcessBatch(context.Background(), &model.Batch{{Span: span}})
assert.NoError(t, err)
taken := time.Since(before)
assert.Less(t, taken, time.Second)
Expand Down

0 comments on commit 6db6c7f

Please sign in to comment.