(t *testing.T, wantBackoff internalbackoff.Exponential, opts ...DialOption)
| 425 | } |
| 426 | |
| 427 | func testBackoffConfigSet(t *testing.T, wantBackoff internalbackoff.Exponential, opts ...DialOption) { |
| 428 | opts = append(opts, WithTransportCredentials(insecure.NewCredentials())) |
| 429 | conn, err := NewClient("passthrough:///foo:80", opts...) |
| 430 | if err != nil { |
| 431 | t.Fatalf("grpc.NewClient() failed: %v", err) |
| 432 | } |
| 433 | defer conn.Close() |
| 434 | |
| 435 | if conn.dopts.bs == nil { |
| 436 | t.Fatalf("backoff config not set") |
| 437 | } |
| 438 | |
| 439 | gotBackoff, ok := conn.dopts.bs.(internalbackoff.Exponential) |
| 440 | if !ok { |
| 441 | t.Fatalf("unexpected type of backoff config: %#v", conn.dopts.bs) |
| 442 | } |
| 443 | |
| 444 | if gotBackoff != wantBackoff { |
| 445 | t.Fatalf("unexpected backoff config on connection: %v, want %v", gotBackoff, wantBackoff) |
| 446 | } |
| 447 | } |
| 448 | |
| 449 | func (s) TestConnectParamsWithMinConnectTimeout(t *testing.T) { |
| 450 | // Default value specified for minConnectTimeout in the spec is 20 seconds. |
no test coverage detected