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 2020/10/12 09:03:13 UTC

[GitHub] [flink] zhuzhurk opened a new pull request #13590: [FLINK-19570][tests] Avoid directly creating ExecutionJobVertex and ExecutionVertex via constructors in tests

zhuzhurk opened a new pull request #13590:
URL: https://github.com/apache/flink/pull/13590


   ## What is the purpose of the change
   
   This PR is to fix the tests which encounters unexpected failures due to improperly creating ExecutionJobVertex and ExecutionVertex and registering duplicated ExecutionAttemptID.
   
   ## Brief change log
   
   See commits.
   
   ## Verifying this change
   
   This change is already covered by existing tests.
   
   ## Does this pull request potentially affect one of the following parts:
   
     - Dependencies (does it add or upgrade a dependency): (yes / **no**)
     - The public API, i.e., is any changed class annotated with `@Public(Evolving)`: (yes / **no**)
     - The serializers: (yes / **no** / don't know)
     - The runtime per-record code paths (performance sensitive): (yes / **no** / don't know)
     - Anything that affects deployment or recovery: JobManager (and its components), Checkpointing, Kubernetes/Yarn/Mesos, ZooKeeper: (yes / **no** / don't know)
     - The S3 file system connector: (yes / **no** / don't know)
   
   ## Documentation
   
     - Does this pull request introduce a new feature? (yes / **no**)
     - If yes, how is the feature documented? (**not applicable** / docs / JavaDocs / not documented)
   


----------------------------------------------------------------
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:
users@infra.apache.org



[GitHub] [flink] flinkbot edited a comment on pull request #13590: [FLINK-19570][tests] Avoid directly creating ExecutionJobVertex and ExecutionVertex via constructors in tests

Posted by GitBox <gi...@apache.org>.
flinkbot edited a comment on pull request #13590:
URL: https://github.com/apache/flink/pull/13590#issuecomment-707004337


   <!--
   Meta data
   {
     "version" : 1,
     "metaDataEntries" : [ {
       "hash" : "7f2525d34a6b7e7be903f2b9444b26e134d9417a",
       "status" : "DELETED",
       "url" : "https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=7427",
       "triggerID" : "7f2525d34a6b7e7be903f2b9444b26e134d9417a",
       "triggerType" : "PUSH"
     }, {
       "hash" : "6b1f237058c155dfea2ba5afc56fdaf072d5fb73",
       "status" : "FAILURE",
       "url" : "https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=7436",
       "triggerID" : "6b1f237058c155dfea2ba5afc56fdaf072d5fb73",
       "triggerType" : "PUSH"
     }, {
       "hash" : "6b1f237058c155dfea2ba5afc56fdaf072d5fb73",
       "status" : "CANCELED",
       "url" : "https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=7488",
       "triggerID" : "707509176",
       "triggerType" : "MANUAL"
     }, {
       "hash" : "6b1f237058c155dfea2ba5afc56fdaf072d5fb73",
       "status" : "FAILURE",
       "url" : "https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=7436",
       "triggerID" : "707509176",
       "triggerType" : "MANUAL"
     }, {
       "hash" : "4c48511704b335dcdaa09e536e4e7282c5de2bb6",
       "status" : "PENDING",
       "url" : "https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=7495",
       "triggerID" : "4c48511704b335dcdaa09e536e4e7282c5de2bb6",
       "triggerType" : "PUSH"
     } ]
   }-->
   ## CI report:
   
   * 6b1f237058c155dfea2ba5afc56fdaf072d5fb73 Azure: [CANCELED](https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=7488) Azure: [FAILURE](https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=7436) 
   * 4c48511704b335dcdaa09e536e4e7282c5de2bb6 Azure: [PENDING](https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=7495) 
   
   <details>
   <summary>Bot commands</summary>
     The @flinkbot bot supports the following commands:
   
    - `@flinkbot run travis` re-run the last Travis build
    - `@flinkbot run azure` re-run the last Azure build
   </details>


----------------------------------------------------------------
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:
users@infra.apache.org



[GitHub] [flink] zhuzhurk commented on a change in pull request #13590: [FLINK-19570][tests] Avoid directly creating ExecutionJobVertex and ExecutionVertex via constructors in tests

Posted by GitBox <gi...@apache.org>.
zhuzhurk commented on a change in pull request #13590:
URL: https://github.com/apache/flink/pull/13590#discussion_r503294500



##########
File path: flink-runtime/src/test/java/org/apache/flink/runtime/executiongraph/ExecutionTest.java
##########
@@ -282,61 +278,6 @@ public void testSlotAllocationCancellationWhenExecutionCancelled() throws Except
 		assertThat(canceledSlotRequests, equalTo(slotRequests));
 	}
 
-	/**
-	 * Tests that all preferred locations are calculated.
-	 */
-	@Test
-	public void testAllPreferredLocationCalculation() throws Exception {
-		final TaskManagerLocation taskManagerLocation1 = new LocalTaskManagerLocation();
-		final TaskManagerLocation taskManagerLocation2 = new LocalTaskManagerLocation();
-		final TaskManagerLocation taskManagerLocation3 = new LocalTaskManagerLocation();
-
-		final CompletableFuture<TaskManagerLocation> locationFuture1 = CompletableFuture.completedFuture(taskManagerLocation1);
-		final CompletableFuture<TaskManagerLocation> locationFuture2 = new CompletableFuture<>();
-		final CompletableFuture<TaskManagerLocation> locationFuture3 = new CompletableFuture<>();
-
-		final Execution execution = getExecution(Arrays.asList(locationFuture1, locationFuture2, locationFuture3));
-
-		CompletableFuture<Collection<TaskManagerLocation>> preferredLocationsFuture = execution.calculatePreferredLocations(LocationPreferenceConstraint.ALL);
-
-		assertFalse(preferredLocationsFuture.isDone());
-
-		locationFuture3.complete(taskManagerLocation3);
-
-		assertFalse(preferredLocationsFuture.isDone());
-
-		locationFuture2.complete(taskManagerLocation2);
-
-		assertTrue(preferredLocationsFuture.isDone());
-
-		final Collection<TaskManagerLocation> preferredLocations = preferredLocationsFuture.get();
-
-		assertThat(preferredLocations, containsInAnyOrder(taskManagerLocation1, taskManagerLocation2, taskManagerLocation3));
-	}
-
-	/**
-	 * Tests that any preferred locations are calculated.
-	 */
-	@Test
-	public void testAnyPreferredLocationCalculation() throws Exception {
-		final TaskManagerLocation taskManagerLocation1 = new LocalTaskManagerLocation();
-		final TaskManagerLocation taskManagerLocation3 = new LocalTaskManagerLocation();
-
-		final CompletableFuture<TaskManagerLocation> locationFuture1 = CompletableFuture.completedFuture(taskManagerLocation1);
-		final CompletableFuture<TaskManagerLocation> locationFuture2 = new CompletableFuture<>();
-		final CompletableFuture<TaskManagerLocation> locationFuture3 = CompletableFuture.completedFuture(taskManagerLocation3);
-
-		final Execution execution = getExecution(Arrays.asList(locationFuture1, locationFuture2, locationFuture3));
-
-		CompletableFuture<Collection<TaskManagerLocation>> preferredLocationsFuture = execution.calculatePreferredLocations(LocationPreferenceConstraint.ANY);
-
-		assertTrue(preferredLocationsFuture.isDone());
-
-		final Collection<TaskManagerLocation> preferredLocations = preferredLocationsFuture.get();
-
-		assertThat(preferredLocations, containsInAnyOrder(taskManagerLocation1, taskManagerLocation3));
-	}
-

Review comment:
       yes. The new scheduler uses `DefaultPreferredLocationsRetriever` and `LocationPreferenceConstraint ` is not used anymore.




----------------------------------------------------------------
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:
users@infra.apache.org



[GitHub] [flink] zhuzhurk commented on a change in pull request #13590: [FLINK-19570][tests] Avoid directly creating ExecutionJobVertex and ExecutionVertex via constructors in tests

Posted by GitBox <gi...@apache.org>.
zhuzhurk commented on a change in pull request #13590:
URL: https://github.com/apache/flink/pull/13590#discussion_r503309517



##########
File path: flink-runtime/src/test/java/org/apache/flink/runtime/jobmanager/scheduler/ScheduleWithCoLocationHintTest.java
##########
@@ -306,25 +306,25 @@ public void testGetsNonLocalFromSharingGroupFirst() throws Exception {
 
 		// schedule something into the shared group so that both instances are in the sharing group
 		LogicalSlot s1 = testingSlotProvider.allocateSlot(
-				new ScheduledUnit(getExecution(jid1, 0, 2, sharingGroup, loc1), sharingGroup.getSlotSharingGroupId()), slotProfileForLocation(loc1), TestingUtils.infiniteTime()).get();
+				new ScheduledUnit(getExecution(jid1, 0, 2, sharingGroup), sharingGroup.getSlotSharingGroupId()), slotProfileForLocation(loc1), TestingUtils.infiniteTime()).get();
 		LogicalSlot s2 = testingSlotProvider.allocateSlot(
-				new ScheduledUnit(getExecution(jid1, 1, 2, sharingGroup, loc2), sharingGroup.getSlotSharingGroupId()), slotProfileForLocation(loc2), TestingUtils.infiniteTime()).get();
+				new ScheduledUnit(getExecution(jid1, 1, 2, sharingGroup), sharingGroup.getSlotSharingGroupId()), slotProfileForLocation(loc2), TestingUtils.infiniteTime()).get();
 
 		// schedule one locally to instance 1
 		LogicalSlot s3 = testingSlotProvider.allocateSlot(
-				new ScheduledUnit(getExecution(jid2, 0, 2, sharingGroup, loc1), sharingGroup.getSlotSharingGroupId(), cc1), slotProfileForLocation(loc1), TestingUtils.infiniteTime()).get();
+				new ScheduledUnit(getExecution(jid2, 0, 2, sharingGroup), sharingGroup.getSlotSharingGroupId(), cc1), slotProfileForLocation(loc1), TestingUtils.infiniteTime()).get();
 
 		// schedule with co location constraint (yet unassigned) and a preference for
 		// instance 1, but it can only get instance 2
 		LogicalSlot s4 = testingSlotProvider.allocateSlot(
-				new ScheduledUnit(getExecution(jid2, 1, 2, sharingGroup, loc1), sharingGroup.getSlotSharingGroupId(), cc2), slotProfileForLocation(loc1), TestingUtils.infiniteTime()).get();
+				new ScheduledUnit(getExecution(jid2, 1, 2, sharingGroup), sharingGroup.getSlotSharingGroupId(), cc2), slotProfileForLocation(loc1), TestingUtils.infiniteTime()).get();
 
 		// schedule something into the assigned co-location constraints and check that they override the
 		// other preferences
 		LogicalSlot s5 = testingSlotProvider.allocateSlot(
-				new ScheduledUnit(getExecution(jid3, 0, 2, sharingGroup, loc2), sharingGroup.getSlotSharingGroupId(), cc1), slotProfileForLocation(loc2), TestingUtils.infiniteTime()).get();
+				new ScheduledUnit(getExecution(jid3, 0, 2, sharingGroup), sharingGroup.getSlotSharingGroupId(), cc1), slotProfileForLocation(loc2), TestingUtils.infiniteTime()).get();
 		LogicalSlot s6 = testingSlotProvider.allocateSlot(
-				new ScheduledUnit(getExecution(jid3, 1, 2, sharingGroup, loc1), sharingGroup.getSlotSharingGroupId(), cc2), slotProfileForLocation(loc1), TestingUtils.infiniteTime()).get();

