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()
.addStorageReport(storageReport).build();
datanode.getDatanodeStateMachine().getContext().addReport(nodeReport);
datanode.getDatanodeStateMachine().triggerHeartbeat();
// Give some time so that SCM receives and processes the heartbeat.
Thread.sleep(300L);
cluster.getStorageContainerManager().getScmNodeManager()
.processNodeReport(datanode.getDatanodeDetails(), nodeReport);
assertGauge("HealthyNodes", 1,
getMetrics(SCMNodeMetrics.class.getSimpleName()));