Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ClientConn: add Target() returning target string #2233

Merged
merged 3 commits into from Jul 23, 2018

Conversation

lyuxuan
Copy link
Contributor

@lyuxuan lyuxuan commented Jul 20, 2018

No description provided.

@@ -689,3 +689,16 @@ func TestDisableServiceConfigOption(t *testing.T) {
t.Fatalf("want: method (\"/foo/bar/\") config to be empty, got: %v", m)
}
}

func TestGetClientConnTarget(t *testing.T) {
r, cleanup := manual.GenerateAndRegisterManualResolver()
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Resolver is not necessary in this test.
Just Dial("nonexist:///non.existent") would work.

r, cleanup := manual.GenerateAndRegisterManualResolver()
defer cleanup()
addr := r.Scheme() + ":///non.existent"
cc, err := Dial(addr, WithInsecure())
Copy link
Contributor

@menghanl menghanl Jul 23, 2018

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

defer cc.Close() (after the error check)

@lyuxuan lyuxuan merged commit 980d9e0 into grpc:master Jul 23, 2018
@dfawley dfawley added this to the 1.14 Release milestone Jul 26, 2018
@lock lock bot locked as resolved and limited conversation to collaborators Jan 22, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants