HDFS-13368. Ozone:TestEndPoint tests are failing consistently. Contributed by Shashikant Banerjee.

This commit is contained in:
Nanda kumar 2018-03-29 21:06:10 +05:30 committed by Owen O'Malley
parent 498b84155f
commit 12c3e4ef98
2 changed files with 10 additions and 7 deletions

View File

@ -86,6 +86,10 @@ http://maven.apache.org/xsd/maven-4.0.0.xsd">
<version>1.3</version>
<scope>test</scope>
</dependency>
<dependency>
<groupId>io.dropwizard.metrics</groupId>
<artifactId>metrics-core</artifactId>
</dependency>
<dependency>
<groupId>org.assertj</groupId>
<artifactId>assertj-core</artifactId>

View File

@ -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;