infinite_tracing/test/support/fake_trace_observer_helpers.rb
# simulates applying a server-side config to the agent instance.
# the sleep 0.01 allows us to choose whether to join and wait
# or set it up and continue with test scenario's flow.
simulates applying a server-side config to the agent instance.
the sleep 0.01 allows us to choose whether to join and wait
or set it up and continue with test scenario's flow.
simulates applying a server - side config to the agent instance . the sleep 0 . 01 allows us to choose whether to join and wait or set it up and continue with test scenario ' s flow .
def simulate_connect_to_collector config, delay=0.01
            thread = Thread.new do
              sleep delay
              NewRelic::Agent.instance.stubs(:connected?).returns(true)
              @response_handler.configure_agent config
            end
            yield thread
          ensure
            thread.kill
            NewRelic::Agent.instance.unstub(:connected?)
          end
def simulate_connect_to_collector config , delay = 0.01 thread = Thread . new do sleep delay NewRelic :: Agent . instance . stubs ( :connected? ) . returns ( true ) @response_handler . configure_agent config end yield thread ensure thread . kill NewRelic :: Agent . instance . unstub ( :connected? ) end
simulates applying a server-side config to the agent instance.
simulates applying a server - side config to the agent instance .
config
delay