Skip to content

Commit bb0cacc

Browse files
author
Marc-Antoine Bourgeot
committed
WIP: fix existing unit tests
1 parent c5af410 commit bb0cacc

File tree

1 file changed

+6
-5
lines changed

1 file changed

+6
-5
lines changed

spec/inputs/sqs_spec.rb

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -110,8 +110,8 @@
110110

111111
# We have to make sure we create a bunch of events
112112
# so we actually really try to stop the plugin.
113-
#
114-
# rspec's `and_yield` allow you to define a fix amount of possible
113+
#
114+
# rspec's `and_yield` allow you to define a fix amount of possible
115115
# yielded values and doesn't allow you to create infinite loop.
116116
# And since we are actually creating thread we need to make sure
117117
# we have enough work to keep the thread working until we kill it..
@@ -140,10 +140,11 @@ def poll(polling_options = {})
140140
let(:id_field) { "my_id_field" }
141141
let(:md5_field) { "my_md5_field" }
142142
let(:sent_timestamp_field) { "my_sent_timestamp_field" }
143+
let(:user_attributes_field) { "my_user_attributes_field" }
143144

144145
let(:message) do
145146
double("message", :message_id => message_id, :md5_of_body => md5_of_body, :attributes => { LogStash::Inputs::SQS::SENT_TIMESTAMP => epoch_timestamp } )
146-
end
147+
end
147148

148149
subject { input.add_sqs_data(event, message) }
149150

@@ -198,7 +199,7 @@ def poll(polling_options = {})
198199
end
199200

200201
context "receiving messages" do
201-
before do
202+
before do
202203
expect(subject).to receive(:poller).and_return(mock_sqs).at_least(:once)
203204
end
204205

@@ -235,7 +236,7 @@ def poll(polling_options = {})
235236
it "retry to fetch messages" do
236237
# change the poller implementation to raise SQS errors.
237238
had_error = false
238-
239+
239240
# actually using the child of `Object` to do an expectation of `#sleep`
240241
expect(subject).to receive(:sleep).with(LogStash::Inputs::SQS::BACKOFF_SLEEP_TIME)
241242
expect(mock_sqs).to receive(:poll).with(anything()).at_most(2) do

0 commit comments

Comments
 (0)