zhuzhurk commented on a change in pull request #12917:
URL: https://github.com/apache/flink/pull/12917#discussion_r465561587
##########
File path:
flink-runtime/src/test/java/org/apache/flink/runtime/jobmaster/slotpool/SlotPoolUtils.java
##########
@@ -45,14 +48,49 @@
*/
public class SlotPoolUtils {
+ public static final Time TIMEOUT = Time.seconds(10L);
+
private SlotPoolUtils() {
throw new UnsupportedOperationException("Cannot instantiate
this class.");
}
+ static SlotPoolBuilder createSlotPoolBuilder(final
ResourceManagerGateway resourceManagerGateway) {
Review comment:
```suggestion
static SlotPoolBuilder createSlotPoolBuilder(@Nullable final
ResourceManagerGateway resourceManagerGateway) {
```
##########
File path:
flink-runtime/src/test/java/org/apache/flink/runtime/jobmaster/slotpool/SlotPoolUtils.java
##########
@@ -45,14 +48,49 @@
*/
public class SlotPoolUtils {
+ public static final Time TIMEOUT = Time.seconds(10L);
+
private SlotPoolUtils() {
throw new UnsupportedOperationException("Cannot instantiate
this class.");
}
+ static SlotPoolBuilder createSlotPoolBuilder(final
ResourceManagerGateway resourceManagerGateway) {
+ return new
SlotPoolBuilder(ComponentMainThreadExecutorServiceAdapter.forMainThread())
+ .setResourceManagerGateway(resourceManagerGateway);
+ }
+
+ static TestingSlotPoolImpl createAndSetUpSlotPool(
+ final ResourceManagerGateway resourceManagerGateway)
throws Exception {
Review comment:
```suggestion
@Nullable final ResourceManagerGateway
resourceManagerGateway) throws Exception {
```
##########
File path:
flink-runtime/src/test/java/org/apache/flink/runtime/jobmaster/slotpool/SlotPoolImplTest.java
##########
@@ -821,22 +714,40 @@ public void
testSlotsOfferedWithoutResourceManagerConnected() throws Exception {
}
}
- private void requestNewAllocatedSlots(final SlotPool slotPool, final
SlotRequestId... slotRequestIds) {
- for (SlotRequestId slotRequestId : slotRequestIds) {
- requestNewAllocatedSlot(slotPool, slotRequestId);
- }
+ static TestingSlotPoolImpl createAndSetUpSlotPool(
Review comment:
```suggestion
private static TestingSlotPoolImpl createAndSetUpSlotPool(
```
----------------------------------------------------------------
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.
For queries about this service, please contact Infrastructure at:
[email protected]