Sha256: 8bf8ea2137e812f77cc8c6a5585f9e42a867c7176b89fbbad0f18c008ef12225

Contents?: true

Size: 799 Bytes

Versions: 2

Compression:

Stored size: 799 Bytes

Contents

require 'minitest_helper'
require 'rack/test'
require 'rack/lobster'
require 'oboe/inst/rack'

Oboe::Config[:tracing_mode] = 'always'
Oboe::Config[:sample_rate] = 1e6
    
class RackTestApp < Minitest::Test
  include Rack::Test::Methods

  def app
    @app = Rack::Builder.new {
      use Rack::CommonLogger
      use Rack::ShowExceptions
      use Oboe::Rack
      map "/lobster" do
        use Rack::Lint
        run Rack::Lobster.new
      end
    }
  end

  def test_localset_sample_source
    clear_all_traces 

    get "/lobster"

    traces = get_all_traces
    traces.count.must_equal 3

    validate_outer_layers(traces, 'rack')

    kvs = {} 
    kvs["SampleRate"] = "1000000"
    kvs["SampleSource"] = OBOE_SAMPLE_RATE_SOURCE_FILE.to_s
    validate_event_keys(traces[0], kvs)

  end
end

Version data entries

2 entries across 2 versions & 1 rubygems

Version Path
oboe-2.6.6.1 test/support/liboboe_settings_test.rb
oboe-2.6.5.5 test/support/liboboe_settings_test.rb