提交 d8c5ebaa authored 作者: Thomas Mueller's avatar Thomas Mueller

Fix test case

上级 1b411309
......@@ -1008,15 +1008,19 @@ public class TestMetaData extends TestBase {
assertFalse(rs.next());
rs.close();
stat.execute("SET QUERY_STATISTICS TRUE");
stat.execute("select * from test limit 10");
stat.execute("select * from test limit 10");
int count = 100;
for (int i = 0; i < count; i++) {
stat.execute("select * from test limit 10");
}
// The "order by" makes the result set more stable on windows, where the
// timer resolution is not that great
rs = stat.executeQuery("select * from INFORMATION_SCHEMA.QUERY_STATISTICS ORDER BY EXECUTION_COUNT");
rs = stat.executeQuery(
"select * from INFORMATION_SCHEMA.QUERY_STATISTICS " +
"ORDER BY EXECUTION_COUNT desc");
assertTrue(rs.next());
assertEquals("select * from test limit 10", rs.getString("SQL_STATEMENT"));
assertEquals(2, rs.getInt("EXECUTION_COUNT"));
assertEquals(20, rs.getInt("CUMULATIVE_ROW_COUNT"));
assertEquals(count, rs.getInt("EXECUTION_COUNT"));
assertEquals(10 * count, rs.getInt("CUMULATIVE_ROW_COUNT"));
rs.close();
conn.close();
deleteDb("metaData");
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论