@Test
  public void doesNotCreateZeroPortViewFileForEphemeralPort() throws Exception {
    deleteLocatorViewFile(0);

    Properties configProperties = new Properties();
    configProperties.setProperty(ENABLE_CLUSTER_CONFIGURATION, "false");
    configProperties.setProperty(HTTP_SERVICE_PORT, "0");
    configProperties.setProperty(JMX_MANAGER, "false");
    configProperties.setProperty(LOG_FILE, "");
    configProperties.setProperty(MCAST_PORT, "0");

    locator = Locator.startLocatorAndDS(port, null, configProperties);

    File viewFile = new File("locator0view.dat");

    assertThat(viewFile).doesNotExist();
  }
Fix: locator creates "locator0view.dat" file when started with port 0
geode-core/src/integrationTest/java/org/apache/geode/distributed/LocatorIntegrationTest.java