Use NetUtil.getHostNameOrAddress instead of localhost
in ServerStarterClusterIntegrationTest
*/
package org.apache.pinot.integration.tests;
+import java.net.InetAddress;
import org.apache.commons.configuration.Configuration;
import org.apache.commons.configuration.PropertiesConfiguration;
import org.apache.helix.HelixManager;
import org.apache.helix.PropertyKey;
import org.apache.helix.model.InstanceConfig;
import org.apache.pinot.common.utils.CommonConstants;
+import org.apache.pinot.common.utils.NetUtil;
import org.apache.pinot.common.utils.ZkStarter;
import org.apache.pinot.controller.helix.ControllerTest;
import org.apache.pinot.server.starter.helix.HelixServerStarter;
@@ -143,6 +145,7 @@ public class ServerStarterIntegrationTest extends ControllerTest {
new HelixServerStarter(getHelixClusterName(), ZkStarter.DEFAULT_ZK_STR, serverConf);
// Verify the serverId, host and port are set correctly in Zk.
- verifyZkConfigData(helixServerStarter, "Server_localhost_8098", "Server_localhost", "8098");
+ String hostName = NetUtil.getHostnameOrAddress();
+ verifyZkConfigData(helixServerStarter, "Server_" + hostName + "_8098", "Server_" + hostName, "8098");
}
}
