use of org.apache.hyracks.api.job.resource.IJobCapacityController in project asterixdb by apache.
the class JobManagerTest method testNullJob.
@Test
public void testNullJob() throws HyracksException {
IJobCapacityController jobCapacityController = mock(IJobCapacityController.class);
IJobManager jobManager = new JobManager(ccConfig, mockClusterControllerService(), jobCapacityController);
boolean invalidParameter = false;
try {
jobManager.add(null);
} catch (HyracksException e) {
invalidParameter = e.getErrorCode() == ErrorCode.INVALID_INPUT_PARAMETER;
}
Assert.assertTrue(invalidParameter);
Assert.assertTrue(jobManager.getRunningJobs().isEmpty());
Assert.assertTrue(jobManager.getPendingJobs().isEmpty());
}
Aggregations