Sha256: 41413603dfd57c5570f2d953f332aa74f2fc7ba4bd1c0b4699c5def5d22dcd19

Contents?: true

Size: 650 Bytes

Versions: 3

Compression:

Stored size: 650 Bytes

Contents

require 'test/unit'
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

Version data entries

3 entries across 3 versions & 2 rubygems

Version Path
fluent-plugin-record-reformer-0.8.1 test/helper.rb
fluent-plugin-record-reformer-0.8.0 test/helper.rb
fluent-plugin-cat-sweep-0.1.2 test/helper.rb