Search in sources :

Example 1 with KeepAliveResponse

use of com.netflix.titus.grpc.protogen.KeepAliveResponse in project titus-control-plane by Netflix.

the class RemoteJobManagementClientWithKeepAliveTest method testKeepAlive.

@Test
public void testKeepAlive() throws InterruptedException {
    Iterator<JobChangeNotification> it = newClientConnection();
    KeepAliveRequest keepAliveRequest = waitForClientKeepAliveRequest();
    responseObserver.onNext(JobChangeNotification.newBuilder().setKeepAliveResponse(KeepAliveResponse.newBuilder().setRequest(keepAliveRequest).build()).build());
    KeepAliveResponse keepAliveResponse = expectJobChangeNotification(it, JobChangeNotification.NotificationCase.KEEPALIVERESPONSE).getKeepAliveResponse();
    assertThat(keepAliveResponse.getRequest()).isEqualTo(keepAliveRequest);
}
Also used : KeepAliveResponse(com.netflix.titus.grpc.protogen.KeepAliveResponse) JobChangeNotification(com.netflix.titus.grpc.protogen.JobChangeNotification) KeepAliveRequest(com.netflix.titus.grpc.protogen.KeepAliveRequest) ObserveJobsWithKeepAliveRequest(com.netflix.titus.grpc.protogen.ObserveJobsWithKeepAliveRequest) Test(org.junit.Test)

Aggregations

JobChangeNotification (com.netflix.titus.grpc.protogen.JobChangeNotification)1 KeepAliveRequest (com.netflix.titus.grpc.protogen.KeepAliveRequest)1 KeepAliveResponse (com.netflix.titus.grpc.protogen.KeepAliveResponse)1 ObserveJobsWithKeepAliveRequest (com.netflix.titus.grpc.protogen.ObserveJobsWithKeepAliveRequest)1 Test (org.junit.Test)1