-
Notifications
You must be signed in to change notification settings - Fork 3.5k
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
Fix ipv6 parsing in client #4632
Conversation
Thanks for this. What would be great is to see this code lifted out as a distinct function On Friday, October 30, 2015, Miguel Xavier Penha Neto <
|
Scrap that. It's already a function. What I mean is can you add a unit test showing what would fail to parse correctly previously? |
I added a test with ipv6 that fails with the previous implementation and works with the new one. No idea why the other test failed though, did I do something wrong when adding the new test? |
Hmmm, weird, sent it again and now everything passed, seems there's an intermittent problem that's caused some tests to fail in the meta package. |
Yeah, known issue with the tests in that package. On Saturday, October 31, 2015, Miguel Xavier Penha Neto <
|
@@ -547,3 +547,14 @@ func TestClient_NoTimeout(t *testing.T) { | |||
t.Fatalf("unexpected error. expected %v, actual %v", nil, err) | |||
} | |||
} | |||
|
|||
func TestClient_ParseConnectionStringi_Ipv6(t *testing.T) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Is that a rogue 'i' in the test name?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Also, Go style dictates that this test should be named TestClient_ParseConnectionString_IPv6
.
+1 |
Old implementation of function ParseConnectionString would parse ipv6 incorrectly Added a unit test for this
@otoolep there was indeed a rogue 'i' in there! Fixed the test name, thanks for the feedback! |
Old implementation of function ParseConnectionString would parse ipv6 incorrectly