Skip to content

Commit

Permalink
HDDS-10132. TestStorageContainerManager.testScmProcessDatanodeHeartbe…
Browse files Browse the repository at this point in the history
…at fails with Java 17 (apache#6516)
  • Loading branch information
raju-balpande authored Apr 12, 2024
1 parent a523fd9 commit c63e2b9
Showing 1 changed file with 6 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -167,6 +167,7 @@
*/
@Timeout(900)
public class TestStorageContainerManager {
private static final String LOCALHOST_IP = "127.0.0.1";
private static XceiverClientManager xceiverClientManager;
private static final Logger LOG = LoggerFactory.getLogger(
TestStorageContainerManager.class);
Expand Down Expand Up @@ -693,11 +694,15 @@ public void testScmInfo(@TempDir Path tempDir) throws Exception {
*/
@Test
public void testScmProcessDatanodeHeartbeat() throws Exception {
String rackName = "/rack1";
OzoneConfiguration conf = new OzoneConfiguration();
conf.setClass(NET_TOPOLOGY_NODE_SWITCH_MAPPING_IMPL_KEY,
StaticMapping.class, DNSToSwitchMapping.class);
StaticMapping.addNodeToRack(NetUtils.normalizeHostName(HddsUtils.getHostName(conf)),
"/rack1");
rackName);
// In case of JDK17, the IP address is resolved to localhost mapped to 127.0.0.1 which is not in sync with JDK8
// and hence need to make following entry under HDDS-10132
StaticMapping.addNodeToRack(LOCALHOST_IP, rackName);

final int datanodeNum = 3;

Expand Down

0 comments on commit c63e2b9

Please sign in to comment.