use of org.apache.flink.runtime.rpc.MainThreadValidatorUtil in project flink by apache.
the class SlotPoolTest method setUp.
@Before
public void setUp() throws Exception {
this.rpcService = new TestingSerialRpcService();
this.jobId = new JobID();
this.slotPool = new SlotPool(rpcService, jobId);
this.mainThreadValidatorUtil = new MainThreadValidatorUtil(slotPool);
mainThreadValidatorUtil.enterMainThread();
slotPool.start(UUID.randomUUID());
this.resourceManagerGateway = mock(ResourceManagerGateway.class);
when(resourceManagerGateway.requestSlot(any(UUID.class), any(UUID.class), any(SlotRequest.class), any(Time.class))).thenReturn(mock(Future.class));
slotPool.connectToResourceManager(UUID.randomUUID(), resourceManagerGateway);
}
Aggregations