Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[kafka-consumer] Use wait group to ensure goroutine is finished befor…
…e returning from Close (#4582) ## Which problem is this PR solving? Resolves # [4576](#4576) ## Short description of the changes Once we call [start](https://github.com/jaegertracing/jaeger/blob/main/cmd/ingester/app/consumer/consumer.go#L76) and call [close](https://github.com/jaegertracing/jaeger/blob/main/cmd/ingester/app/consumer/consumer.go#L76) again with fxtest module, there is a chance that the application will close the goroutine before the l[ogline](https://github.com/jaegertracing/jaeger/blob/main/cmd/ingester/app/consumer/consumer.go#L79) is executed causing **panic Log in routine after .. has completed**. Fix: Add a wait group that will wait for the goroutine to finish before closing the channel. --------- Signed-off-by: kennyaz <115052215+kennyaz@users.noreply.github.com>
- Loading branch information