@Test public void testHealthCheck() throws ExecutionException, InterruptedException { final HealthCheckRequest healthCheckRequest = HealthCheckRequest.newBuilder().setService(GreeterGrpc.getServiceDescriptor().getName()).build(); final HealthGrpc.HealthFutureStub healthFutureStub = HealthGrpc.newFutureStub(channel); final HealthCheckResponse.ServingStatus servingStatus = healthFutureStub.check(healthCheckRequest).get().getStatus(); assertNotNull(servingStatus); assertEquals(servingStatus, HealthCheckResponse.ServingStatus.SERVING); } }
/** * Creates a new ListenableFuture-style stub that supports unary calls on the service */ public static HealthFutureStub newFutureStub( io.grpc.Channel channel) { return new HealthFutureStub(channel); }
/** * Creates a new ListenableFuture-style stub that supports unary calls on the service */ public static HealthFutureStub newFutureStub( io.grpc.Channel channel) { return new HealthFutureStub(channel); }
@java.lang.Override protected HealthFutureStub build(io.grpc.Channel channel, io.grpc.CallOptions callOptions) { return new HealthFutureStub(channel, callOptions); }
/** * Creates a new ListenableFuture-style stub that supports unary calls on the service */ public static HealthFutureStub newFutureStub( io.grpc.Channel channel) { return new HealthFutureStub(channel); }
@java.lang.Override protected HealthFutureStub build(io.grpc.Channel channel, io.grpc.CallOptions callOptions) { return new HealthFutureStub(channel, callOptions); }
/** */ public com.google.common.util.concurrent.ListenableFuture<io.grpc.health.v1.HealthProto.HealthCheckResponse> check( io.grpc.health.v1.HealthProto.HealthCheckRequest request) { return futureUnaryCall( getChannel().newCall(getCheckMethod(), getCallOptions()), request); } }
/** */ public com.google.common.util.concurrent.ListenableFuture<io.grpc.health.v1.HealthProto.HealthCheckResponse> check( io.grpc.health.v1.HealthProto.HealthCheckRequest request) { return futureUnaryCall( getChannel().newCall(getCheckMethod(), getCallOptions()), request); } }
@java.lang.Override protected HealthFutureStub build(io.grpc.Channel channel, io.grpc.CallOptions callOptions) { return new HealthFutureStub(channel, callOptions); }
/** */ public com.google.common.util.concurrent.ListenableFuture<io.grpc.health.v1.HealthProto.HealthCheckResponse> check( io.grpc.health.v1.HealthProto.HealthCheckRequest request) { return futureUnaryCall( getChannel().newCall(getCheckMethod(), getCallOptions()), request); } }
@Test public void testHealthCheck() throws ExecutionException, InterruptedException { final HealthCheckRequest healthCheckRequest = HealthCheckRequest.newBuilder().setService(GreeterGrpc.getServiceDescriptor().getName()).build(); final HealthGrpc.HealthFutureStub healthFutureStub = HealthGrpc.newFutureStub(channel); final HealthCheckResponse.ServingStatus servingStatus = healthFutureStub.check(healthCheckRequest).get().getStatus(); assertNotNull(servingStatus); assertEquals(servingStatus, HealthCheckResponse.ServingStatus.SERVING); } }