Search in sources :

Example 16 with TaskUpdateEvent

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

the class JobScenarioBuilder method expectTaskStateChangeEvent.

public JobScenarioBuilder expectTaskStateChangeEvent(int taskIdx, int resubmit, TaskState taskState) {
    TaskUpdateEvent event = expectTaskEvent(taskIdx, resubmit);
    TaskStatus status = event.getCurrent().getStatus();
    assertThat(status.getState()).isEqualTo(taskState);
    return this;
}
Also used : TaskStatus(com.netflix.titus.api.jobmanager.model.job.TaskStatus) TaskUpdateEvent(com.netflix.titus.api.jobmanager.model.job.event.TaskUpdateEvent)

Aggregations

TaskUpdateEvent (com.netflix.titus.api.jobmanager.model.job.event.TaskUpdateEvent)16 Task (com.netflix.titus.api.jobmanager.model.job.Task)11 Job (com.netflix.titus.api.jobmanager.model.job.Job)8 JobUpdateEvent (com.netflix.titus.api.jobmanager.model.job.event.JobUpdateEvent)7 JobManagerEvent (com.netflix.titus.api.jobmanager.model.job.event.JobManagerEvent)5 JobChangeNotification (com.netflix.titus.grpc.protogen.JobChangeNotification)4 List (java.util.List)4 Test (org.junit.Test)4 TaskStatus (com.netflix.titus.api.jobmanager.model.job.TaskStatus)3 ExtTestSubscriber (com.netflix.titus.testkit.rx.ExtTestSubscriber)3 ArrayList (java.util.ArrayList)3 Optional (java.util.Optional)3 TaskAttributes (com.netflix.titus.api.jobmanager.TaskAttributes)2 BatchJobTask (com.netflix.titus.api.jobmanager.model.job.BatchJobTask)2 TaskState (com.netflix.titus.api.jobmanager.model.job.TaskState)2 TitusRuntime (com.netflix.titus.common.runtime.TitusRuntime)2 TitusRuntimes (com.netflix.titus.common.runtime.TitusRuntimes)2 ObserveJobsQuery (com.netflix.titus.grpc.protogen.ObserveJobsQuery)2 JobConnectorConfiguration (com.netflix.titus.runtime.connector.jobmanager.JobConnectorConfiguration)2 JobManagementClient (com.netflix.titus.runtime.connector.jobmanager.JobManagementClient)2