Skip to content

Commit

Permalink
Merge branch 'feat/DEX-2403/add-mark_as_consumed-for-tests' into 'mas…
Browse files Browse the repository at this point in the history
…ter'

[DEX-2403] feat: add mark_as_consumed for tests

Closes DEX-2403

See merge request nstmrt/rubygems/sbmt-kafka_consumer!63
  • Loading branch information
Arlantir committed Aug 1, 2024
2 parents 881e75b + 5db448e commit 7e6b685
Show file tree
Hide file tree
Showing 4 changed files with 9 additions and 2 deletions.
6 changes: 6 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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 = {})
Expand Down
2 changes: 1 addition & 1 deletion lib/sbmt/kafka_consumer/version.rb
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,6 @@

module Sbmt
module KafkaConsumer
VERSION = "2.7.0"
VERSION = "2.7.1"
end
end
2 changes: 1 addition & 1 deletion spec/sbmt/kafka_consumer/base_consumer_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit 7e6b685

Please sign in to comment.