Skip to content

Commit

Permalink
closing after one message consumer
Browse files Browse the repository at this point in the history
  • Loading branch information
yairsimantov20 committed Dec 20, 2023
1 parent ae6ccad commit 06451f1
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions pkg/event_handler/consumer/consumer_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,7 @@ func (m *MockConsumer) SubscribeTopics(topics []string, rebalanceCb kafka.Rebala
}

func (m *MockConsumer) Poll(timeoutMs int) (event kafka.Event) {
// The consumer will poll this in while true loop so we need to close it inorder not to spam the logs
defer func() {
m.close()
}()
Expand Down

0 comments on commit 06451f1

Please sign in to comment.