HDDS-1288. SCM - Failing test on trunk that waits for HB report processing. Contributed by Siddharth Wagle.

This commit is contained in:
Bharat Viswanadham 2019-03-30 10:54:45 -07:00
parent ec82e4cab2
commit bf3b7fd732
No known key found for this signature in database
GPG Key ID: 6A6F3FB121D2F77C
1 changed files with 2 additions and 3 deletions

View File

@ -140,9 +140,8 @@ public class TestSCMNodeMetrics {
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(300L);
assertGauge("HealthyNodes", 1, assertGauge("HealthyNodes", 1,
getMetrics(SCMNodeMetrics.class.getSimpleName())); getMetrics(SCMNodeMetrics.class.getSimpleName()));