TestHealthCheckFailure invokes the unary Check() RPC on the health server with an expired context and expects the RPC to fail.
(t *testing.T)
| 940 | // TestHealthCheckFailure invokes the unary Check() RPC on the health server |
| 941 | // with an expired context and expects the RPC to fail. |
| 942 | func (s) TestHealthCheckFailure(t *testing.T) { |
| 943 | e := env{ |
| 944 | name: "tcp-tls", |
| 945 | network: "tcp", |
| 946 | security: "tls", |
| 947 | balancer: roundrobin.Name, |
| 948 | } |
| 949 | te := newTest(t, e) |
| 950 | te.declareLogNoise( |
| 951 | "Failed to dial ", |
| 952 | "grpc: the client connection is closing; please retry", |
| 953 | ) |
| 954 | te.enableHealthServer = true |
| 955 | te.startServer(&testServer{security: e.security}) |
| 956 | te.setHealthServingStatus(defaultHealthService, healthpb.HealthCheckResponse_SERVING) |
| 957 | defer te.tearDown() |
| 958 | |
| 959 | verifyHealthCheckErrCode(t, 0*time.Second, te.clientConn(), defaultHealthService, codes.DeadlineExceeded) |
| 960 | awaitNewConnLogOutput() |
| 961 | } |
| 962 | |
| 963 | // TestHealthCheckOff makes a unary Check() RPC on the health server where the |
| 964 | // health status of the defaultHealthService is not set, and therefore expects |
nothing calls this directly
no test coverage detected