use of com.newrelic.agent.sql.SqlTrace in project newrelic-java-agent by newrelic.
the class RequestUriConfigTests method runSqlTest.
public void runSqlTest(RequestUriConfigSqlTest test) throws Exception {
setupConfig(test);
// run a transaction
Tracer requestDispatcherTracer = startDispatcherTracer(test.getTxnName());
long duration = 501000000;
startSqlTracer(test.sql, duration).finish(Opcodes.RETURN, null);
requestDispatcherTracer.finish(Opcodes.RETURN, null);
MockRPMService mockRPMService = runHarvest();
// verify results
List<SqlTrace> sqlTraces = mockRPMService.getSqlTraces();
matchUri(test.getExpectedUriValues(), sqlTraces.get(0).getUri());
}
Aggregations