You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@flink.apache.org by se...@apache.org on 2019/07/10 09:36:06 UTC

[flink] 05/16: [hotfix][runtime] Fix test cases that use unknown resource profiles in slot offers.

This is an automated email from the ASF dual-hosted git repository.

sewen pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/flink.git

commit b5f23036a42a3e3f1c3588f7d9e8650522688113
Author: Xintong Song <to...@gmail.com>
AuthorDate: Thu Jul 4 23:33:17 2019 +0800

    [hotfix][runtime] Fix test cases that use unknown resource profiles in slot offers.
    
    The test cases should not user ResourceProfile#UNKNOWN in slot offers.
      - ResourceProfile#UNKNOWN is used for slot requests whose resource needs are not specified.
      - ResourceProfile#ANY is used for task manager slots whose can match any slot request.
    These cases haven't been failing because so far slot requests always have unknown resource profiles.
---
 .../apache/flink/runtime/executiongraph/ExecutionGraphRestartTest.java  | 2 +-
 .../apache/flink/runtime/jobmanager/scheduler/SchedulerTestBase.java    | 2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/flink-runtime/src/test/java/org/apache/flink/runtime/executiongraph/ExecutionGraphRestartTest.java b/flink-runtime/src/test/java/org/apache/flink/runtime/executiongraph/ExecutionGraphRestartTest.java
index 70df983..c5f1f82 100644
--- a/flink-runtime/src/test/java/org/apache/flink/runtime/executiongraph/ExecutionGraphRestartTest.java
+++ b/flink-runtime/src/test/java/org/apache/flink/runtime/executiongraph/ExecutionGraphRestartTest.java
@@ -751,7 +751,7 @@ public class ExecutionGraphRestartTest extends TestLogger {
 		final List<SlotOffer> slotOffers = new ArrayList<>(NUM_TASKS);
 		for (int i = 0; i < numSlots; i++) {
 			final AllocationID allocationId = new AllocationID();
-			final SlotOffer slotOffer = new SlotOffer(allocationId, 0, ResourceProfile.UNKNOWN);
+			final SlotOffer slotOffer = new SlotOffer(allocationId, 0, ResourceProfile.ANY);
 			slotOffers.add(slotOffer);
 		}
 
diff --git a/flink-runtime/src/test/java/org/apache/flink/runtime/jobmanager/scheduler/SchedulerTestBase.java b/flink-runtime/src/test/java/org/apache/flink/runtime/jobmanager/scheduler/SchedulerTestBase.java
index 873793f..9c8f2d8 100644
--- a/flink-runtime/src/test/java/org/apache/flink/runtime/jobmanager/scheduler/SchedulerTestBase.java
+++ b/flink-runtime/src/test/java/org/apache/flink/runtime/jobmanager/scheduler/SchedulerTestBase.java
@@ -160,7 +160,7 @@ public class SchedulerTestBase extends TestLogger {
 				final SlotOffer slotOffer = new SlotOffer(
 					new AllocationID(),
 					i,
-					ResourceProfile.UNKNOWN);
+					ResourceProfile.ANY);
 
 				slotOffers.add(slotOffer);
 			}