Skip to content

Commit

Permalink
make input plugin instance sure to listen
Browse files Browse the repository at this point in the history
  • Loading branch information
tagomoris committed Aug 4, 2016
1 parent 0d5dd22 commit f0a01fb
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions test/plugin/test_out_forward.rb
Original file line number Diff line number Diff line change
Expand Up @@ -420,6 +420,8 @@ def test_authentication_with_shared_key
]

target_input_driver.run do
sleep 0.1 until target_input_driver.instance.instance_eval{ @thread } && target_input_driver.instance.instance_eval{ @thread }.status

d.run do
records.each do |record|
d.emit(record, time)
Expand All @@ -434,6 +436,7 @@ def test_authentication_with_shared_key
end

emits = target_input_driver.emits
assert{ emits != [] }
assert_equal(['test', time, records[0]], emits[0])
assert_equal(['test', time, records[1]], emits[1])
end
Expand Down Expand Up @@ -480,6 +483,8 @@ def test_authentication_with_user_auth
]

target_input_driver.run do
sleep 0.1 until target_input_driver.instance.instance_eval{ @thread } && target_input_driver.instance.instance_eval{ @thread }.status

d.run do
records.each do |record|
d.emit(record, time)
Expand All @@ -494,6 +499,7 @@ def test_authentication_with_user_auth
end

emits = target_input_driver.emits
assert{ emits != [] }
assert_equal(['test', time, records[0]], emits[0])
assert_equal(['test', time, records[1]], emits[1])
end
Expand Down

0 comments on commit f0a01fb

Please sign in to comment.