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
4 changes: 4 additions & 0 deletions test/plugin/test_in_object_space.rb
Original file line number Diff line number Diff line change
Expand Up @@ -50,6 +50,10 @@ def test_configure
end

def test_emit
# Force release garbaged objects due to avoid unexpected error by mock objects on `on_timer`
# https://github.com/fluent/fluentd/pull/5055
GC.start

d = create_driver

d.run(expect_emits: 3)
Expand Down
2 changes: 2 additions & 0 deletions test/plugin/test_input.rb
Original file line number Diff line number Diff line change
Expand Up @@ -133,5 +133,7 @@ def emit(tag, es)
assert{ @p.router.object_id != original_router.object_id }

@p.router.emit('mytag.testing', ['for mock'])
ensure
Fluent::Engine.root_agent.labels['@mytest'] = nil
end
end
2 changes: 1 addition & 1 deletion test/plugin/test_out_forward.rb
Original file line number Diff line number Diff line change
Expand Up @@ -344,7 +344,7 @@ def try_write(chunk)
end

test 'set_compress_is_gzip_in_buffer_section' do
mock = flexmock($log)
mock = flexmock($log.dup)
mock.should_receive(:log).with("buffer is compressed. If you also want to save the bandwidth of a network, Add `compress` configuration in <match>")

@d = d = create_driver(config + %[
Expand Down
2 changes: 2 additions & 0 deletions test/plugin_helper/test_event_emitter.rb
Original file line number Diff line number Diff line change
Expand Up @@ -70,6 +70,8 @@ class Dummy < Fluent::Plugin::TestBase
d.configure(config_element('ROOT', '', {'@label' => '@mytest'}))
router = d.event_emitter_router("@mytest")
assert_equal router_mock, router
ensure
Fluent::Engine.root_agent.labels['@mytest'] = nil
end

test 'get root router' do
Expand Down
Loading