diff --git a/sourcemap/processor_test.go b/sourcemap/processor_test.go index 0f1a4895259..239c0e88af2 100644 --- a/sourcemap/processor_test.go +++ b/sourcemap/processor_test.go @@ -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)