Review comment:
       The `SlotSharingGroup` param of `getExecution()` also does not take effect .
   I think we can simplify `ScheduledUnit` constructors to get rid of the `Execution` to avoid such confusion.
   But maybe a bit later because it can have lots of conflicts with the ongoing changes of FLINK-17760. 




----------------------------------------------------------------
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:
users@infra.apache.org



[GitHub] [flink] zhuzhurk commented on a change in pull request #13590: [FLINK-19570][tests] Avoid directly creating ExecutionJobVertex and ExecutionVertex via constructors in tests

Posted by GitBox <gi...@apache.org>.
zhuzhurk commented on a change in pull request #13590:
URL: https://github.com/apache/flink/pull/13590#discussion_r503294500



##########
File path: flink-runtime/src/test/java/org/apache/flink/runtime/executiongraph/ExecutionTest.java
##########
@@ -282,61 +278,6 @@ public void testSlotAllocationCancellationWhenExecutionCancelled() throws Except
 		assertThat(canceledSlotRequests, equalTo(slotRequests));
 	}
 
-	/**
-	 * Tests that all preferred locations are calculated.
-	 */
-	@Test
-	public void testAllPreferredLocationCalculation() throws Exception {
-		final TaskManagerLocation taskManagerLocation1 = new LocalTaskManagerLocation();
-		final TaskManagerLocation taskManagerLocation2 = new LocalTaskManagerLocation();
-		final TaskManagerLocation taskManagerLocation3 = new LocalTaskManagerLocation();
-
-		final CompletableFuture<TaskManagerLocation> locationFuture1 = CompletableFuture.completedFuture(taskManagerLocation1);
-		final CompletableFuture<TaskManagerLocation> locationFuture2 = new CompletableFuture<>();
-		final CompletableFuture<TaskManagerLocation> locationFuture3 = new CompletableFuture<>();
-
-		final Execution execution = getExecution(Arrays.asList(locationFuture1, locationFuture2, locationFuture3));
-
-		CompletableFuture<Collection<TaskManagerLocation>> preferredLocationsFuture = execution.calculatePreferredLocations(LocationPreferenceConstraint.ALL);
-
-		assertFalse(preferredLocationsFuture.isDone());
-
-		locationFuture3.complete(taskManagerLocation3);
-
-		assertFalse(preferredLocationsFuture.isDone());
-
-		locationFuture2.complete(taskManagerLocation2);
-
-		assertTrue(preferredLocationsFuture.isDone());
-
-		final Collection<TaskManagerLocation> preferredLocations = preferredLocationsFuture.get();
-
-		assertThat(preferredLocations, containsInAnyOrder(taskManagerLocation1, taskManagerLocation2, taskManagerLocation3));
-	}
-
-	/**
-	 * Tests that any preferred locations are calculated.
-	 */
-	@Test
-	public void testAnyPreferredLocationCalculation() throws Exception {
-		final TaskManagerLocation taskManagerLocation1 = new LocalTaskManagerLocation();
-		final TaskManagerLocation taskManagerLocation3 = new LocalTaskManagerLocation();
-
-		final CompletableFuture<TaskManagerLocation> locationFuture1 = CompletableFuture.completedFuture(taskManagerLocation1);
-		final CompletableFuture<TaskManagerLocation> locationFuture2 = new CompletableFuture<>();
-		final CompletableFuture<TaskManagerLocation> locationFuture3 = CompletableFuture.completedFuture(taskManagerLocation3);
-
-		final Execution execution = getExecution(Arrays.asList(locationFuture1, locationFuture2, locationFuture3));
-
-		CompletableFuture<Collection<TaskManagerLocation>> preferredLocationsFuture = execution.calculatePreferredLocations(LocationPreferenceConstraint.ANY);
-
-		assertTrue(preferredLocationsFuture.isDone());
-
-		final Collection<TaskManagerLocation> preferredLocations = preferredLocationsFuture.get();
-
-		assertThat(preferredLocations, containsInAnyOrder(taskManagerLocation1, taskManagerLocation3));
-	}
-

