YARN-10878. move TestNMSimulator off com.google (#3268)
Converting from a class to a lambda-expression removes all need to reference the google stuff Contributed by Steve Loughran
This commit is contained in:
parent
3450522c2f
commit
a67a0fd37a
|
@ -157,13 +157,10 @@ public class TestNMSimulator {
|
||||||
numClusterNodes = rm.getResourceScheduler().getNumClusterNodes();
|
numClusterNodes = rm.getResourceScheduler().getNumClusterNodes();
|
||||||
}
|
}
|
||||||
|
|
||||||
GenericTestUtils.waitFor(new com.google.common.base.Supplier<Boolean>() {
|
GenericTestUtils.waitFor(() ->
|
||||||
@Override
|
rm.getResourceScheduler().getRootQueueMetrics()
|
||||||
public Boolean get() {
|
.getAvailableMB() > 0,
|
||||||
return rm.getResourceScheduler().getRootQueueMetrics()
|
500, 10000);
|
||||||
.getAvailableMB() > 0;
|
|
||||||
}
|
|
||||||
}, 500, 10000);
|
|
||||||
|
|
||||||
Assert.assertEquals("Node should have no runningApps.",
|
Assert.assertEquals("Node should have no runningApps.",
|
||||||
node.getNode().getRunningApps().size(), 0);
|
node.getNode().getRunningApps().size(), 0);
|
||||||
|
@ -207,13 +204,10 @@ public class TestNMSimulator {
|
||||||
numClusterNodes = rm.getResourceScheduler().getNumClusterNodes();
|
numClusterNodes = rm.getResourceScheduler().getNumClusterNodes();
|
||||||
}
|
}
|
||||||
|
|
||||||
GenericTestUtils.waitFor(new com.google.common.base.Supplier<Boolean>() {
|
GenericTestUtils.waitFor(() ->
|
||||||
@Override
|
rm.getResourceScheduler().getRootQueueMetrics()
|
||||||
public Boolean get() {
|
.getAvailableMB() > 0,
|
||||||
return rm.getResourceScheduler().getRootQueueMetrics()
|
500, 10000);
|
||||||
.getAvailableMB() > 0;
|
|
||||||
}
|
|
||||||
}, 500, 10000);
|
|
||||||
|
|
||||||
Assert.assertEquals("Node should have no runningApps.",
|
Assert.assertEquals("Node should have no runningApps.",
|
||||||
node.getNode().getRunningApps().size(), 0);
|
node.getNode().getRunningApps().size(), 0);
|
||||||
|
|
Loading…
Reference in New Issue