diff --git a/batch_consumer_test.go b/batch_consumer_test.go index f850eb9..1f32005 100644 --- a/batch_consumer_test.go +++ b/batch_consumer_test.go @@ -532,6 +532,13 @@ func (m *mockCronsumer) GetMetricCollectors() []prometheus.Collector { } func (m *mockCronsumer) ProduceBatch([]kcronsumer.Message) error { + if m.retryBehaviorOpen { + if m.wantErr && m.times <= m.maxRetry { + m.times++ + return errors.New("error") + } + return nil + } if m.wantErr { return errors.New("error") } diff --git a/examples/docker-compose.yml b/examples/docker-compose.yml index dfb8d67..8fdf209 100644 --- a/examples/docker-compose.yml +++ b/examples/docker-compose.yml @@ -10,7 +10,7 @@ services: - "4318:4318" zookeeper: - image: debezium/zookeeper:2.4 + image: debezium/zookeeper ports: - "2181:2181"