Search in sources :

Example 1 with JobFunctions.changeServiceJobCapacity

use of com.netflix.titus.api.jobmanager.model.job.JobFunctions.changeServiceJobCapacity in project titus-control-plane by Netflix.

the class ServiceJobSchedulingTest method testJobCapacityUpdateToIdenticalAsCurrentCapacityIsNoOp.

@Test
public void testJobCapacityUpdateToIdenticalAsCurrentCapacityIsNoOp() {
    Capacity fixedCapacity = Capacity.newBuilder().withMin(1).withDesired(1).withMax(1).build();
    JobDescriptor<ServiceJobExt> job = JobFunctions.changeServiceJobCapacity(oneTaskServiceJobDescriptor(), fixedCapacity);
    jobsScenarioBuilder.scheduleJob(job, jobScenario -> jobScenario.template(ScenarioTemplates.acceptJobWithOneTask(0, 0)).changeCapacity(fixedCapacity).advance().advance().expectNoStoreUpdate().expectNoJobStateChangeEvent().expectNoTaskStateChangeEvent());
}
Also used : JobFunctions.changeServiceJobCapacity(com.netflix.titus.api.jobmanager.model.job.JobFunctions.changeServiceJobCapacity) Capacity(com.netflix.titus.api.jobmanager.model.job.Capacity) ServiceJobExt(com.netflix.titus.api.jobmanager.model.job.ext.ServiceJobExt) Test(org.junit.Test)

Aggregations

Capacity (com.netflix.titus.api.jobmanager.model.job.Capacity)1 JobFunctions.changeServiceJobCapacity (com.netflix.titus.api.jobmanager.model.job.JobFunctions.changeServiceJobCapacity)1 ServiceJobExt (com.netflix.titus.api.jobmanager.model.job.ext.ServiceJobExt)1 Test (org.junit.Test)1