Search in sources :

Example 1 with TestingPhysicalSlotPayload

use of org.apache.flink.runtime.jobmaster.slotpool.TestingPhysicalSlotPayload in project flink by apache.

the class SharedSlotTest method testConstructorFailsIfSlotAlreadyHasAssignedPayload.

@Test(expected = IllegalStateException.class)
public void testConstructorFailsIfSlotAlreadyHasAssignedPayload() {
    final TestingPhysicalSlot physicalSlot = TestingPhysicalSlot.builder().build();
    physicalSlot.tryAssignPayload(new TestingPhysicalSlotPayload());
    new SharedSlot(new SlotRequestId(), physicalSlot, false, () -> {
    });
}
Also used : SlotRequestId(org.apache.flink.runtime.jobmaster.SlotRequestId) TestingPhysicalSlot(org.apache.flink.runtime.scheduler.TestingPhysicalSlot) TestingPhysicalSlotPayload(org.apache.flink.runtime.jobmaster.slotpool.TestingPhysicalSlotPayload) Test(org.junit.Test)

Aggregations

SlotRequestId (org.apache.flink.runtime.jobmaster.SlotRequestId)1 TestingPhysicalSlotPayload (org.apache.flink.runtime.jobmaster.slotpool.TestingPhysicalSlotPayload)1 TestingPhysicalSlot (org.apache.flink.runtime.scheduler.TestingPhysicalSlot)1 Test (org.junit.Test)1