HDDS-861. SCMNodeManager unit tests are broken. Contributed by Xiaoyu Yao.

This commit is contained in:
Xiaoyu Yao 2018-11-21 11:46:53 -08:00
parent ebb9245366
commit 919a6e4310
2 changed files with 6 additions and 4 deletions

View File

@ -192,7 +192,9 @@ public class SCMNodeManager
// registration we call this, after adding to nodeStateMap. And also
// from eventhandler it is called only if it has node Report.
DatanodeInfo datanodeInfo = nodeStateManager.getNode(dnId);
datanodeInfo.updateStorageReports(nodeReport.getStorageReportList());
if (nodeReport != null) {
datanodeInfo.updateStorageReports(nodeReport.getStorageReportList());
}
} catch (NodeNotFoundException e) {
LOG.debug("SCM updateNodeStat based on heartbeat from previous " +

View File

@ -72,9 +72,9 @@ import static org.junit.Assert.assertEquals;
import static org.junit.Assert.assertTrue;
/**
* Test the Node Manager class.
* Test the SCM Node Manager class.
*/
public class TestNodeManager {
public class TestSCMNodeManager {
private File testDir;
@ -88,7 +88,7 @@ public class TestNodeManager {
@Before
public void setup() {
testDir = PathUtils.getTestDir(
TestNodeManager.class);
TestSCMNodeManager.class);
}
@After