@@ -0,0 +1,1994 @@
+package alluxio.master.block;%0A%0Aimport alluxio.AlluxioURI;%0Aimport alluxio.client.WriteType;%0Aimport alluxio.client.file.FileSystem;%0Aimport alluxio.client.file.FileSystemTestUtils;%0Aimport alluxio.client.file.URIStatus;%0Aimport alluxio.exception.BlockInfoException;%0Aimport alluxio.master.LocalAlluxioCluster;%0Aimport alluxio.master.MasterRegistry;%0Aimport alluxio.master.MasterTestUtils;%0Aimport alluxio.wire.WorkerNetAddress;%0Aimport org.junit.Assert;%0Aimport org.junit.Before;%0Aimport org.junit.Test;%0A%0Aimport java.util.concurrent.ExecutorService;%0A%0Aimport static org.junit.Assert.fail;%0A%0A/**%0A * Integration test for block master functionality.%0A */%0Apublic class BlockMasterIntegrationTest %7B%0A%0A  private ExecutorService mExecutorsForClient;%0A  private LocalAlluxioCluster mCluster;%0A%0A  @Before%0A  public void before() throws Exception %7B%0A    mCluster = new LocalAlluxioCluster();%0A    mCluster.initConfiguration();%0A    mCluster.start();%0A  %7D%0A%0A  @Test%0A  public void journalBlockDeletion() throws Exception %7B%0A    FileSystem fs = mCluster.getClient();%0A    BlockMaster blockMaster = mCluster.getLocalAlluxioMaster().getMasterProcess().getMaster(BlockMaster.class);%0A    AlluxioURI file = new AlluxioURI(%22/test%22);%0A    FileSystemTestUtils.createByteFile(fs, file, WriteType.MUST_CACHE, 10);%0A    URIStatus status = fs.getStatus(file);%0A    Long blockId = status.getBlockIds().get(0);%0A    Assert.assertNotNull(blockMaster.getBlockInfo(blockId));%0A    fs.delete(file);%0A    WorkerNetAddress workerAddress = mCluster.getWorkerAddress();%0A    try %7B%0A      blockMaster.getBlockInfo(blockId);%0A      fail(%22Expected the block to be deleted%22);%0A    %7D catch (BlockInfoException e) %7B%0A      // expected%0A    %7D%0A    mCluster.stop();%0A    MasterRegistry registry = MasterTestUtils.createLeaderFileSystemMasterFromJournal();%0A    try %7B%0A      registry.get(BlockMaster.class).getBlockInfo(blockId);%0A      fail(%22Expected the block to be deleted after restart%22);%0A    %7D catch (BlockInfoException e) %7B%0A      // expected%0A    %7D%0A    registry.stop();%0A  %7D%0A%7D%0A

Add test for block deletion journaling