Sha256: 8531ccdfc495baaccaf73c38c138a32c9b250990a1062c57fb822904872a65ed
Contents?: true
Size: 698 Bytes
Versions: 56
Compression:
Stored size: 698 Bytes
Contents
module TestContexts def with_running_agent context 'with running agent' do # this is needed for the nested setups setup do @log_data = StringIO.new @log = Logger.new(@log_data) NewRelic::Agent.manual_start :log => @log @agent = NewRelic::Agent.instance @agent.transaction_sampler.send :clear_builder @agent.transaction_sampler.reset! @agent.stats_engine.clear_stats end yield def teardown super NewRelic::Agent.shutdown @log_data.reset NewRelic::Control.instance['dispatcher']=nil NewRelic::Control.instance['dispatcher_instance_id']=nil end end end end
Version data entries
56 entries across 56 versions & 4 rubygems