Skip to content

Commit

Permalink
fix consumer_set_spec rspec warning
Browse files Browse the repository at this point in the history
  • Loading branch information
lairen committed Sep 11, 2023
1 parent 7123d18 commit 3f1c35a
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions spec/consumer_set_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -285,10 +285,10 @@ def message_generator(messages)
end

describe "#store_offset" do
it "raises ErroneousStateError when RD_KAFKA_RESP_ERR__STATE(-172) is not raised" do
it "does not raise ErroneousStateError when RD_KAFKA_RESP_ERR__STATE(-172) is raised" do
allow(logger).to receive(:warn)
allow(rdconsumer).to receive(:store_offset).with(:message).and_raise(Rdkafka::RdkafkaError, -172) # state
expect {consumer_set.store_offset(:message) }.not_to raise_error(Racecar::ErroneousStateError)
expect { consumer_set.store_offset(:message) }.not_to raise_error
expect(logger).to have_received(:warn)
end

Expand Down

0 comments on commit 3f1c35a

Please sign in to comment.