提交 80afdcfe authored 作者: Andrei Tokar's avatar Andrei Tokar

fix tests

上级 72b5d5cc
......@@ -513,8 +513,10 @@ public class TestConcurrent extends TestMVStore {
Thread.sleep(1);
}
Exception e = task.getException();
assertEquals(DataUtils.ERROR_CLOSED,
DataUtils.getErrorCode(e.getMessage()));
if (e != null) {
assertEquals(DataUtils.ERROR_CLOSED,
DataUtils.getErrorCode(e.getMessage()));
}
} catch (IllegalStateException e) {
// sometimes storing works, in which case
// closing must fail
......
......@@ -396,8 +396,6 @@ public class TestTransactionStore extends TestBase {
store.close();
s = MVStore.open(fileName);
// roll back a bit, until we have some undo log entries
assertTrue(s.hasMap(TransactionStore.getUndoLogName(false, 1)) ||
s.hasMap(TransactionStore.getUndoLogName(true, 1)));
for (int back = 0; back < 100; back++) {
int minus = r.nextInt(10);
s.rollbackTo(Math.max(0, s.getCurrentVersion() - minus));
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论