YARN-5069. TestFifoScheduler.testResourceOverCommit race condition. Contributed by Eric Badger.

This commit is contained in:
Eric Payne 2016-05-16 21:12:26 +00:00
parent 8f17395029
commit 0ee36fd511

View File

@ -584,7 +584,8 @@ public void testResourceOverCommit() throws Exception {
waitCount = 0;
while (waitCount++ != 20) {
report_nm1 = rm.getResourceScheduler().getNodeReport(nm1.getNodeId());
if (report_nm1.getAvailableResource().getMemory() != 0) {
if (null != report_nm1 &&
report_nm1.getAvailableResource().getMemory() != 0) {
break;
}
LOG.info("Waiting for RMNodeResourceUpdateEvent to be handled... Tried "