zentol commented on a change in pull request #8386: [FLINK-12181][Tests] Port
ExecutionGraphRestartTest to new codebase
URL: https://github.com/apache/flink/pull/8386#discussion_r285057976
##########
File path:
flink-runtime/src/test/java/org/apache/flink/runtime/executiongraph/ExecutionGraphRestartTest.java
##########
@@ -662,43 +584,45 @@ public void
testRestartWithSlotSharingAndNotEnoughResources() throws Exception {
final int numRestarts = 10;
final int parallelism = 20;
- TaskManagerGateway taskManagerGateway = new
SimpleAckingTaskManagerGateway();
- final Scheduler scheduler =
createSchedulerWithInstances(parallelism - 1, taskManagerGateway);
+ try (SlotPool slotPool = new SlotPoolImpl(TEST_JOB_ID)) {
+ final Scheduler scheduler = createSchedulerWithSlots(
+ parallelism - 1, slotPool, new
LocalTaskManagerLocation());
- final SlotSharingGroup sharingGroup = new SlotSharingGroup();
+ final SlotSharingGroup sharingGroup = new
SlotSharingGroup();
- final JobVertex source = new JobVertex("source");
- source.setInvokableClass(NoOpInvokable.class);
- source.setParallelism(parallelism);
- source.setSlotSharingGroup(sharingGroup);
+ final JobVertex source = new JobVertex("source");
+ source.setInvokableClass(NoOpInvokable.class);
+ source.setParallelism(parallelism);
+ source.setSlotSharingGroup(sharingGroup);
- final JobVertex sink = new JobVertex("sink");
- sink.setInvokableClass(NoOpInvokable.class);
- sink.setParallelism(parallelism);
- sink.setSlotSharingGroup(sharingGroup);
- sink.connectNewDataSetAsInput(source,
DistributionPattern.POINTWISE, ResultPartitionType.PIPELINED_BOUNDED);
+ final JobVertex sink = new JobVertex("sink");
+ sink.setInvokableClass(NoOpInvokable.class);
+ sink.setParallelism(parallelism);
+ sink.setSlotSharingGroup(sharingGroup);
+ sink.connectNewDataSetAsInput(source,
DistributionPattern.POINTWISE, ResultPartitionType.PIPELINED_BOUNDED);
- TestRestartStrategy restartStrategy =
- new TestRestartStrategy(numRestarts, false);
+ TestRestartStrategy restartStrategy =
+ new TestRestartStrategy(numRestarts, false);
Review comment:
Let's remove this empty line while we're at it.
(quite curious as to whether the suggestion works properly...)
```suggestion
```
----------------------------------------------------------------
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]
With regards,
Apache Git Services