提交 916bebaa authored 作者: Noel Grandin's avatar Noel Grandin

use nanoTime() to fix occasional spurious test failure

上级 8516540e
......@@ -50,14 +50,14 @@ public class TestQueryCache extends TestBase {
// stat.execute("set mode regular");
// stat.execute("create table x()");
// stat.execute("drop table x");
time = System.currentTimeMillis();
time = System.nanoTime();
prep = conn.prepareStatement("select count(*) from test t1, test t2");
prep.executeQuery();
rs = stat.executeQuery("select count(*) from test t1, test t2");
rs.next();
int c = rs.getInt(1);
assertEquals(1000000, c);
time = System.currentTimeMillis() - time;
time = System.nanoTime() - time;
if (first == 0) {
first = time;
} else {
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论