diff --git a/spring-data-geode/src/test/java/org/springframework/data/gemfire/config/annotation/SecurityManagerSecuredLocatorToLocatorApplicationIntegrationTests.java b/spring-data-geode/src/test/java/org/springframework/data/gemfire/config/annotation/SecurityManagerSecuredLocatorToLocatorApplicationIntegrationTests.java index 3f10fb86..f5396c06 100644 --- a/spring-data-geode/src/test/java/org/springframework/data/gemfire/config/annotation/SecurityManagerSecuredLocatorToLocatorApplicationIntegrationTests.java +++ b/spring-data-geode/src/test/java/org/springframework/data/gemfire/config/annotation/SecurityManagerSecuredLocatorToLocatorApplicationIntegrationTests.java @@ -17,10 +17,7 @@ package org.springframework.data.gemfire.config.annotation; import static org.assertj.core.api.Assertions.assertThat; -import java.io.File; -import java.io.FileFilter; import java.io.IOException; -import java.util.Arrays; import org.junit.AfterClass; import org.junit.BeforeClass; @@ -33,10 +30,7 @@ import org.apache.geode.distributed.Locator; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.context.annotation.Profile; import org.springframework.data.gemfire.tests.integration.ForkingClientServerIntegrationTestsSupport; -import org.springframework.data.gemfire.tests.integration.IntegrationTestsSupport; import org.springframework.data.gemfire.tests.process.ProcessWrapper; -import org.springframework.data.gemfire.tests.util.FileSystemUtils; -import org.springframework.data.gemfire.util.ArrayUtils; import org.springframework.test.context.ActiveProfiles; import org.springframework.test.context.ContextConfiguration; import org.springframework.test.context.junit4.SpringRunner; @@ -70,8 +64,6 @@ public class SecurityManagerSecuredLocatorToLocatorApplicationIntegrationTests @BeforeClass public static void startGeodeLocator() throws IOException { - cleanupAnyExistingGeodeLocatorFiles(); - int locatorPort = findAndReserveAvailablePort(); locatorProcess= run(LocatorAuthServer.class, @@ -83,20 +75,6 @@ public class SecurityManagerSecuredLocatorToLocatorApplicationIntegrationTests System.setProperty("spring.data.gemfire.locators", String.format("localhost[%d]", locatorPort)); } - private static void cleanupAnyExistingGeodeLocatorFiles() { - - FileFilter locatorFiles = file -> file != null && file.getName().startsWith("locator"); - - FileFilter configDiskDirFiles = file -> file != null && file.isDirectory() - && file.getName().startsWith("ConfigDiskDir"); - - Arrays.stream(ArrayUtils.nullSafeArray(FileSystemUtils.WORKING_DIRECTORY.listFiles(locatorFiles), File.class)) - .forEach(File::delete); - - Arrays.stream(ArrayUtils.nullSafeArray(FileSystemUtils.WORKING_DIRECTORY.listFiles(configDiskDirFiles), File.class)) - .forEach(IntegrationTestsSupport::removeRecursiveDirectory); - } - @AfterClass public static void stopGeodeLocator() { System.clearProperty("spring.data.gemfire.locators");