Review comment:
       yes. The new scheduler uses `DefaultPreferredLocationsRetriever`. `LocationPreferenceConstraint ` is not used anymore.




----------------------------------------------------------------
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:
users@infra.apache.org



[GitHub] [flink] tillrohrmann commented on a change in pull request #13590: [FLINK-19570][tests] Avoid directly creating ExecutionJobVertex and ExecutionVertex via constructors in tests

Posted by GitBox <gi...@apache.org>.
tillrohrmann commented on a change in pull request #13590:
URL: https://github.com/apache/flink/pull/13590#discussion_r503764323



##########
File path: flink-runtime/src/test/java/org/apache/flink/runtime/jobmanager/scheduler/ScheduleWithCoLocationHintTest.java
##########
@@ -306,25 +306,25 @@ public void testGetsNonLocalFromSharingGroupFirst() throws Exception {
 
 		// schedule something into the shared group so that both instances are in the sharing group
 		LogicalSlot s1 = testingSlotProvider.allocateSlot(
-				new ScheduledUnit(getExecution(jid1, 0, 2, sharingGroup, loc1), sharingGroup.getSlotSharingGroupId()), slotProfileForLocation(loc1), TestingUtils.infiniteTime()).get();
+				new ScheduledUnit(getExecution(jid1, 0, 2, sharingGroup), sharingGroup.getSlotSharingGroupId()), slotProfileForLocation(loc1), TestingUtils.infiniteTime()).get();
 		LogicalSlot s2 = testingSlotProvider.allocateSlot(
-				new ScheduledUnit(getExecution(jid1, 1, 2, sharingGroup, loc2), sharingGroup.getSlotSharingGroupId()), slotProfileForLocation(loc2), TestingUtils.infiniteTime()).get();
+				new ScheduledUnit(getExecution(jid1, 1, 2, sharingGroup), sharingGroup.getSlotSharingGroupId()), slotProfileForLocation(loc2), TestingUtils.infiniteTime()).get();
 
 		// schedule one locally to instance 1
 		LogicalSlot s3 = testingSlotProvider.allocateSlot(
-				new ScheduledUnit(getExecution(jid2, 0, 2, sharingGroup, loc1), sharingGroup.getSlotSharingGroupId(), cc1), slotProfileForLocation(loc1), TestingUtils.infiniteTime()).get();
+				new ScheduledUnit(getExecution(jid2, 0, 2, sharingGroup), sharingGroup.getSlotSharingGroupId(), cc1), slotProfileForLocation(loc1), TestingUtils.infiniteTime()).get();
 
 		// schedule with co location constraint (yet unassigned) and a preference for
 		// instance 1, but it can only get instance 2
 		LogicalSlot s4 = testingSlotProvider.allocateSlot(
-				new ScheduledUnit(getExecution(jid2, 1, 2, sharingGroup, loc1), sharingGroup.getSlotSharingGroupId(), cc2), slotProfileForLocation(loc1), TestingUtils.infiniteTime()).get();
+				new ScheduledUnit(getExecution(jid2, 1, 2, sharingGroup), sharingGroup.getSlotSharingGroupId(), cc2), slotProfileForLocation(loc1), TestingUtils.infiniteTime()).get();
 
 		// schedule something into the assigned co-location constraints and check that they override the
 		// other preferences
 		LogicalSlot s5 = testingSlotProvider.allocateSlot(
-				new ScheduledUnit(getExecution(jid3, 0, 2, sharingGroup, loc2), sharingGroup.getSlotSharingGroupId(), cc1), slotProfileForLocation(loc2), TestingUtils.infiniteTime()).get();
+				new ScheduledUnit(getExecution(jid3, 0, 2, sharingGroup), sharingGroup.getSlotSharingGroupId(), cc1), slotProfileForLocation(loc2), TestingUtils.infiniteTime()).get();
 		LogicalSlot s6 = testingSlotProvider.allocateSlot(
-				new ScheduledUnit(getExecution(jid3, 1, 2, sharingGroup, loc1), sharingGroup.getSlotSharingGroupId(), cc2), slotProfileForLocation(loc1), TestingUtils.infiniteTime()).get();

Review comment:
       Thanks for the clarification @zhuzhurk. Yes, let's try to simplify `ScheduledUnit` after FLINK-17760.




----------------------------------------------------------------
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:
users@infra.apache.org



[GitHub] [flink] tillrohrmann commented on a change in pull request #13590: [FLINK-19570][tests] Avoid directly creating ExecutionJobVertex and ExecutionVertex via constructors in tests

Posted by GitBox <gi...@apache.org>.
tillrohrmann commented on a change in pull request #13590:
URL: https://github.com/apache/flink/pull/13590#discussion_r503764531



##########
File path: flink-runtime/src/test/java/org/apache/flink/runtime/executiongraph/ExecutionTest.java
##########
@@ -282,61 +278,6 @@ public void testSlotAllocationCancellationWhenExecutionCancelled() throws Except
 		assertThat(canceledSlotRequests, equalTo(slotRequests));
 	}
 
