use of com.dtstack.taier.base.resource.EngineResourceInfo in project Taier by DTStack.
the class AbstractRdbsClientTest method testJudgeSlots.
@Test
public void testJudgeSlots() throws Exception {
JobClient jobClient = new JobClient();
JudgeResult result = testRdbsClient.judgeSlots(jobClient);
Assert.assertEquals(JudgeResult.JudgeType.NOT_OK, result.getResult());
EngineResourceInfo info = PowerMockito.mock(EngineResourceInfo.class);
when(info.judgeSlots(any(JobClient.class))).thenReturn(JudgeResult.ok());
MemberModifier.field(TestRdbsClient.class, "resourceInfo").set(testRdbsClient, info);
JudgeResult judgeResult = testRdbsClient.judgeSlots(jobClient);
Assert.assertEquals(JudgeResult.JudgeType.OK, judgeResult.getResult());
}
Aggregations