Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion lib/twingly/amqp/subscription.rb
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ def initialize(queue_name:, exchange_topic: nil, routing_key: nil,

@before_handle_message_callback = proc {}
@on_exception_callback = proc {}
@on_error_callback = proc { raise "Channel closed unexpectedly" }
@on_error_callback = proc {}
end

def each_message(blocking: true, &block)
Expand Down
8 changes: 0 additions & 8 deletions spec/integration/twingly/amqp/subscription_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -297,14 +297,6 @@ def simulate_channel_error(channel)
simulate_channel_error(subject.raw_queue.channel)
end.to yield_with_args(subject.raw_queue.channel, be_kind_of(AMQ::Protocol::Channel::Close))
end

context "when no error callback is configured" do
it "should raise a default error" do
expect do
simulate_channel_error(subject.raw_queue.channel)
end.to raise_error(RuntimeError, "Channel closed unexpectedly")
end
end
end

context "without exchange_topic and routing_key" do
Expand Down