You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@flink.apache.org by GitBox <gi...@apache.org> on 2021/07/14 08:07:27 UTC
[GitHub] [flink] zentol commented on a change in pull request #16485: [FLINK-22477] Remove SlotPoolImpl
zentol commented on a change in pull request #16485:
URL: https://github.com/apache/flink/pull/16485#discussion_r669335516
##########
File path: flink-runtime/src/test/java/org/apache/flink/runtime/jobmaster/slotpool/SlotPoolBatchSlotRequestTest.java
##########
@@ -109,30 +106,26 @@ public void testPendingBatchSlotRequestTimeout() throws Exception {
@Test
public void testPendingBatchSlotRequestDoesNotTimeoutIfFulfillingSlotExists() throws Exception {
final Time batchSlotTimeout = Time.milliseconds(2L);
- final ComponentMainThreadExecutor directMainThreadExecutor =
- ComponentMainThreadExecutorServiceAdapter.forMainThread();
final ManualClock clock = new ManualClock();
- try (final TestingSlotPoolImpl slotPool =
- createAndSetUpSlotPool(directMainThreadExecutor, null, batchSlotTimeout, clock)) {
+ try (final DeclarativeSlotPoolBridge slotPool =
+ createAndSetUpSlotPool(mainThreadExecutor, null, batchSlotTimeout, clock)) {
- SlotPoolUtils.offerSlots(
- slotPool,
- directMainThreadExecutor,
- Arrays.asList(resourceProfile, smallerResourceProfile));
+ SlotPoolUtils.requestNewAllocatedBatchSlot(
+ slotPool, mainThreadExecutor, resourceProfile);
+
+ SlotPoolUtils.offerSlots(slotPool, mainThreadExecutor, Arrays.asList(resourceProfile));
- final CompletableFuture<PhysicalSlot> firstSlotFuture =
- SlotPoolUtils.requestNewAllocatedBatchSlot(
- slotPool, directMainThreadExecutor, resourceProfile);
final CompletableFuture<PhysicalSlot> secondSlotFuture =
Review comment:
nit: variable naming is weird now that `firstSlotFuture` was removed.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: issues-unsubscribe@flink.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org