@Test public void testSlotOverAllocatedAndAllTaskSlotReleased() { SlotSharingResourceTestContext context = createResourceTestContext(new ResourceProfile(2.0, 200)); for (int i = 0; i < context.singleTaskSlotsInOrder.size(); ++i) { SlotSharingManager.SingleTaskSlot singleTaskSlot = context.singleTaskSlotsInOrder.get(i); assertThat(singleTaskSlot.getLogicalSlotFuture().isDone(), is(true)); assertThat(singleTaskSlot.getLogicalSlotFuture().isCompletedExceptionally(), is(true)); singleTaskSlot.getLogicalSlotFuture().whenComplete((LogicalSlot ignored, Throwable throwable) -> { assertThat(throwable instanceof SharedSlotOversubscribedException, is(true)); assertThat(((SharedSlotOversubscribedException) throwable).canRetry(), is(false)); }); } assertThat(context.slotSharingManager.isEmpty(), is(true)); }
public boolean isEmpty() { return allTaskSlots.isEmpty(); }
SlotSharingManager { public boolean isEmpty() { return allTaskSlots.isEmpty(); } }
SlotSharingManager { public boolean isEmpty() { return allTaskSlots.isEmpty(); } SlotSharingManager(
			SlotSharingGroupId slotSharingGroupId,
			AllocatedSlotActions allocatedSlotActions,
			SlotOwner slotOwner); }
SlotSharingManager { public boolean isEmpty() { return allTaskSlots.isEmpty(); } SlotSharingManager(
			SlotSharingGroupId slotSharingGroupId,
			AllocatedSlotActions allocatedSlotActions,
			SlotOwner slotOwner); boolean isEmpty(); boolean contains(SlotRequestId slotRequestId); @Nonnull Collection<SlotSelectionStrategy.SlotInfoAndResources> listResolvedRootSlotInfo(@Nullable AbstractID groupId); @Nullable MultiTaskSlot getResolvedRootSlot(@Nonnull SlotInfo slotInfo); @Override String toString(); @VisibleForTesting Collection<MultiTaskSlot> getResolvedRootSlots(); }
SlotSharingManager { public boolean isEmpty() { return allTaskSlots.isEmpty(); } SlotSharingManager(
			SlotSharingGroupId slotSharingGroupId,
			AllocatedSlotActions allocatedSlotActions,
			SlotOwner slotOwner); boolean isEmpty(); boolean contains(SlotRequestId slotRequestId); @Nonnull Collection<SlotSelectionStrategy.SlotInfoAndResources> listResolvedRootSlotInfo(@Nullable AbstractID groupId); @Nullable MultiTaskSlot getResolvedRootSlot(@Nonnull SlotInfo slotInfo); @Override String toString(); @VisibleForTesting Collection<MultiTaskSlot> getResolvedRootSlots();  }