-	/**
-	 * Tests that all preferred locations are calculated.
-	 */
-	@Test
-	public void testAllPreferredLocationCalculation() throws Exception {
-		final TaskManagerLocation taskManagerLocation1 = new LocalTaskManagerLocation();
-		final TaskManagerLocation taskManagerLocation2 = new LocalTaskManagerLocation();
-		final TaskManagerLocation taskManagerLocation3 = new LocalTaskManagerLocation();
-
-		final CompletableFuture<TaskManagerLocation> locationFuture1 = CompletableFuture.completedFuture(taskManagerLocation1);
-		final CompletableFuture<TaskManagerLocation> locationFuture2 = new CompletableFuture<>();
-		final CompletableFuture<TaskManagerLocation> locationFuture3 = new CompletableFuture<>();
-
-		final Execution execution = getExecution(Arrays.asList(locationFuture1, locationFuture2, locationFuture3));
-
-		CompletableFuture<Collection<TaskManagerLocation>> preferredLocationsFuture = execution.calculatePreferredLocations(LocationPreferenceConstraint.ALL);
-
-		assertFalse(preferredLocationsFuture.isDone());
-
-		locationFuture3.complete(taskManagerLocation3);
-
-		assertFalse(preferredLocationsFuture.isDone());
-
-		locationFuture2.complete(taskManagerLocation2);
-
-		assertTrue(preferredLocationsFuture.isDone());
-
-		final Collection<TaskManagerLocation> preferredLocations = preferredLocationsFuture.get();
-
-		assertThat(preferredLocations, containsInAnyOrder(taskManagerLocation1, taskManagerLocation2, taskManagerLocation3));
-	}
-
-	/**
-	 * Tests that any preferred locations are calculated.
-	 */
-	@Test
-	public void testAnyPreferredLocationCalculation() throws Exception {
-		final TaskManagerLocation taskManagerLocation1 = new LocalTaskManagerLocation();
-		final TaskManagerLocation taskManagerLocation3 = new LocalTaskManagerLocation();
-
-		final CompletableFuture<TaskManagerLocation> locationFuture1 = CompletableFuture.completedFuture(taskManagerLocation1);
-		final CompletableFuture<TaskManagerLocation> locationFuture2 = new CompletableFuture<>();
-		final CompletableFuture<TaskManagerLocation> locationFuture3 = CompletableFuture.completedFuture(taskManagerLocation3);
-
-		final Execution execution = getExecution(Arrays.asList(locationFuture1, locationFuture2, locationFuture3));
-
-		CompletableFuture<Collection<TaskManagerLocation>> preferredLocationsFuture = execution.calculatePreferredLocations(LocationPreferenceConstraint.ANY);
-
-		assertTrue(preferredLocationsFuture.isDone());
-
-		final Collection<TaskManagerLocation> preferredLocations = preferredLocationsFuture.get();
-
-		assertThat(preferredLocations, containsInAnyOrder(taskManagerLocation1, taskManagerLocation3));
-	}
-

Review comment:
       Thanks for the clarification @zhuzhurk.




----------------------------------------------------------------
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:
users@infra.apache.org



[GitHub] [flink] flinkbot edited a comment on pull request #13590: [FLINK-19570][tests] Avoid directly creating ExecutionJobVertex and ExecutionVertex via constructors in tests

Posted by GitBox <gi...@apache.org>.
flinkbot edited a comment on pull request #13590:
URL: https://github.com/apache/flink/pull/13590#issuecomment-707004337


   <!--
   Meta data
   {
     "version" : 1,
     "metaDataEntries" : [ {
       "hash" : "7f2525d34a6b7e7be903f2b9444b26e134d9417a",
       "status" : "DELETED",
       "url" : "https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=7427",
       "triggerID" : "7f2525d34a6b7e7be903f2b9444b26e134d9417a",
       "triggerType" : "PUSH"
     }, {
       "hash" : "6b1f237058c155dfea2ba5afc56fdaf072d5fb73",
       "status" : "FAILURE",
       "url" : "https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=7436",
       "triggerID" : "6b1f237058c155dfea2ba5afc56fdaf072d5fb73",
       "triggerType" : "PUSH"
     }, {
       "hash" : "6b1f237058c155dfea2ba5afc56fdaf072d5fb73",
       "status" : "PENDING",
       "url" : "https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=7488",
       "triggerID" : "707509176",
       "triggerType" : "MANUAL"
     } ]
   }-->
   ## CI report:
   
   * 6b1f237058c155dfea2ba5afc56fdaf072d5fb73 Azure: [FAILURE](https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=7436) Azure: [PENDING](https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=7488) 
   
   <details>
   <summary>Bot commands</summary>
     The @flinkbot bot supports the following commands:
   
    - `@flinkbot run travis` re-run the last Travis build
    - `@flinkbot run azure` re-run the last Azure build
   </details>


----------------------------------------------------------------
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:
users@infra.apache.org



[GitHub] [flink] zhuzhurk commented on pull request #13590: [FLINK-19570][tests] Avoid directly creating ExecutionJobVertex and ExecutionVertex via constructors in tests

Posted by GitBox <gi...@apache.org>.
zhuzhurk commented on pull request #13590:
URL: https://github.com/apache/flink/pull/13590#issuecomment-707509176


   @flinkbot run azure


----------------------------------------------------------------
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:
users@infra.apache.org



[GitHub] [flink] tillrohrmann commented on a change in pull request #13590: [FLINK-19570][tests] Avoid directly creating ExecutionJobVertex and ExecutionVertex via constructors in tests

Posted by GitBox <gi...@apache.org>.
tillrohrmann commented on a change in pull request #13590:
URL: https://github.com/apache/flink/pull/13590#discussion_r503255908



##########
File path: flink-runtime/src/test/java/org/apache/flink/runtime/executiongraph/ExecutionTest.java
##########
@@ -282,61 +278,6 @@ public void testSlotAllocationCancellationWhenExecutionCancelled() throws Except
 		assertThat(canceledSlotRequests, equalTo(slotRequests));
 	}
 
-	/**
-	 * Tests that all preferred locations are calculated.
-	 */
-	@Test
-	public void testAllPreferredLocationCalculation() throws Exception {
-		final TaskManagerLocation taskManagerLocation1 = new LocalTaskManagerLocation();
-		final TaskManagerLocation taskManagerLocation2 = new LocalTaskManagerLocation();
-		final TaskManagerLocation taskManagerLocation3 = new LocalTaskManagerLocation();
-
-		final CompletableFuture<TaskManagerLocation> locationFuture1 = CompletableFuture.completedFuture(taskManagerLocation1);
-		final CompletableFuture<TaskManagerLocation> locationFuture2 = new CompletableFuture<>();
-		final CompletableFuture<TaskManagerLocation> locationFuture3 = new CompletableFuture<>();
-
-		final Execution execution = getExecution(Arrays.asList(locationFuture1, locationFuture2, locationFuture3));
-
-		CompletableFuture<Collection<TaskManagerLocation>> preferredLocationsFuture = execution.calculatePreferredLocations(LocationPreferenceConstraint.ALL);
-
-		assertFalse(preferredLocationsFuture.isDone());
-
-		locationFuture3.complete(taskManagerLocation3);
-
-		assertFalse(preferredLocationsFuture.isDone());
-
-		locationFuture2.complete(taskManagerLocation2);
-
-		assertTrue(preferredLocationsFuture.isDone());
-
-		final Collection<TaskManagerLocation> preferredLocations = preferredLocationsFuture.get();
-
-		assertThat(preferredLocations, containsInAnyOrder(taskManagerLocation1, taskManagerLocation2, taskManagerLocation3));
-	}
-
-	/**
-	 * Tests that any preferred locations are calculated.
-	 */
-	@Test
-	public void testAnyPreferredLocationCalculation() throws Exception {
-		final TaskManagerLocation taskManagerLocation1 = new LocalTaskManagerLocation();
-		final TaskManagerLocation taskManagerLocation3 = new LocalTaskManagerLocation();
-
-		final CompletableFuture<TaskManagerLocation> locationFuture1 = CompletableFuture.completedFuture(taskManagerLocation1);
-		final CompletableFuture<TaskManagerLocation> locationFuture2 = new CompletableFuture<>();
-		final CompletableFuture<TaskManagerLocation> locationFuture3 = CompletableFuture.completedFuture(taskManagerLocation3);
-
-		final Execution execution = getExecution(Arrays.asList(locationFuture1, locationFuture2, locationFuture3));
-
-		CompletableFuture<Collection<TaskManagerLocation>> preferredLocationsFuture = execution.calculatePreferredLocations(LocationPreferenceConstraint.ANY);
-
-		assertTrue(preferredLocationsFuture.isDone());
-
-		final Collection<TaskManagerLocation> preferredLocations = preferredLocationsFuture.get();
-
-		assertThat(preferredLocations, containsInAnyOrder(taskManagerLocation1, taskManagerLocation3));
-	}
-

