Skip to content

Commit

Permalink
Fix test race in kafka_consumer (influxdata#7797)
Browse files Browse the repository at this point in the history
  • Loading branch information
danielnelson authored Jul 7, 2020
1 parent 63ba709 commit bf9c9bf
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions testutil/accumulator.go
Original file line number Diff line number Diff line change
Expand Up @@ -212,9 +212,11 @@ func (a *Accumulator) AddTrackingMetricGroup(group []telegraf.Metric) telegraf.T
}

func (a *Accumulator) Delivered() <-chan telegraf.DeliveryInfo {
a.Lock()
if a.delivered == nil {
a.delivered = make(chan telegraf.DeliveryInfo)
}
a.Unlock()
return a.delivered
}

Expand Down

0 comments on commit bf9c9bf

Please sign in to comment.