Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -205,6 +205,7 @@ public void verifyRaftGroupIdGenerationWithCustomOmServiceId() throws
.setOMServiceId(customOmServiceId)
.build();
// Starts a single node Ratis server
omRatisServer.stop();
OzoneManagerRatisServer newOmRatisServer = OzoneManagerRatisServer
Copy link
Contributor Author

@xiaoyuyao xiaoyuyao Sep 5, 2019

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@ChenSammi omRatisServer is started at the begin of each test case and stop after that. However in this new test case, it started a different OzoneManagerRatisServer named newOmRatisServer, it has to be stopped explicitly to avoid leak. Also, the omRatisServer has to be stopped before newOmRatisServer is started to avoid metric registration confliction.

.newOMRatisServer(newConf, ozoneManager, nodeDetails,
Collections.emptyList());
Expand All @@ -219,6 +220,7 @@ public void verifyRaftGroupIdGenerationWithCustomOmServiceId() throws
RaftGroupId raftGroupId = newOmRatisServer.getRaftGroup().getGroupId();
Assert.assertEquals(uuid, raftGroupId.getUuid());
Assert.assertEquals(raftGroupId.toByteString().size(), 16);
newOmRatisServer.stop();
}


Expand Down