Skip to content

Commit

Permalink
reduce warnings for uninitialized variables
Browse files Browse the repository at this point in the history
  • Loading branch information
tagomoris committed Aug 30, 2016
1 parent 28a7b3a commit 145c17a
Show file tree
Hide file tree
Showing 4 changed files with 8 additions and 3 deletions.
4 changes: 4 additions & 0 deletions test/plugin/test_filter.rb
Original file line number Diff line number Diff line change
Expand Up @@ -60,6 +60,10 @@ def emit_error_event(tag, time, record, error)
end
end

setup do
@p = nil
end

teardown do
if @p
@p.stop unless @p.stopped?
Expand Down
4 changes: 2 additions & 2 deletions test/plugin/test_in_monitor_agent.rb
Original file line number Diff line number Diff line change
Expand Up @@ -159,7 +159,7 @@ def test_configure
d = create_driver("
@type monitor_agent
bind '127.0.0.1'
port #{@port}
port 24200
tag monitor
emit_interval 1
")
Expand Down Expand Up @@ -210,7 +210,7 @@ def get(uri, header = {})
<source>
@type monitor_agent
bind "127.0.0.1"
port 24220
port #{@port}
tag monitor
@id monitor_agent
</source>
Expand Down
2 changes: 1 addition & 1 deletion test/plugin/test_in_tail.rb
Original file line number Diff line number Diff line change
Expand Up @@ -74,7 +74,7 @@ def test_configure_encoding
def test_configure_from_encoding
# If only specified from_encoding raise ConfigError
assert_raise(Fluent::ConfigError) do
d = create_driver(SINGLE_LINE_CONFIG + 'from_encoding utf-8')
create_driver(SINGLE_LINE_CONFIG + 'from_encoding utf-8')
end

# valid setting
Expand Down
1 change: 1 addition & 0 deletions test/plugin/test_out_forward.rb
Original file line number Diff line number Diff line change
Expand Up @@ -454,6 +454,7 @@ def initialize(sock, log, on_message)
option
}
@source = nil
@peeraddr = nil
end

if do_respond
Expand Down

0 comments on commit 145c17a

Please sign in to comment.