Sha256: bbacb30d862b987cfcfb68458719e4777bec5a2789618e832f53d0d407c2bed7
Contents?: true
Size: 774 Bytes
Versions: 29
Compression:
Stored size: 774 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::Agent.instance.service = NewRelic::FakeService.new 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
29 entries across 29 versions & 3 rubygems