You've already forked opentelemetry-go
mirror of
https://github.com/open-telemetry/opentelemetry-go.git
synced 2025-11-25 22:41:46 +02:00
Process the queue until no data but respect max batch size (#599)
This commit is contained in:
@@ -143,6 +143,19 @@ func TestNewBatchSpanProcessorWithOptions(t *testing.T) {
|
||||
waitTime: waitTime,
|
||||
parallel: true,
|
||||
},
|
||||
{
|
||||
name: "parallel span blocking",
|
||||
o: []sdktrace.BatchSpanProcessorOption{
|
||||
sdktrace.WithScheduleDelayMillis(schDelay),
|
||||
sdktrace.WithMaxExportBatchSize(200),
|
||||
sdktrace.WithBlocking(),
|
||||
},
|
||||
wantNumSpans: 2000,
|
||||
wantBatchCount: 10,
|
||||
genNumSpans: 2000,
|
||||
waitTime: waitTime,
|
||||
parallel: true,
|
||||
},
|
||||
}
|
||||
for _, option := range options {
|
||||
te := testBatchExporter{}
|
||||
@@ -158,6 +171,8 @@ func TestNewBatchSpanProcessorWithOptions(t *testing.T) {
|
||||
|
||||
time.Sleep(option.waitTime)
|
||||
|
||||
tp.UnregisterSpanProcessor(ssp)
|
||||
|
||||
gotNumOfSpans := te.len()
|
||||
if option.wantNumSpans != gotNumOfSpans {
|
||||
t.Errorf("%s: number of exported span: got %+v, want %+v\n", option.name, gotNumOfSpans, option.wantNumSpans)
|
||||
|
||||
Reference in New Issue
Block a user