Skip to content

Commit 6d80b33

Browse files
authored
Merge pull request #874 from abicky/resolve-outside-of-example-error
Resolve RSpec::Mocks::OutsideOfExampleError
2 parents fc5c69d + ca33e40 commit 6d80b33

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

Diff for: spec/async_producer_spec.rb

+4
Original file line numberDiff line numberDiff line change
@@ -76,6 +76,8 @@ def instrument(name, payload = {})
7676
sleep 0.2 # wait for worker to call produce
7777

7878
expect(sync_producer).to have_received(:produce)
79+
80+
async_producer.shutdown
7981
end
8082

8183
it "retries until configured max_retries" do
@@ -89,6 +91,8 @@ def instrument(name, payload = {})
8991
metric = instrumenter.metrics_for("error.async_producer").first
9092
expect(metric.payload[:error]).to be_a(Kafka::BufferOverflow)
9193
expect(sync_producer).to have_received(:produce).exactly(3).times
94+
95+
async_producer.shutdown
9296
end
9397

9498
it "requires `topic` to be a String" do

0 commit comments

Comments
 (0)