Skip to content

Commit

Permalink
[hotfix][runtime] Fix test cases that use unknown resource profiles i…
Browse files Browse the repository at this point in the history
…n 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.
  • Loading branch information
xintongsong authored and StephanEwen committed Jul 10, 2019
1 parent fa8f931 commit b5f2303
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -751,7 +751,7 @@ private static Scheduler createSchedulerWithSlots(
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);
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -160,7 +160,7 @@ public TaskManagerLocation addTaskManager(int numberSlots) {
final SlotOffer slotOffer = new SlotOffer(
new AllocationID(),
i,
ResourceProfile.UNKNOWN);
ResourceProfile.ANY);

slotOffers.add(slotOffer);
}
Expand Down

0 comments on commit b5f2303

Please sign in to comment.