HDFS-12750. Ozone: Fix TestStorageContainerManager#testBlockDeletionTransactions. Contributed by Xiaoyu Yao.

This commit is contained in:
Weiwei Yang 2017-11-01 17:17:03 +08:00 committed by Owen O'Malley
parent 0760418bec
commit 0559265822

View File

@ -175,6 +175,7 @@ public void testBlockDeletionTransactions() throws Exception {
new MiniOzoneCluster.Builder(conf).numDataNodes(1)
.setHandlerType(OzoneConsts.OZONE_HANDLER_DISTRIBUTED).build();
try {
DeletedBlockLog delLog = cluster.getStorageContainerManager()
.getScmBlockManager().getDeletedBlockLog();
Assert.assertEquals(0, delLog.getNumOfValidTransactions());
@ -261,5 +262,10 @@ public void testBlockDeletionTransactions() throws Exception {
return false;
}
}, 1000, 10000);
} finally {
if (cluster != null) {
cluster.shutdown();
}
}
}
}