@@ -0,0 +1,2309 @@
+/*%0A * The Alluxio Open Foundation licenses this work under the Apache License, version 2.0%0A * (the %22License%22). You may not use this work except in compliance with the License, which is%0A * available at www.apache.org/licenses/LICENSE-2.0%0A *%0A * This software is distributed on an %22AS IS%22 basis, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND,%0A * either express or implied, as more fully set forth in the License.%0A *%0A * See the NOTICE file distributed with this work for information regarding copyright ownership.%0A */%0A%0Apackage alluxio.server.ft.journal;%0A%0Aimport static org.junit.Assert.assertEquals;%0Aimport static org.junit.Assert.assertTrue;%0A%0Aimport alluxio.AlluxioURI;%0Aimport alluxio.PropertyKey;%0Aimport alluxio.client.file.FileSystem;%0Aimport alluxio.client.file.URIStatus;%0Aimport alluxio.client.file.options.DeleteOptions;%0Aimport alluxio.master.LocalAlluxioCluster;%0Aimport alluxio.testutils.BaseIntegrationTest;%0Aimport alluxio.testutils.LocalAlluxioClusterResource;%0A%0Aimport org.junit.Before;%0Aimport org.junit.Rule;%0Aimport org.junit.Test;%0Aimport org.junit.rules.TemporaryFolder;%0A%0Aimport java.util.List;%0A%0A/**%0A * Tests which perform master operations, then restart master and verify its state.%0A */%0Apublic final class JournalReplayIntegrationTest extends BaseIntegrationTest %7B%0A  @Rule%0A  public LocalAlluxioClusterResource mClusterResource =%0A      new LocalAlluxioClusterResource.Builder()%0A          .setProperty(PropertyKey.MASTER_JOURNAL_TAILER_SHUTDOWN_QUIET_WAIT_TIME_MS, 0)%0A          .setNumWorkers(0)%0A          .build();%0A%0A  @Rule%0A  public TemporaryFolder mFolder = new TemporaryFolder();%0A%0A  private LocalAlluxioCluster mCluster;%0A  private FileSystem mFs;%0A%0A  @Before%0A  public void before() throws Exception %7B%0A    mCluster = mClusterResource.get();%0A    mFs = mCluster.getClient();%0A  %7D%0A%0A  @Test%0A  public void mountDeleteMount() throws Exception %7B%0A    AlluxioURI alluxioPath = new AlluxioURI(%22/mnt%22);%0A    AlluxioURI ufsPath = new AlluxioURI(mFolder.newFolder().getAbsolutePath());%0A    mFs.mount(alluxioPath, ufsPath);%0A    mFs.delete(alluxioPath, DeleteOptions.defaults().setRecursive(true));%0A    mFs.mount(alluxioPath, ufsPath);%0A    mCluster.restartMasters();%0A    List%3CURIStatus%3E status = mFs.listStatus(new AlluxioURI(%22/%22));%0A    assertEquals(1, status.size());%0A    assertTrue(status.get(0).isMountPoint());%0A  %7D%0A%7D%0A

Add mount-delete-mount journal replay test (#8058)