Search in sources :

Example 6 with EvaluatorRequest

use of org.apache.reef.driver.evaluator.EvaluatorRequest in project incubator-heron by apache.

the class HeronMasterDriverTest method requestContainerForWorkerSubmitsValidRequest.

@Test
public void requestContainerForWorkerSubmitsValidRequest() {
    ByteAmount memory = ByteAmount.fromMegabytes(786);
    EvaluatorRequest request = spyDriver.createEvaluatorRequest(5, memory);
    doReturn(request).when(spyDriver).createEvaluatorRequest(5, memory);
    HeronMasterDriver.HeronWorker worker = new HeronMasterDriver.HeronWorker(3, 5, memory);
    spyDriver.requestContainerForWorker(3, worker);
    verify(mockRequestor, times(1)).submit(request);
}
Also used : ByteAmount(com.twitter.heron.common.basics.ByteAmount) EvaluatorRequest(org.apache.reef.driver.evaluator.EvaluatorRequest) PrepareForTest(org.powermock.core.classloader.annotations.PrepareForTest) Test(org.junit.Test)

Aggregations

EvaluatorRequest (org.apache.reef.driver.evaluator.EvaluatorRequest)6 ByteAmount (com.twitter.heron.common.basics.ByteAmount)4 VisibleForTesting (com.google.common.annotations.VisibleForTesting)3 Test (org.junit.Test)3 PrepareForTest (org.powermock.core.classloader.annotations.PrepareForTest)3 ByteAmount (org.apache.heron.common.basics.ByteAmount)2