YARN-5862. TestDiskFailures.testLocalDirsFailures failed (Yufei Gu via Varun Saxena)
This commit is contained in:
parent
71adf44c3f
commit
c202a10923
|
@ -244,7 +244,9 @@ public class TestDiskFailures {
|
||||||
for (int i = 0; i < 10; i++) {
|
for (int i = 0; i < 10; i++) {
|
||||||
Iterator<RMNode> iter = yarnCluster.getResourceManager().getRMContext()
|
Iterator<RMNode> iter = yarnCluster.getResourceManager().getRMContext()
|
||||||
.getRMNodes().values().iterator();
|
.getRMNodes().values().iterator();
|
||||||
if ((iter.next().getState() != NodeState.UNHEALTHY) == isHealthy) {
|
// RMNode # might be zero because of timing related issue.
|
||||||
|
if (iter.hasNext() &&
|
||||||
|
(iter.next().getState() != NodeState.UNHEALTHY) == isHealthy) {
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
// wait for the node health info to go to RM
|
// wait for the node health info to go to RM
|
||||||
|
|
Loading…
Reference in New Issue