diff --git a/ethereum/p2p/src/test/java/org/hyperledger/besu/ethereum/p2p/peers/EnodeURLImplTest.java b/ethereum/p2p/src/test/java/org/hyperledger/besu/ethereum/p2p/peers/EnodeURLImplTest.java index b7cc2a06327..88e623f0ecd 100644 --- a/ethereum/p2p/src/test/java/org/hyperledger/besu/ethereum/p2p/peers/EnodeURLImplTest.java +++ b/ethereum/p2p/src/test/java/org/hyperledger/besu/ethereum/p2p/peers/EnodeURLImplTest.java @@ -500,7 +500,7 @@ public void toURI_WithHostnameShouldWorkWhenDnsEnabledAndUpdateEnabled() "enode://" + VALID_NODE_ID + "@" - + InetAddress.getLocalHost().getCanonicalHostName() + + InetAddress.getLocalHost().getHostName() + ":" + P2P_PORT; final URI expectedURI = URI.create(enodeURLString);