flink-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From GJL <...@git.apache.org>
Subject [GitHub] flink pull request #5775: [FLINK-9099] Assign Execution to LogicalSlot when ...
Date Tue, 27 Mar 2018 19:25:36 GMT
Github user GJL commented on a diff in the pull request:

    https://github.com/apache/flink/pull/5775#discussion_r177544274
  
    --- Diff: flink-runtime/src/test/java/org/apache/flink/runtime/executiongraph/ExecutionGraphSchedulingTest.java
---
    @@ -465,6 +464,58 @@ public void testSchedulingOperationCancellationWhenCancel() throws
Exception {
     		assertThat(executionGraph.getTerminationFuture().get(), is(JobStatus.CANCELED));
     	}
     
    +	@Nonnull
    +	private TestingLogicalSlot createTestingSlot(@Nullable CompletableFuture<?> releaseFuture)
{
    +		return new TestingLogicalSlot(
    +			new LocalTaskManagerLocation(),
    +			new SimpleAckingTaskManagerGateway(),
    +			0,
    +			new AllocationID(),
    +			new SlotRequestId(),
    +			new SlotSharingGroupId(),
    +			releaseFuture);
    +	}
    +
    +	/**
    +	 * Tests that a partially completed eager scheduling operation fails if an
    +	 * completed slot is released. See FLINK-9099.
    +	 */
    +	@Test
    +	public void testSlotReleasingFailsSchedulingOperation() throws Exception {
    +		final int parallelism = 2;
    +
    +		final JobVertex jobVertex = new JobVertex("Testing job vertex");
    +		jobVertex.setInvokableClass(NoOpInvokable.class);
    +		jobVertex.setParallelism(parallelism);
    +		final JobGraph jobGraph = new JobGraph(jobVertex);
    +		jobGraph.setAllowQueuedScheduling(true);
    +		jobGraph.setScheduleMode(ScheduleMode.EAGER);
    +
    +		final ProgrammedSlotProvider slotProvider = new ProgrammedSlotProvider(2);
    --- End diff --
    
    Replace `2` with `parallelism`?


---

Mime
View raw message