(t *testing.T)
| 646 | } |
| 647 | |
| 648 | func (s) TestBackoffCancel(t *testing.T) { |
| 649 | dialStrCh := make(chan string) |
| 650 | cc, err := NewClient("passthrough:///", WithTransportCredentials(insecure.NewCredentials()), WithDialer(func(t string, _ time.Duration) (net.Conn, error) { |
| 651 | dialStrCh <- t |
| 652 | return nil, fmt.Errorf("test dialer, always error") |
| 653 | })) |
| 654 | if err != nil { |
| 655 | t.Fatalf("grpc.NewClient() failed: %v", err) |
| 656 | } |
| 657 | cc.Connect() |
| 658 | defer cc.Close() |
| 659 | |
| 660 | select { |
| 661 | case <-time.After(defaultTestTimeout): |
| 662 | t.Fatal("Timeout when waiting for custom dialer to be invoked during Connect()") |
| 663 | case <-dialStrCh: |
| 664 | } |
| 665 | } |
| 666 | |
| 667 | // TestUpdateAddresses_NoopIfCalledWithSameAddresses tests that UpdateAddresses |
| 668 | // should be noop if UpdateAddresses is called with the same list of addresses, |
nothing calls this directly
no test coverage detected