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
1 changed files with 82 additions and 76 deletions

View File

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