Skip to content

Commit

Permalink
Fixes test: The comment is obsolete (because we're not using the reso…
Browse files Browse the repository at this point in the history
…urceWaitTimeout anymore) and just adds confusion because we don't need to wait in this test:

0. The mentioned test method #testRequirementLowerBoundIncreaseBeyondCurrentParallelismAttemptsImmediateRescale does not exist (#testRequirementLowerBoundIncreaseBeyondCurrentParallelismKeepsJobRunning is most likely meant)
1. the startJobWithSlotsMatchingParallelism will be executed in the main thread and, therefore, finishes before updateJobResourceRequirements is triggered (which also runs in the main thread)
2. Running both calls in the main thread ensures sequential execution of the commands with the scheduler being in WaitingForResources state when calling updateJobResourceRequirements
  • Loading branch information
XComp committed Feb 28, 2024
1 parent 49f91a1 commit 1f77939
Showing 1 changed file with 0 additions and 8 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -1263,14 +1263,6 @@ void testRequirementLowerBoundDecreaseAfterResourceScarcityBelowAvailableSlots()
startJobWithSlotsMatchingParallelism(
scheduler, declarativeSlotPool, taskManagerGateway, availableSlots);

// at this point we'd ideally check that the job is stuck in WaitingForResources, but we
// can't differentiate between waiting due to the minimum requirements not being fulfilled
// and the resource timeout not being elapsed
// We just continue here, as the following tests validate that the lower bound can prevent
// a job from running:
// - #testInitialRequirementLowerBoundBeyondAvailableSlotsCausesImmediateFailure()
// - #testRequirementLowerBoundIncreaseBeyondCurrentParallelismAttemptsImmediateRescale()

// unlock job by decreasing the parallelism
JobResourceRequirements newJobResourceRequirements =
createRequirementsWithLowerAndUpperParallelism(availableSlots, PARALLELISM);
Expand Down

0 comments on commit 1f77939

Please sign in to comment.