YARN-9806. TestNMSimulator#testNMSimulator fails in branch-2
This commit is contained in:
parent
a524608d1e
commit
493b36279b
|
@ -17,6 +17,8 @@
|
|||
*/
|
||||
package org.apache.hadoop.yarn.sls.nodemanager;
|
||||
|
||||
import com.google.common.base.Supplier;
|
||||
import org.apache.hadoop.test.GenericTestUtils;
|
||||
import org.apache.hadoop.yarn.api.records.Container;
|
||||
import org.apache.hadoop.yarn.api.records.ContainerId;
|
||||
import org.apache.hadoop.yarn.conf.YarnConfiguration;
|
||||
|
@ -88,6 +90,13 @@ public class TestNMSimulator {
|
|||
numClusterNodes = rm.getResourceScheduler().getNumClusterNodes();
|
||||
}
|
||||
|
||||
GenericTestUtils.waitFor(new Supplier<Boolean>() {
|
||||
@Override public Boolean get() {
|
||||
return rm.getResourceScheduler().getRootQueueMetrics()
|
||||
.getAvailableMB() > 0;
|
||||
}
|
||||
}, 500, 10000);
|
||||
|
||||
Assert.assertEquals(1, rm.getResourceScheduler().getNumClusterNodes());
|
||||
Assert.assertEquals(GB * 10,
|
||||
rm.getResourceScheduler().getRootQueueMetrics().getAvailableMB());
|
||||
|
|
Loading…
Reference in New Issue