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

add DialTimeout and cleanup ResolveEndpoint #372

Open
wants to merge 2 commits into
base: main
Choose a base branch
from
Open
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 3 additions & 2 deletions uacp/endpoint_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -38,11 +38,12 @@ func TestResolveEndpoint(t *testing.T) {
"",
},
{ // Valid, hostname resolved
"opc.tcp://localhost:4840/foo/bar",
// note: xip.io is hosted by Basecamp (see: https://github.com/basecamp/xip-pdns)
Copy link
Member

Choose a reason for hiding this comment

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

This is awesome. I never knew.

Copy link
Member Author

Choose a reason for hiding this comment

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

I suppose this should be in an integration test rather than a normal unit test since it requires a mostly working network stack. 🤷

Copy link
Member Author

Choose a reason for hiding this comment

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

xip is dead. long live https://sslip.io/

"opc.tcp://www.1.1.1.1.xip.io:4840/foo/bar",
"tcp",
&url.URL{
Scheme: "opc.tcp",
Host: "127.0.0.1:4840",
Host: "1.1.1.1:4840",
Path: "/foo/bar",
},
"",
Expand Down