HDDS-2053. Fix TestOzoneManagerRatisServer failure. Contributed by Xiaoyu Yao. (#1373)

This commit is contained in:
Xiaoyu Yao 2019-09-09 15:38:11 -07:00 committed by GitHub
parent d69b811ddd
commit 650c4cead5
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -205,6 +205,7 @@ public void verifyRaftGroupIdGenerationWithCustomOmServiceId() throws
.setOMServiceId(customOmServiceId) .setOMServiceId(customOmServiceId)
.build(); .build();
// Starts a single node Ratis server // Starts a single node Ratis server
omRatisServer.stop();
OzoneManagerRatisServer newOmRatisServer = OzoneManagerRatisServer OzoneManagerRatisServer newOmRatisServer = OzoneManagerRatisServer
.newOMRatisServer(newConf, ozoneManager, nodeDetails, .newOMRatisServer(newConf, ozoneManager, nodeDetails,
Collections.emptyList()); Collections.emptyList());
@ -219,6 +220,7 @@ public void verifyRaftGroupIdGenerationWithCustomOmServiceId() throws
RaftGroupId raftGroupId = newOmRatisServer.getRaftGroup().getGroupId(); RaftGroupId raftGroupId = newOmRatisServer.getRaftGroup().getGroupId();
Assert.assertEquals(uuid, raftGroupId.getUuid()); Assert.assertEquals(uuid, raftGroupId.getUuid());
Assert.assertEquals(raftGroupId.toByteString().size(), 16); Assert.assertEquals(raftGroupId.toByteString().size(), 16);
newOmRatisServer.stop();
} }