test/helper.rb in fluent-plugin-cat-sweep-0.1.5 vs test/helper.rb in fluent-plugin-cat-sweep-0.2.0
- old
+ new
@@ -1,34 +1,9 @@
require 'test/unit'
require 'fluent/version'
-require 'fluent/log'
require 'fluent/test'
-
-unless defined?(Test::Unit::AssertionFailedError)
- class Test::Unit::AssertionFailedError < StandardError
- end
-end
-
-# Reduce sleep period at
-# https://github.com/fluent/fluentd/blob/a271b3ec76ab7cf89ebe4012aa5b3912333dbdb7/lib/fluent/test/base.rb#L81
-module Fluent
- module Test
- class TestDriver
- def run(num_waits = 10, &block)
- @instance.start
- begin
- # wait until thread starts
- # num_waits.times { sleep 0.05 }
- sleep 0.05
- return yield
- ensure
- @instance.shutdown
- end
- end
- end
- end
-end
-
+require 'fluent/test/helpers'
+require 'fluent/test/driver/input'
def current_fluent_version
fluent_version(Fluent::VERSION)
end