Review comment:
       Just to confirm: We can remove these tests because we no longer use `LocationPreferenceConstraint.ANY` in the new scheduler, right?

##########
File path: flink-runtime/src/test/java/org/apache/flink/runtime/jobmanager/scheduler/ScheduleWithCoLocationHintTest.java
##########
@@ -306,25 +306,25 @@ public void testGetsNonLocalFromSharingGroupFirst() throws Exception {
 
 		// schedule something into the shared group so that both instances are in the sharing group
 		LogicalSlot s1 = testingSlotProvider.allocateSlot(
-				new ScheduledUnit(getExecution(jid1, 0, 2, sharingGroup, loc1), sharingGroup.getSlotSharingGroupId()), slotProfileForLocation(loc1), TestingUtils.infiniteTime()).get();
+				new ScheduledUnit(getExecution(jid1, 0, 2, sharingGroup), sharingGroup.getSlotSharingGroupId()), slotProfileForLocation(loc1), TestingUtils.infiniteTime()).get();
 		LogicalSlot s2 = testingSlotProvider.allocateSlot(
-				new ScheduledUnit(getExecution(jid1, 1, 2, sharingGroup, loc2), sharingGroup.getSlotSharingGroupId()), slotProfileForLocation(loc2), TestingUtils.infiniteTime()).get();
+				new ScheduledUnit(getExecution(jid1, 1, 2, sharingGroup), sharingGroup.getSlotSharingGroupId()), slotProfileForLocation(loc2), TestingUtils.infiniteTime()).get();
 
 		// schedule one locally to instance 1
 		LogicalSlot s3 = testingSlotProvider.allocateSlot(
-				new ScheduledUnit(getExecution(jid2, 0, 2, sharingGroup, loc1), sharingGroup.getSlotSharingGroupId(), cc1), slotProfileForLocation(loc1), TestingUtils.infiniteTime()).get();
+				new ScheduledUnit(getExecution(jid2, 0, 2, sharingGroup), sharingGroup.getSlotSharingGroupId(), cc1), slotProfileForLocation(loc1), TestingUtils.infiniteTime()).get();
 
 		// schedule with co location constraint (yet unassigned) and a preference for
 		// instance 1, but it can only get instance 2
 		LogicalSlot s4 = testingSlotProvider.allocateSlot(
-				new ScheduledUnit(getExecution(jid2, 1, 2, sharingGroup, loc1), sharingGroup.getSlotSharingGroupId(), cc2), slotProfileForLocation(loc1), TestingUtils.infiniteTime()).get();
+				new ScheduledUnit(getExecution(jid2, 1, 2, sharingGroup), sharingGroup.getSlotSharingGroupId(), cc2), slotProfileForLocation(loc1), TestingUtils.infiniteTime()).get();
 
 		// schedule something into the assigned co-location constraints and check that they override the
 		// other preferences
 		LogicalSlot s5 = testingSlotProvider.allocateSlot(
-				new ScheduledUnit(getExecution(jid3, 0, 2, sharingGroup, loc2), sharingGroup.getSlotSharingGroupId(), cc1), slotProfileForLocation(loc2), TestingUtils.infiniteTime()).get();
+				new ScheduledUnit(getExecution(jid3, 0, 2, sharingGroup), sharingGroup.getSlotSharingGroupId(), cc1), slotProfileForLocation(loc2), TestingUtils.infiniteTime()).get();
 		LogicalSlot s6 = testingSlotProvider.allocateSlot(
-				new ScheduledUnit(getExecution(jid3, 1, 2, sharingGroup, loc1), sharingGroup.getSlotSharingGroupId(), cc2), slotProfileForLocation(loc1), TestingUtils.infiniteTime()).get();

Review comment:
       Aren't we changing the semantics of this test by saying that we don't have any preferred location preferences?




----------------------------------------------------------------
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:
users@infra.apache.org



[GitHub] [flink] flinkbot edited a comment on pull request #13590: [FLINK-19570][tests] Avoid directly creating ExecutionJobVertex and ExecutionVertex via constructors in tests

Posted by GitBox <gi...@apache.org>.
flinkbot edited a comment on pull request #13590:
URL: https://github.com/apache/flink/pull/13590#issuecomment-707004337


   <!--
   Meta data
   {
     "version" : 1,
     "metaDataEntries" : [ {
       "hash" : "7f2525d34a6b7e7be903f2b9444b26e134d9417a",
       "status" : "DELETED",
       "url" : "https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=7427",
       "triggerID" : "7f2525d34a6b7e7be903f2b9444b26e134d9417a",
       "triggerType" : "PUSH"
     }, {
       "hash" : "6b1f237058c155dfea2ba5afc56fdaf072d5fb73",
       "status" : "FAILURE",
       "url" : "https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=7436",
       "triggerID" : "6b1f237058c155dfea2ba5afc56fdaf072d5fb73",
       "triggerType" : "PUSH"
     }, {
       "hash" : "6b1f237058c155dfea2ba5afc56fdaf072d5fb73",
       "status" : "PENDING",
       "url" : "https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=7488",
       "triggerID" : "707509176",
       "triggerType" : "MANUAL"
     }, {
       "hash" : "6b1f237058c155dfea2ba5afc56fdaf072d5fb73",
       "status" : "FAILURE",
       "url" : "https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=7436",
       "triggerID" : "707509176",
       "triggerType" : "MANUAL"
     }, {
       "hash" : "4c48511704b335dcdaa09e536e4e7282c5de2bb6",
       "status" : "UNKNOWN",
       "url" : "TBD",
       "triggerID" : "4c48511704b335dcdaa09e536e4e7282c5de2bb6",
       "triggerType" : "PUSH"
     } ]
   }-->
   ## CI report:
   
   * 6b1f237058c155dfea2ba5afc56fdaf072d5fb73 Azure: [PENDING](https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=7488) Azure: [FAILURE](https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=7436) 
   * 4c48511704b335dcdaa09e536e4e7282c5de2bb6 UNKNOWN
   
   <details>
   <summary>Bot commands</summary>
     The @flinkbot bot supports the following commands:
   
    - `@flinkbot run travis` re-run the last Travis build
    - `@flinkbot run azure` re-run the last Azure build
   </details>


