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> <version>1.3</version>
<scope>test</scope> <scope>test</scope>
</dependency> </dependency>
<dependency>
<groupId>io.dropwizard.metrics</groupId>
<artifactId>metrics-core</artifactId>
</dependency>
<dependency> <dependency>
<groupId>org.assertj</groupId> <groupId>org.assertj</groupId>
<artifactId>assertj-core</artifactId> <artifactId>assertj-core</artifactId>
@ -162,4 +166,4 @@ http://maven.apache.org/xsd/maven-4.0.0.xsd">
</plugin> </plugin>
</plugins> </plugins>
</build> </build>
</project> </project>

View File

@ -214,7 +214,7 @@ public class TestEndPoint {
SCMRegisteredCmdResponseProto responseProto = rpcEndPoint.getEndPoint() SCMRegisteredCmdResponseProto responseProto = rpcEndPoint.getEndPoint()
.register(nodeToRegister.getProtoBufMessage(), scmAddressArray); .register(nodeToRegister.getProtoBufMessage(), scmAddressArray);
Assert.assertNotNull(responseProto); Assert.assertNotNull(responseProto);
Assert.assertEquals(nodeToRegister.getUuid(), Assert.assertEquals(nodeToRegister.getUuidString(),
responseProto.getDatanodeUUID()); responseProto.getDatanodeUUID());
Assert.assertNotNull(responseProto.getClusterID()); Assert.assertNotNull(responseProto.getClusterID());
} }
@ -230,11 +230,10 @@ public class TestEndPoint {
RegisterEndpointTask endpointTask = RegisterEndpointTask endpointTask =
new RegisterEndpointTask(rpcEndPoint, conf); new RegisterEndpointTask(rpcEndPoint, conf);
if (!clearDatanodeDetails) { if (!clearDatanodeDetails) {
HdslProtos.DatanodeDetailsProto datanodeDetails = DatanodeDetails datanodeDetails = TestUtils.getDatanodeDetails();
HdslProtos.DatanodeDetailsProto.newBuilder() HdslProtos.DatanodeDetailsProto datanodeDetailsProto =
.setUuid(UUID.randomUUID().toString()) datanodeDetails.getProtoBufMessage();
.build(); endpointTask.setDatanodeDetailsProto(datanodeDetailsProto);
endpointTask.setDatanodeDetailsProto(datanodeDetails);
} }
endpointTask.call(); endpointTask.call();
return rpcEndPoint; return rpcEndPoint;