diff --git a/hadoop-hdsl/server-scm/pom.xml b/hadoop-hdsl/server-scm/pom.xml index a6fcf3f7c74..802120be225 100644 --- a/hadoop-hdsl/server-scm/pom.xml +++ b/hadoop-hdsl/server-scm/pom.xml @@ -86,6 +86,10 @@ http://maven.apache.org/xsd/maven-4.0.0.xsd"> 1.3 test + + io.dropwizard.metrics + metrics-core + org.assertj assertj-core @@ -162,4 +166,4 @@ http://maven.apache.org/xsd/maven-4.0.0.xsd"> - \ No newline at end of file + diff --git a/hadoop-hdsl/server-scm/src/test/java/org/apache/hadoop/ozone/container/common/TestEndPoint.java b/hadoop-hdsl/server-scm/src/test/java/org/apache/hadoop/ozone/container/common/TestEndPoint.java index 825efaa252d..6f8cc2d915b 100644 --- a/hadoop-hdsl/server-scm/src/test/java/org/apache/hadoop/ozone/container/common/TestEndPoint.java +++ b/hadoop-hdsl/server-scm/src/test/java/org/apache/hadoop/ozone/container/common/TestEndPoint.java @@ -214,7 +214,7 @@ public class TestEndPoint { SCMRegisteredCmdResponseProto responseProto = rpcEndPoint.getEndPoint() .register(nodeToRegister.getProtoBufMessage(), scmAddressArray); Assert.assertNotNull(responseProto); - Assert.assertEquals(nodeToRegister.getUuid(), + Assert.assertEquals(nodeToRegister.getUuidString(), responseProto.getDatanodeUUID()); Assert.assertNotNull(responseProto.getClusterID()); } @@ -230,11 +230,10 @@ public class TestEndPoint { RegisterEndpointTask endpointTask = new RegisterEndpointTask(rpcEndPoint, conf); if (!clearDatanodeDetails) { - HdslProtos.DatanodeDetailsProto datanodeDetails = - HdslProtos.DatanodeDetailsProto.newBuilder() - .setUuid(UUID.randomUUID().toString()) - .build(); - endpointTask.setDatanodeDetailsProto(datanodeDetails); + DatanodeDetails datanodeDetails = TestUtils.getDatanodeDetails(); + HdslProtos.DatanodeDetailsProto datanodeDetailsProto = + datanodeDetails.getProtoBufMessage(); + endpointTask.setDatanodeDetailsProto(datanodeDetailsProto); } endpointTask.call(); return rpcEndPoint;