提交 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)");
for (int i = 0;; i++) {
System.gc(); System.gc();
System.gc(); int used = Utils.getMemoryUsed() - base;
int used = Utils.getMemoryUsed(); if (used <= getSize(7500, 12000)) {
if ((used - base) > getSize(7500, 12000)) { break;
fail("Used: " + (used - base)); }
if (i < 16) {
continue;
}
fail("Used: " + used);
} }
stat.execute("drop table test"); stat.execute("drop table test");
conn.close(); conn.close();
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论