YARN-4566. Fix test failure in TestMiniYarnClusterNodeUtilization. (Takashi Ohnishi via rohithsharmaks)

(cherry picked from commit e0b14f26f5)
This commit is contained in:
Rohith Sharma K S 2016-02-29 10:38:14 +08:00
parent fca24fbbaa
commit 2a1bb6cb67
2 changed files with 7 additions and 2 deletions

View File

@ -175,6 +175,9 @@ Release 2.9.0 - UNRELEASED
YARN-4701. When task logs are not available, port 8041 is referenced
instead of port 8042 (haibochen via rkanter)
YARN-4566. Fix test failure in TestMiniYarnClusterNodeUtilization.
(Takashi Ohnishi via rohithsharmaks)
Release 2.8.0 - UNRELEASED
INCOMPATIBLE CHANGES

View File

@ -214,8 +214,10 @@ public class TestMiniYarnClusterNodeUtilization {
// We check if the nodeUtilization is up to date
for (int i=0; i<100; i++) {
for (RMNode ni : rmContext.getRMNodes().values()) {
if (ni.getNodeUtilization().equals(nodeUtilization)) {
break;
if (ni.getNodeUtilization() != null) {
if (ni.getNodeUtilization().equals(nodeUtilization)) {
break;
}
}
}
Thread.sleep(100);