use of com.alibaba.druid.filter.stat.StatFilter in project druid by alibaba.
the class StatFilterTest3 method test_merge_nodbtype.
public void test_merge_nodbtype() throws Exception {
StatFilter filter = new StatFilter();
Assert.assertFalse(filter.isMergeSql());
filter.setMergeSql(true);
Assert.assertTrue(filter.isMergeSql());
Assert.assertNull(filter.getDbType());
Assert.assertEquals("SELECT *\n" + "FROM temp.test\n" + "ORDER BY id DESC\n" + "LIMIT ?", filter.mergeSql("select * from temp.test order by id desc limit 1"));
}
use of com.alibaba.druid.filter.stat.StatFilter in project druid by alibaba.
the class StatFilterConcurrentTest method setUp.
public void setUp() throws Exception {
dataSource = new DruidDataSource();
dataSource.setUrl("jdbc:mock:xxx");
dataSource.setMaxActive(100);
statFilter = new StatFilter();
dataSource.getProxyFilters().add(statFilter);
dataSource.setConnectionProperties("executeSleep=1");
}
Aggregations