diff --git a/CHANGELOG.md b/CHANGELOG.md index 6ab3d58..370c39b 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -13,6 +13,12 @@ and this project adheres to [Semantic Versioning](http://semver.org/). ### Fixed +## [2.7.1] - 2024-08-01 + +### Fixed + +- Add mock `mark_as_consumed` for tests + ## [2.7.0] - 2024-07-30 ### Changed diff --git a/lib/sbmt/kafka_consumer/testing/shared_contexts/with_sbmt_karafka_consumer.rb b/lib/sbmt/kafka_consumer/testing/shared_contexts/with_sbmt_karafka_consumer.rb index 055a37a..d22efaa 100644 --- a/lib/sbmt/kafka_consumer/testing/shared_contexts/with_sbmt_karafka_consumer.rb +++ b/lib/sbmt/kafka_consumer/testing/shared_contexts/with_sbmt_karafka_consumer.rb @@ -24,6 +24,7 @@ Sbmt::KafkaConsumer::ClientConfigurer.configure! allow(kafka_client).to receive(:assignment_lost?).and_return(false) allow(kafka_client).to receive(:mark_as_consumed!).and_return(true) + allow(kafka_client).to receive(:mark_as_consumed).and_return(true) } def publish_to_sbmt_karafka(raw_payload, opts = {}) diff --git a/lib/sbmt/kafka_consumer/version.rb b/lib/sbmt/kafka_consumer/version.rb index 9929eb2..68b8658 100644 --- a/lib/sbmt/kafka_consumer/version.rb +++ b/lib/sbmt/kafka_consumer/version.rb @@ -2,6 +2,6 @@ module Sbmt module KafkaConsumer - VERSION = "2.7.0" + VERSION = "2.7.1" end end diff --git a/spec/sbmt/kafka_consumer/base_consumer_spec.rb b/spec/sbmt/kafka_consumer/base_consumer_spec.rb index dc6d8f6..9fdeecc 100644 --- a/spec/sbmt/kafka_consumer/base_consumer_spec.rb +++ b/spec/sbmt/kafka_consumer/base_consumer_spec.rb @@ -122,7 +122,7 @@ def process_message(_message) end it "calls mark_as_consumed" do - expect(consumer).to receive(:mark_as_consumed).once + expect(consumer).to receive(:mark_as_consumed).once.and_call_original expect(consumer).not_to receive(:mark_as_consumed!) consume_with_sbmt_karafka