Skip to content

Commit

Permalink
Change method name to proper name
Browse files Browse the repository at this point in the history
Signed-off-by: Yuta Iwama <ganmacs@gmail.com>
  • Loading branch information
ganmacs committed Jul 26, 2019
1 parent 8940b4d commit 134070d
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 5 deletions.
2 changes: 1 addition & 1 deletion lib/fluent/plugin/out_forward.rb
Original file line number Diff line number Diff line change
Expand Up @@ -422,7 +422,7 @@ def ack_reader
end

while thread_current_running?
@ack_handler.ack_reader(select_interval) do |chunk_id, node, sock, result|
@ack_handler.collect_response(select_interval) do |chunk_id, node, sock, result|
@connection_manager.close(sock)

case result
Expand Down
2 changes: 1 addition & 1 deletion lib/fluent/plugin/out_forward/ack_handler.rb
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ def initialize(timeout, log:, read_length:)
@unpacker = Fluent::Engine.msgpack_unpacker
end

def ack_reader(select_interval)
def collect_response(select_interval)
now = Fluent::Clock.now
sockets = []
results = []
Expand Down
6 changes: 3 additions & 3 deletions test/plugin/out_forward/test_ack_handler.rb
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ class AckHandlerTest < Test::Unit::TestCase
ack.enqueue(r)

a1 = a2 = a3 = a4 = nil
ack_handler.ack_reader(1) do |cid, n, s, ret|
ack_handler.collect_response(1) do |cid, n, s, ret|
# This block is rescued by ack_handler so it needs to invoke assetion outside of this block
a1 = cid; a2 = n; a3 = s; a4 = ret
end
Expand Down Expand Up @@ -55,7 +55,7 @@ class AckHandlerTest < Test::Unit::TestCase
ack.enqueue(r)

a1 = a2 = a3 = a4 = nil
ack_handler.ack_handler(1) do |cid, n, s, ret|
ack_handler.collect_response(1) do |cid, n, s, ret|
# This block is rescued by ack_handler so it needs to invoke assetion outside of this block
a1 = cid; a2 = n; a3 = s; a4 = ret
end
Expand Down Expand Up @@ -84,7 +84,7 @@ class AckHandlerTest < Test::Unit::TestCase
ack.enqueue(r)

a1 = a2 = a3 = a4 = nil
ack_handler.ack_handler(1) do |cid, n, s, ret|
ack_handler.collect_response(1) do |cid, n, s, ret|
# This block is rescued by ack_handler so it needs to invoke assetion outside of this block
a1 = cid; a2 = n; a3 = s; a4 = ret
end
Expand Down

0 comments on commit 134070d

Please sign in to comment.