提交 032b35b7 authored 作者: Thomas Mueller Graf's avatar Thomas Mueller Graf

Improved test case

上级 e8725b5f
...@@ -177,11 +177,16 @@ public class TestMemoryUsage extends TestBase { ...@@ -177,11 +177,16 @@ public class TestMemoryUsage extends TestBase {
} }
int base = Utils.getMemoryUsed(); int base = Utils.getMemoryUsed();
stat.execute("create index idx_test_id on test(id)"); stat.execute("create index idx_test_id on test(id)");
System.gc(); for (int i = 0;; i++) {
System.gc(); System.gc();
int used = Utils.getMemoryUsed(); int used = Utils.getMemoryUsed() - base;
if ((used - base) > getSize(7500, 12000)) { if (used <= getSize(7500, 12000)) {
fail("Used: " + (used - base)); break;
}
if (i < 16) {
continue;
}
fail("Used: " + used);
} }
stat.execute("drop table test"); stat.execute("drop table test");
conn.close(); conn.close();
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论