mirror of
https://github.com/alibaba/druid.git
synced 2023-03-04 19:17:16 +00:00
enchance testcase
This commit is contained in:
@@ -82,5 +82,15 @@ public class StatFilterAfterResetTest extends TestCase {
|
||||
}
|
||||
|
||||
Assert.assertNotSame(sqlStat, dataSource.getDataSourceStat().getSqlStat(sql));
|
||||
|
||||
{
|
||||
Histogram histogram = sqlStat.getExecuteAndResultHoldTimeHistogram();
|
||||
Assert.assertEquals(0, histogram.getValue(0) + histogram.getValue(1) + histogram.getValue(2));
|
||||
}
|
||||
|
||||
sqlStat = dataSource.getDataSourceStat().getSqlStat(sql);
|
||||
|
||||
Histogram histogram = sqlStat.getExecuteAndResultHoldTimeHistogram();
|
||||
Assert.assertEquals(1, histogram.getValue(0) + histogram.getValue(1) + histogram.getValue(2));
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user