(t *testing.T)
| 215 | func (failFastError) Temporary() bool { return false } |
| 216 | |
| 217 | func (s) TestDialContextFailFast(t *testing.T) { |
| 218 | ctx, cancel := context.WithTimeout(context.Background(), 10*time.Second) |
| 219 | defer cancel() |
| 220 | failErr := failFastError{} |
| 221 | dialer := func(string, time.Duration) (net.Conn, error) { |
| 222 | return nil, failErr |
| 223 | } |
| 224 | |
| 225 | _, err := DialContext(ctx, "Non-Existent.Server:80", WithBlock(), WithTransportCredentials(insecure.NewCredentials()), WithDialer(dialer), FailOnNonTempDialError(true)) |
| 226 | if terr, ok := err.(transport.ConnectionError); !ok || terr.Origin() != failErr { |
| 227 | t.Fatalf("DialContext() = _, %v, want _, %v", err, failErr) |
| 228 | } |
| 229 | } |
| 230 | |
| 231 | func (s) TestClientUpdatesParamsAfterGoAway(t *testing.T) { |
| 232 | grpctest.ExpectError("Client received GoAway with error code ENHANCE_YOUR_CALM and debug data equal to ASCII \"too_many_pings\"") |
nothing calls this directly
no test coverage detected