Skip to content

Commit 33d4ec5

Browse files
more robust error message on queue full
1 parent 7d457b3 commit 33d4ec5

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

lib/optimizely/event/batch_event_processor.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -91,7 +91,7 @@ def process(user_event)
9191
begin
9292
@event_queue.push(user_event, true)
9393
rescue => e
94-
@logger.log(Logger::WARN, 'Payload not accepted by the queue. ' + e.message)
94+
@logger.log(Logger::WARN, 'Payload not accepted by the queue: ' + e.message)
9595
return
9696
end
9797
end

spec/event/batch_event_processor_spec.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -344,7 +344,7 @@
344344
# Wait until other thread has processed the event.
345345
while @event_processor.current_batch.length != 10; end
346346
expect(@event_dispatcher).not_to have_received(:dispatch_event)
347-
expect(spy_logger).to have_received(:log).with(Logger::WARN, 'Payload not accepted by the queue.').once
347+
expect(spy_logger).to have_received(:log).with(Logger::WARN, 'Payload not accepted by the queue: queue full').once
348348
end
349349

350350
it 'should not process and log when Executor is not running' do

0 commit comments

Comments
 (0)