----------------------------------------------------------------
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:
users@infra.apache.org



[GitHub] [flink] flinkbot edited a comment on pull request #13590: [FLINK-19570][tests] Avoid directly creating ExecutionJobVertex and ExecutionVertex via constructors in tests

Posted by GitBox <gi...@apache.org>.
flinkbot edited a comment on pull request #13590:
URL: https://github.com/apache/flink/pull/13590#issuecomment-707004337


   <!--
   Meta data
   {
     "version" : 1,
     "metaDataEntries" : [ {
       "hash" : "7f2525d34a6b7e7be903f2b9444b26e134d9417a",
       "status" : "PENDING",
       "url" : "https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=7427",
       "triggerID" : "7f2525d34a6b7e7be903f2b9444b26e134d9417a",
       "triggerType" : "PUSH"
     }, {
       "hash" : "6b1f237058c155dfea2ba5afc56fdaf072d5fb73",
       "status" : "UNKNOWN",
       "url" : "TBD",
       "triggerID" : "6b1f237058c155dfea2ba5afc56fdaf072d5fb73",
       "triggerType" : "PUSH"
     } ]
   }-->
   ## CI report:
   
   * 7f2525d34a6b7e7be903f2b9444b26e134d9417a Azure: [PENDING](https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=7427) 
   * 6b1f237058c155dfea2ba5afc56fdaf072d5fb73 UNKNOWN
   
   <details>
   <summary>Bot commands</summary>
     The @flinkbot bot supports the following commands:
   
    - `@flinkbot run travis` re-run the last Travis build
    - `@flinkbot run azure` re-run the last Azure build
   </details>


----------------------------------------------------------------
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:
users@infra.apache.org



[GitHub] [flink] zhuzhurk merged pull request #13590: [FLINK-19570][tests] Avoid directly creating ExecutionJobVertex and ExecutionVertex via constructors in tests

Posted by GitBox <gi...@apache.org>.
zhuzhurk merged pull request #13590:
URL: https://github.com/apache/flink/pull/13590


   


----------------------------------------------------------------
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:
users@infra.apache.org



[GitHub] [flink] zhuzhurk commented on pull request #13590: [FLINK-19570][tests] Avoid directly creating ExecutionJobVertex and ExecutionVertex via constructors in tests

Posted by GitBox <gi...@apache.org>.
zhuzhurk commented on pull request #13590:
URL: https://github.com/apache/flink/pull/13590#issuecomment-707708699


   Thanks for reviewing! @tillrohrmann 
   Merging.


----------------------------------------------------------------
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:
users@infra.apache.org



[GitHub] [flink] flinkbot edited a comment on pull request #13590: [FLINK-19570][tests] Avoid directly creating ExecutionJobVertex and ExecutionVertex via constructors in tests

Posted by GitBox <gi...@apache.org>.
flinkbot edited a comment on pull request #13590:
URL: https://github.com/apache/flink/pull/13590#issuecomment-707004337


   <!--
   Meta data
   {
     "version" : 1,
     "metaDataEntries" : [ {
       "hash" : "7f2525d34a6b7e7be903f2b9444b26e134d9417a",
       "status" : "DELETED",
       "url" : "https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=7427",
       "triggerID" : "7f2525d34a6b7e7be903f2b9444b26e134d9417a",
       "triggerType" : "PUSH"
     }, {
       "hash" : "6b1f237058c155dfea2ba5afc56fdaf072d5fb73",
       "status" : "DELETED",
       "url" : "https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=7436",
       "triggerID" : "6b1f237058c155dfea2ba5afc56fdaf072d5fb73",
       "triggerType" : "PUSH"
     }, {
       "hash" : "6b1f237058c155dfea2ba5afc56fdaf072d5fb73",
       "status" : "DELETED",
       "url" : "https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=7488",
       "triggerID" : "707509176",
       "triggerType" : "MANUAL"
     }, {
       "hash" : "6b1f237058c155dfea2ba5afc56fdaf072d5fb73",
       "status" : "DELETED",
       "url" : "https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=7436",
       "triggerID" : "707509176",
       "triggerType" : "MANUAL"
     }, {
       "hash" : "4c48511704b335dcdaa09e536e4e7282c5de2bb6",
       "status" : "SUCCESS",
       "url" : "https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=7495",
       "triggerID" : "4c48511704b335dcdaa09e536e4e7282c5de2bb6",
       "triggerType" : "PUSH"
     } ]
   }-->
   ## CI report:
   
   * 4c48511704b335dcdaa09e536e4e7282c5de2bb6 Azure: [SUCCESS](https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=7495) 
   
   <details>
   <summary>Bot commands</summary>
     The @flinkbot bot supports the following commands:
   
    - `@flinkbot run travis` re-run the last Travis build
    - `@flinkbot run azure` re-run the last Azure build
   </details>


----------------------------------------------------------------
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:
users@infra.apache.org



[GitHub] [flink] flinkbot edited a comment on pull request #13590: [FLINK-19570][tests] Avoid directly creating ExecutionJobVertex and ExecutionVertex via constructors in tests

Posted by GitBox <gi...@apache.org>.
flinkbot edited a comment on pull request #13590:
URL: https://github.com/apache/flink/pull/13590#issuecomment-707004337


   <!--
   Meta data
   {
     "version" : 1,
     "metaDataEntries" : [ {
       "hash" : "7f2525d34a6b7e7be903f2b9444b26e134d9417a",
       "status" : "DELETED",
       "url" : "https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=7427",
       "triggerID" : "7f2525d34a6b7e7be903f2b9444b26e134d9417a",
       "triggerType" : "PUSH"
     }, {
       "hash" : "6b1f237058c155dfea2ba5afc56fdaf072d5fb73",
       "status" : "FAILURE",
       "url" : "https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=7436",
       "triggerID" : "6b1f237058c155dfea2ba5afc56fdaf072d5fb73",
       "triggerType" : "PUSH"
     }, {
       "hash" : "6b1f237058c155dfea2ba5afc56fdaf072d5fb73",
       "status" : "PENDING",
       "url" : "https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=7488",
       "triggerID" : "707509176",
       "triggerType" : "MANUAL"
     }, {
       "hash" : "6b1f237058c155dfea2ba5afc56fdaf072d5fb73",
       "status" : "FAILURE",
       "url" : "https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=7436",
       "triggerID" : "707509176",
       "triggerType" : "MANUAL"
     }, {
       "hash" : "4c48511704b335dcdaa09e536e4e7282c5de2bb6",
       "status" : "PENDING",
       "url" : "https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=7495",
       "triggerID" : "4c48511704b335dcdaa09e536e4e7282c5de2bb6",
       "triggerType" : "PUSH"
     } ]
   }-->
   ## CI report:
   
   * 6b1f237058c155dfea2ba5afc56fdaf072d5fb73 Azure: [PENDING](https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=7488) Azure: [FAILURE](https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=7436) 
   * 4c48511704b335dcdaa09e536e4e7282c5de2bb6 Azure: [PENDING](https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=7495) 
   
   <details>
   <summary>Bot commands</summary>
     The @flinkbot bot supports the following commands:
   
    - `@flinkbot run travis` re-run the last Travis build
    - `@flinkbot run azure` re-run the last Azure build
   </details>


