Skip to content

Commit

Permalink
Merge pull request #3968 from fluent/fix-3885
Browse files Browse the repository at this point in the history
undefined
  • Loading branch information
ashie authored Nov 23, 2022
2 parents 971087e + 8725834 commit 79eb77a
Showing 1 changed file with 14 additions and 18 deletions.
32 changes: 14 additions & 18 deletions test/plugin/test_out_forward.rb
Original file line number Diff line number Diff line change
Expand Up @@ -1331,26 +1331,22 @@ def plugin_id_for_test?
d = create_driver(output_conf)
d.instance_start

begin
chunk = Fluent::Plugin::Buffer::MemoryChunk.new(Fluent::Plugin::Buffer::Metadata.new(nil, nil, nil))
mock.proxy(d.instance).socket_create_tcp(TARGET_HOST, @target_port,
linger_timeout: anything,
send_timeout: anything,
recv_timeout: anything,
connect_timeout: anything) { |sock|
mock(sock).close.once; sock
}.twice

target_input_driver.run(timeout: 15) do
d.run(shutdown: false) do
node = d.instance.nodes.first
2.times do
node.send_data('test', chunk) rescue nil
end
chunk = Fluent::Plugin::Buffer::MemoryChunk.new(Fluent::Plugin::Buffer::Metadata.new(nil, nil, nil))
mock.proxy(d.instance).socket_create_tcp(TARGET_HOST, @target_port,
linger_timeout: anything,
send_timeout: anything,
recv_timeout: anything,
connect_timeout: anything) { |sock|
mock(sock).close.once; sock
}.twice

target_input_driver.run(timeout: 15) do
d.run do
node = d.instance.nodes.first
2.times do
node.send_data('test', chunk) rescue nil
end
end
ensure
d.instance_shutdown
end
end
end
Expand Down

0 comments on commit 79eb77a

Please sign in to comment.