private int createLocator() {
    locatorLauncher = new LocatorLauncher.Builder()
        .setMemberName(locatorName)
        .setWorkingDirectory(locatorDir.getAbsolutePath())
        .setPort(AvailablePortHelper.getRandomAvailableTCPPort())
        .set(DISABLE_AUTO_RECONNECT, "false")
        .set(ENABLE_CLUSTER_CONFIGURATION, "false")
        .set(MAX_WAIT_TIME_RECONNECT, "1000")
        .set(MEMBER_TIMEOUT, "2000")
        .build();

    locatorLauncher.start();

    system = (InternalDistributedSystem) locatorLauncher.getCache().getDistributedSystem();

    return locatorLauncher.getPort();
  }
Distributed tests for logging during reconnect.
geode-core/src/distributedTest/java/org/apache/geode/logging/internal/LoggingWithReconnectDistributedTest.java