Sha256: 5225979aef0db94de0929f1612da526cef46c4e0ca2c1b9fe9f2c289d3fb7643

Contents?: true

Size: 610 Bytes

Versions: 9

Compression:

Stored size: 610 Bytes

Contents

require 'test/unit'
require 'fluent/log'
require 'fluent/test'

unless defined?(Test::Unit::AssertionFailedError)
  class Test::Unit::AssertionFailedError < StandardError
  end
end

# Stop non required sleep at
# https://github.com/fluent/fluentd/blob/018791f6b1b0400b71e37df2fb3ad80e456d2c11/lib/fluent/test/base.rb#L56
module Fluent
  module Test
    class TestDriver
      def run(&block)
        @instance.start
        begin
          # wait until thread starts
          # 10.times { sleep 0.05 }
          return yield
        ensure
          @instance.shutdown
        end
      end
    end
  end
end

Version data entries

9 entries across 9 versions & 2 rubygems

Version Path
fluent-plugin-record-reformer-0.7.2 test/helper.rb
fluent-plugin-record-reformer-0.7.1 test/helper.rb
fluent-plugin-record-reformer-0.7.0 test/helper.rb
fluent-plugin-record-reformer-0.6.3 test/helper.rb
fluent-plugin-record-reformer-0.6.2 test/helper.rb
fluent-plugin-record-reformer-0.6.1 test/helper.rb
fluent-plugin-grep-0.3.4 test/helper.rb
fluent-plugin-record-reformer-0.6.0 test/helper.rb
fluent-plugin-record-reformer-0.5.0 test/helper.rb