Sha256: c1831c8b1f7fb54013ea8b680bb9d26d0197ae50d214cd1fd3d1e1294f3afcd4

Contents?: true

Size: 1.02 KB

Versions: 10

Compression:

Stored size: 1.02 KB

Contents

# simplecov must be loaded before any of target code
if ENV['SIMPLE_COV']
  require 'simplecov'
  if defined?(SimpleCov::SourceFile)
    mod = SimpleCov::SourceFile
    def mod.new(*args, &block)
      m = allocate
      m.instance_eval do
        begin
          initialize(*args, &block)
        rescue Encoding::UndefinedConversionError
          @src = "".force_encoding('UTF-8')
        end
      end
      m
    end
  end
  unless SimpleCov.running
    SimpleCov.start do
      add_filter '/test/'
      add_filter '/gems/'
    end
  end
end

require 'test/unit'
require 'fileutils'
require 'fluent/log'
require 'fluent/test'
require 'rr'

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

def unused_port
  s = TCPServer.open(0)
  port = s.addr[1]
  s.close
  port
end

def ipv6_enabled?
  require 'socket'

  begin
    TCPServer.open("::1", 0)
    true
  rescue
    false
  end
end

$log = Fluent::Log.new(Fluent::Test::DummyLogDevice.new, Fluent::Log::LEVEL_WARN)

Version data entries

10 entries across 10 versions & 1 rubygems

Version Path
fluentd-0.10.62 test/helper.rb
fluentd-0.10.61 test/helper.rb
fluentd-0.10.60 test/helper.rb
fluentd-0.10.59 test/helper.rb
fluentd-0.10.58 test/helper.rb
fluentd-0.10.57 test/helper.rb
fluentd-0.12.0.pre.2 test/helper.rb
fluentd-0.10.56 test/helper.rb
fluentd-0.10.55 test/helper.rb
fluentd-0.10.54 test/helper.rb