enchance testcase

This commit is contained in:
wenshao
2012-08-06 20:49:51 +08:00
parent ac2b0f6a1a
commit fa33267fc3
@@ -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));
}
}