Search in sources :

Example 1 with NoOpInstrumentation

use of com.newrelic.agent.bridge.NoOpInstrumentation in project newrelic-java-agent by newrelic.

the class BaseMatchTest method testTrace.

@Test
public void testTrace() {
    final boolean[] success = { false };
    AgentBridge.instrumentation = new NoOpInstrumentation() {

        @Override
        public ExitTracer createTracer(Object invocationTarget, int signatureId, String metricName, int flags) {
            success[0] = true;
            return super.createTracer(invocationTarget, signatureId, metricName, flags);
        }
    };
    Assert.assertNull(child.justTrace());
    Assert.assertTrue(success[0]);
}
Also used : NoOpInstrumentation(com.newrelic.agent.bridge.NoOpInstrumentation) ExitTracer(com.newrelic.agent.bridge.ExitTracer) Test(org.junit.Test)

Aggregations

ExitTracer (com.newrelic.agent.bridge.ExitTracer)1 NoOpInstrumentation (com.newrelic.agent.bridge.NoOpInstrumentation)1 Test (org.junit.Test)1