@Test
  public void infoRequestIncludesActualPortWhenSpecifiedPortIsZero() throws Exception {
    locator = Locator.startLocator(0, logFile);
    port = locator.getPort();
    TcpClient client = new TcpClient(
        SocketCreatorFactory.getSocketCreatorForComponent(LOCATOR),
        InternalDataSerializer.getDSFIDSerializer().getObjectSerializer(),
        InternalDataSerializer.getDSFIDSerializer().getObjectDeserializer(),
        TcpSocketFactory.DEFAULT);

    String[] info = client.getInfo(new HostAndPort("localhost", port));

    assertThat(info).isNotNull();
    assertThat(info.length).isGreaterThanOrEqualTo(1);
  }
Fix: if jmx-manager-start is true in a locator then gfsh connect will fail
geode-core/src/integrationTest/java/org/apache/geode/distributed/LocatorIntegrationTest.java