diff --git a/test/plugin/in_tail/test_position_file.rb b/test/plugin/in_tail/test_position_file.rb index 6e31fa816b..465b048403 100644 --- a/test/plugin/in_tail/test_position_file.rb +++ b/test/plugin/in_tail/test_position_file.rb @@ -6,7 +6,7 @@ class IntailPositionFileTest < Test::Unit::TestCase setup do - @file = Tempfile.new('intail_position_file_test') + @file = Tempfile.new('intail_position_file_test').binmode end teardown do diff --git a/test/plugin/test_in_forward.rb b/test/plugin/test_in_forward.rb index 6723bdee56..a6386f0f04 100644 --- a/test/plugin/test_in_forward.rb +++ b/test/plugin/test_in_forward.rb @@ -218,7 +218,7 @@ def create_driver(conf=CONFIG) } end - assert_equal(records, d.events.sort_by {|a| a[1] }) + assert_equal(records, d.events.sort_by {|a| a[0] }) end test 'json_with_newline' do @@ -237,7 +237,7 @@ def create_driver(conf=CONFIG) } end - assert_equal(records, d.events.sort_by {|a| a[1] }) + assert_equal(records, d.events.sort_by {|a| a[0] }) end end diff --git a/test/plugin/test_out_forward.rb b/test/plugin/test_out_forward.rb index 8d4d7fd437..746972ca58 100644 --- a/test/plugin/test_out_forward.rb +++ b/test/plugin/test_out_forward.rb @@ -997,7 +997,11 @@ def plugin_id_for_test? e = assert_raise Fluent::UnrecoverableError do d.instance_start end - assert_match(/Connection refused/, e.message) + if Fluent.windows? + assert_match(/No connection could be made because the target machine actively refused it/, e.message) + else + assert_match(/Connection refused/, e.message) + end d.instance_shutdown end