----------------------------------------------------------------
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:
users@infra.apache.org



[GitHub] [flink] flinkbot edited a comment on pull request #13590: [FLINK-19570][tests] Avoid directly creating ExecutionJobVertex and ExecutionVertex via constructors in tests

Posted by GitBox <gi...@apache.org>.
flinkbot edited a comment on pull request #13590:
URL: https://github.com/apache/flink/pull/13590#issuecomment-707004337


   <!--
   Meta data
   {
     "version" : 1,
     "metaDataEntries" : [ {
       "hash" : "7f2525d34a6b7e7be903f2b9444b26e134d9417a",
       "status" : "DELETED",
       "url" : "https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=7427",
       "triggerID" : "7f2525d34a6b7e7be903f2b9444b26e134d9417a",
       "triggerType" : "PUSH"
     }, {
       "hash" : "6b1f237058c155dfea2ba5afc56fdaf072d5fb73",
       "status" : "FAILURE",
       "url" : "https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=7436",
       "triggerID" : "6b1f237058c155dfea2ba5afc56fdaf072d5fb73",
       "triggerType" : "PUSH"
     }, {
       "hash" : "6b1f237058c155dfea2ba5afc56fdaf072d5fb73",
       "status" : "PENDING",
       "url" : "https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=7488",
       "triggerID" : "707509176",
       "triggerType" : "MANUAL"
     }, {
       "hash" : "6b1f237058c155dfea2ba5afc56fdaf072d5fb73",
       "status" : "FAILURE",
       "url" : "https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=7436",
       "triggerID" : "707509176",
       "triggerType" : "MANUAL"
     } ]
   }-->
   ## CI report:
   
   * 6b1f237058c155dfea2ba5afc56fdaf072d5fb73 Azure: [PENDING](https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=7488) Azure: [FAILURE](https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=7436) 
   
   <details>
   <summary>Bot commands</summary>
     The @flinkbot bot supports the following commands:
   
    - `@flinkbot run travis` re-run the last Travis build
    - `@flinkbot run azure` re-run the last Azure build
   </details>


----------------------------------------------------------------
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:
users@infra.apache.org



[GitHub] [flink] flinkbot edited a comment on pull request #13590: [FLINK-19570][tests] Avoid directly creating ExecutionJobVertex and ExecutionVertex via constructors in tests

Posted by GitBox <gi...@apache.org>.
flinkbot edited a comment on pull request #13590:
URL: https://github.com/apache/flink/pull/13590#issuecomment-707004337


   <!--
   Meta data
   {
     "version" : 1,
     "metaDataEntries" : [ {
       "hash" : "7f2525d34a6b7e7be903f2b9444b26e134d9417a",
       "status" : "PENDING",
       "url" : "https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=7427",
       "triggerID" : "7f2525d34a6b7e7be903f2b9444b26e134d9417a",
       "triggerType" : "PUSH"
     }, {
       "hash" : "6b1f237058c155dfea2ba5afc56fdaf072d5fb73",
       "status" : "PENDING",
       "url" : "https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=7436",
       "triggerID" : "6b1f237058c155dfea2ba5afc56fdaf072d5fb73",
       "triggerType" : "PUSH"
     } ]
   }-->
   ## CI report:
   
   * 7f2525d34a6b7e7be903f2b9444b26e134d9417a Azure: [PENDING](https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=7427) 
   * 6b1f237058c155dfea2ba5afc56fdaf072d5fb73 Azure: [PENDING](https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=7436) 
   
   <details>
   <summary>Bot commands</summary>
     The @flinkbot bot supports the following commands:
   
    - `@flinkbot run travis` re-run the last Travis build
    - `@flinkbot run azure` re-run the last Azure build
   </details>


----------------------------------------------------------------
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:
users@infra.apache.org



[GitHub] [flink] zhuzhurk commented on a change in pull request #13590: [FLINK-19570][tests] Avoid directly creating ExecutionJobVertex and ExecutionVertex via constructors in tests

Posted by GitBox <gi...@apache.org>.
zhuzhurk commented on a change in pull request #13590:
URL: https://github.com/apache/flink/pull/13590#discussion_r503289113



##########
File path: flink-runtime/src/test/java/org/apache/flink/runtime/jobmanager/scheduler/ScheduleWithCoLocationHintTest.java
##########
@@ -306,25 +306,25 @@ public void testGetsNonLocalFromSharingGroupFirst() throws Exception {
 
 		// schedule something into the shared group so that both instances are in the sharing group
 		LogicalSlot s1 = testingSlotProvider.allocateSlot(
-				new ScheduledUnit(getExecution(jid1, 0, 2, sharingGroup, loc1), sharingGroup.getSlotSharingGroupId()), slotProfileForLocation(loc1), TestingUtils.infiniteTime()).get();
+				new ScheduledUnit(getExecution(jid1, 0, 2, sharingGroup), sharingGroup.getSlotSharingGroupId()), slotProfileForLocation(loc1), TestingUtils.infiniteTime()).get();
 		LogicalSlot s2 = testingSlotProvider.allocateSlot(
-				new ScheduledUnit(getExecution(jid1, 1, 2, sharingGroup, loc2), sharingGroup.getSlotSharingGroupId()), slotProfileForLocation(loc2), TestingUtils.infiniteTime()).get();
+				new ScheduledUnit(getExecution(jid1, 1, 2, sharingGroup), sharingGroup.getSlotSharingGroupId()), slotProfileForLocation(loc2), TestingUtils.infiniteTime()).get();
 
 		// schedule one locally to instance 1
 		LogicalSlot s3 = testingSlotProvider.allocateSlot(
-				new ScheduledUnit(getExecution(jid2, 0, 2, sharingGroup, loc1), sharingGroup.getSlotSharingGroupId(), cc1), slotProfileForLocation(loc1), TestingUtils.infiniteTime()).get();
+				new ScheduledUnit(getExecution(jid2, 0, 2, sharingGroup), sharingGroup.getSlotSharingGroupId(), cc1), slotProfileForLocation(loc1), TestingUtils.infiniteTime()).get();
 
 		// schedule with co location constraint (yet unassigned) and a preference for
 		// instance 1, but it can only get instance 2
 		LogicalSlot s4 = testingSlotProvider.allocateSlot(
-				new ScheduledUnit(getExecution(jid2, 1, 2, sharingGroup, loc1), sharingGroup.getSlotSharingGroupId(), cc2), slotProfileForLocation(loc1), TestingUtils.infiniteTime()).get();
+				new ScheduledUnit(getExecution(jid2, 1, 2, sharingGroup), sharingGroup.getSlotSharingGroupId(), cc2), slotProfileForLocation(loc1), TestingUtils.infiniteTime()).get();
 
 		// schedule something into the assigned co-location constraints and check that they override the
 		// other preferences
 		LogicalSlot s5 = testingSlotProvider.allocateSlot(
-				new ScheduledUnit(getExecution(jid3, 0, 2, sharingGroup, loc2), sharingGroup.getSlotSharingGroupId(), cc1), slotProfileForLocation(loc2), TestingUtils.infiniteTime()).get();
+				new ScheduledUnit(getExecution(jid3, 0, 2, sharingGroup), sharingGroup.getSlotSharingGroupId(), cc1), slotProfileForLocation(loc2), TestingUtils.infiniteTime()).get();
 		LogicalSlot s6 = testingSlotProvider.allocateSlot(
-				new ScheduledUnit(getExecution(jid3, 1, 2, sharingGroup, loc1), sharingGroup.getSlotSharingGroupId(), cc2), slotProfileForLocation(loc1), TestingUtils.infiniteTime()).get();

