提交 8c27fab0 authored 作者: noelgrandin's avatar noelgrandin

make sure to clean up the CancelThread. Sometimes this test fails and then the…

make sure to clean up the CancelThread. Sometimes this test fails and then the cancel thread hangs around.
上级 19cae1cd
......@@ -177,12 +177,15 @@ public class TestCancel extends TestBase {
CancelThread cancel = new CancelThread(query, i);
visit(0);
cancel.start();
try {
Thread.yield();
assertThrows(ErrorCode.STATEMENT_WAS_CANCELED, query).
executeQuery("SELECT VISIT(ID), (SELECT SUM(X) " +
"FROM SYSTEM_RANGE(1, 10000) WHERE X<>ID) FROM TEST ORDER BY ID");
} finally {
cancel.stopNow();
cancel.join();
}
if (lastVisited == 0) {
i += 10;
} else {
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论