use of com.newrelic.agent.tracers.SqlTracerExplainInfo in project newrelic-java-agent by newrelic.
the class DefaultExplainPlanExecutorTest method testMultipleStatementNoExplainPlan.
@Test
public void testMultipleStatementNoExplainPlan() throws SQLException {
SqlTracerExplainInfo tracer = createSqlTracerInfo("SELECT * FROM users; SELECT * FROM users");
DefaultExplainPlanExecutor explainPlanExecutor = new DefaultExplainPlanExecutor(tracer, (String) tracer.getSql(), RecordSql.raw);
explainPlanExecutor.runExplainPlan(null, null, new DatabaseVendor() {
@Override
public String getName() {
return "MyDBVendor";
}
@Override
public String getType() {
return "MyDB";
}
@Override
public boolean isExplainPlanSupported() {
return true;
}
@Override
public String getExplainPlanSql(String sql) throws SQLException {
return sql;
}
@Override
public Collection<Collection<Object>> parseExplainPlanResultSet(int columnCount, ResultSet rs, RecordSql recordSql) throws SQLException {
return null;
}
@Override
public String getExplainPlanFormat() {
return null;
}
@Override
public DatastoreVendor getDatastoreVendor() {
return DatastoreVendor.JDBC;
}
});
assertFalse(tracer.hasExplainPlan());
}
Aggregations