Review comment:
       `ScheduledUnit` will just use the `ExecutionVertexID` of the given `Execution`, so that the location preference in this execution param will not take effect. The location preference takes effect in the following slotProfile param(e.g. `slotProfileForLocation(loc1)`)




----------------------------------------------------------------
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:
users@infra.apache.org



[GitHub] [flink] flinkbot commented on pull request #13590: [FLINK-19570][tests] Avoid directly creating ExecutionJobVertex and ExecutionVertex via constructors in tests

Posted by GitBox <gi...@apache.org>.
flinkbot commented on pull request #13590:
URL: https://github.com/apache/flink/pull/13590#issuecomment-707004337


   <!--
   Meta data
   {
     "version" : 1,
     "metaDataEntries" : [ {
       "hash" : "7f2525d34a6b7e7be903f2b9444b26e134d9417a",
       "status" : "UNKNOWN",
       "url" : "TBD",
       "triggerID" : "7f2525d34a6b7e7be903f2b9444b26e134d9417a",
       "triggerType" : "PUSH"
     } ]
   }-->
   ## CI report:
   
   * 7f2525d34a6b7e7be903f2b9444b26e134d9417a UNKNOWN
   
   <details>
   <summary>Bot commands</summary>
     The @flinkbot bot supports the following commands:
   
    - `@flinkbot run travis` re-run the last Travis build
    - `@flinkbot run azure` re-run the last Azure build
   </details>


----------------------------------------------------------------
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:
users@infra.apache.org



[GitHub] [flink] flinkbot edited a comment on pull request #13590: [FLINK-19570][tests] Avoid directly creating ExecutionJobVertex and ExecutionVertex via constructors in tests

Posted by GitBox <gi...@apache.org>.
flinkbot edited a comment on pull request #13590:
URL: https://github.com/apache/flink/pull/13590#issuecomment-707004337


   <!--
   Meta data
   {
     "version" : 1,
     "metaDataEntries" : [ {
       "hash" : "7f2525d34a6b7e7be903f2b9444b26e134d9417a",
       "status" : "PENDING",
       "url" : "https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=7427",
       "triggerID" : "7f2525d34a6b7e7be903f2b9444b26e134d9417a",
       "triggerType" : "PUSH"
     } ]
   }-->
   ## CI report:
   
   * 7f2525d34a6b7e7be903f2b9444b26e134d9417a Azure: [PENDING](https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=7427) 
   
   <details>
   <summary>Bot commands</summary>
     The @flinkbot bot supports the following commands:
   
    - `@flinkbot run travis` re-run the last Travis build
    - `@flinkbot run azure` re-run the last Azure build
   </details>


----------------------------------------------------------------
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:
users@infra.apache.org



[GitHub] [flink] flinkbot commented on pull request #13590: [FLINK-19570][tests] Avoid directly creating ExecutionJobVertex and ExecutionVertex via constructors in tests

Posted by GitBox <gi...@apache.org>.
flinkbot commented on pull request #13590:
URL: https://github.com/apache/flink/pull/13590#issuecomment-706988324


   Thanks a lot for your contribution to the Apache Flink project. I'm the @flinkbot. I help the community
   to review your pull request. We will use this comment to track the progress of the review.
   
   
   ## Automated Checks
   Last check on commit 7f2525d34a6b7e7be903f2b9444b26e134d9417a (Mon Oct 12 09:06:31 UTC 2020)
   
   **Warnings:**
    * No documentation files were touched! Remember to keep the Flink docs up to date!
   
   
   <sub>Mention the bot in a comment to re-run the automated checks.</sub>
   ## Review Progress
   
   * ❓ 1. The [description] looks good.
   * ❓ 2. There is [consensus] that the contribution should go into to Flink.
   * ❓ 3. Needs [attention] from.
   * ❓ 4. The change fits into the overall [architecture].
   * ❓ 5. Overall code [quality] is good.
   
   Please see the [Pull Request Review Guide](https://flink.apache.org/contributing/reviewing-prs.html) for a full explanation of the review process.<details>
    The Bot is tracking the review progress through labels. Labels are applied according to the order of the review items. For consensus, approval by a Flink committer of PMC member is required <summary>Bot commands</summary>
     The @flinkbot bot supports the following commands:
   
    - `@flinkbot approve description` to approve one or more aspects (aspects: `description`, `consensus`, `architecture` and `quality`)
    - `@flinkbot approve all` to approve all aspects
    - `@flinkbot approve-until architecture` to approve everything until `architecture`
    - `@flinkbot attention @username1 [@username2 ..]` to require somebody's attention
    - `@flinkbot disapprove architecture` to remove an approval you gave earlier
   </details>


----------------------------------------------------------------
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:
users@infra.apache.org



[GitHub] [flink] flinkbot edited a comment on pull request #13590: [FLINK-19570][tests] Avoid directly creating ExecutionJobVertex and ExecutionVertex via constructors in tests

Posted by GitBox <gi...@apache.org>.
flinkbot edited a comment on pull request #13590:
URL: https://github.com/apache/flink/pull/13590#issuecomment-707004337


   <!--
   Meta data
   {
     "version" : 1,
     "metaDataEntries" : [ {
       "hash" : "7f2525d34a6b7e7be903f2b9444b26e134d9417a",
       "status" : "DELETED",
       "url" : "https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=7427",
       "triggerID" : "7f2525d34a6b7e7be903f2b9444b26e134d9417a",
       "triggerType" : "PUSH"
     }, {
       "hash" : "6b1f237058c155dfea2ba5afc56fdaf072d5fb73",
       "status" : "FAILURE",
       "url" : "https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=7436",
       "triggerID" : "6b1f237058c155dfea2ba5afc56fdaf072d5fb73",
       "triggerType" : "PUSH"
     } ]
   }-->
   ## CI report:
   
   * 6b1f237058c155dfea2ba5afc56fdaf072d5fb73 Azure: [FAILURE](https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=7436) 
   
   <details>
   <summary>Bot commands</summary>
     The @flinkbot bot supports the following commands:
   
    - `@flinkbot run travis` re-run the last Travis build
    - `@flinkbot run azure` re-run the last Azure build
   </details>


----------------------------------------------------------------
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:
users@infra.apache.org