diff --git a/bookkeeper-server/src/test/java/org/apache/bookkeeper/client/TestRegionAwareEnsemblePlacementPolicy.java b/bookkeeper-server/src/test/java/org/apache/bookkeeper/client/TestRegionAwareEnsemblePlacementPolicy.java index e254b76f034..4f5bf086215 100644 --- a/bookkeeper-server/src/test/java/org/apache/bookkeeper/client/TestRegionAwareEnsemblePlacementPolicy.java +++ b/bookkeeper-server/src/test/java/org/apache/bookkeeper/client/TestRegionAwareEnsemblePlacementPolicy.java @@ -80,6 +80,7 @@ public class TestRegionAwareEnsemblePlacementPolicy extends TestCase { static void updateMyRack(String rack) throws Exception { StaticDNSResolver.addNodeToRack(InetAddress.getLocalHost().getHostAddress(), rack); StaticDNSResolver.addNodeToRack(InetAddress.getLocalHost().getHostName(), rack); + StaticDNSResolver.addNodeToRack(InetAddress.getLocalHost().getCanonicalHostName(), rack); BookieSocketAddress bookieAddress = new BookieSocketAddress( InetAddress.getLocalHost().getHostAddress(), 0); StaticDNSResolver.addNodeToRack(bookieAddress.getSocketAddress().getHostName(), rack);