HDDS-1410. TestSCMNodeMetrics is flaky. Contributed by Siddharth Wagle.
This commit is contained in:
parent
ed3747c1cc
commit
fcc7f9b32f
@ -101,9 +101,9 @@ public void testNodeReportProcessing() throws InterruptedException {
|
|||||||
NodeReportProto nodeReport = NodeReportProto.newBuilder()
|
NodeReportProto nodeReport = NodeReportProto.newBuilder()
|
||||||
.addStorageReport(storageReport).build();
|
.addStorageReport(storageReport).build();
|
||||||
datanode.getDatanodeStateMachine().getContext().addReport(nodeReport);
|
datanode.getDatanodeStateMachine().getContext().addReport(nodeReport);
|
||||||
datanode.getDatanodeStateMachine().triggerHeartbeat();
|
cluster.getStorageContainerManager().getScmNodeManager()
|
||||||
// Give some time so that SCM receives and processes the heartbeat.
|
.processNodeReport(datanode.getDatanodeDetails(), nodeReport);
|
||||||
Thread.sleep(100L);
|
|
||||||
assertCounter("NumNodeReportProcessed", nrProcessed + 1,
|
assertCounter("NumNodeReportProcessed", nrProcessed + 1,
|
||||||
getMetrics(SCMNodeMetrics.class.getSimpleName()));
|
getMetrics(SCMNodeMetrics.class.getSimpleName()));
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user