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:
Steve Loughran 2021-08-05 11:34:10 +01:00 committed by GitHub
parent 3450522c2f
commit a67a0fd37a
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -157,13 +157,10 @@ public void testNMSimAppAddedAndRemoved() throws Exception {
numClusterNodes = rm.getResourceScheduler().getNumClusterNodes();
}
GenericTestUtils.waitFor(new com.google.common.base.Supplier<Boolean>() {
@Override
public Boolean get() {
return rm.getResourceScheduler().getRootQueueMetrics()
.getAvailableMB() > 0;
}
}, 500, 10000);
GenericTestUtils.waitFor(() ->
rm.getResourceScheduler().getRootQueueMetrics()
.getAvailableMB() > 0,
500, 10000);
Assert.assertEquals("Node should have no runningApps.",
node.getNode().getRunningApps().size(), 0);
@ -207,13 +204,10 @@ public void testNMSimNullAppAddedAndRemoved() throws Exception {
numClusterNodes = rm.getResourceScheduler().getNumClusterNodes();
}
GenericTestUtils.waitFor(new com.google.common.base.Supplier<Boolean>() {
@Override
public Boolean get() {
return rm.getResourceScheduler().getRootQueueMetrics()
.getAvailableMB() > 0;
}
}, 500, 10000);
GenericTestUtils.waitFor(() ->
rm.getResourceScheduler().getRootQueueMetrics()
.getAvailableMB() > 0,
500, 10000);
Assert.assertEquals("Node should have no runningApps.",
node.getNode().getRunningApps().size(), 0);