This commit is contained in:
Karl Southern 2016-09-02 15:18:15 +01:00
parent 9164605aae
commit 3bdd8ef3a8

View File

@ -49,10 +49,12 @@ RSpec.shared_context 'when outputting messages' do
let(:event) { LogStash::Event.new(event_fields) } let(:event) { LogStash::Event.new(event_fields) }
let(:plugin) do let(:plugin) do
# Setup logger
expect(LogStash::Ouputs::Jdbc).to receive(:logger).and_return(logger).at_least(:once)
# Setup plugin # Setup plugin
output = LogStash::Plugin.lookup('output', 'jdbc').new(jdbc_settings) output = LogStash::Plugin.lookup('output', 'jdbc').new(jdbc_settings)
output.register output.register
output.logger = logger
# Setup table # Setup table
c = output.instance_variable_get(:@pool).getConnection c = output.instance_variable_get(:@pool).getConnection