-
Notifications
You must be signed in to change notification settings - Fork 80
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
thriftbp: Support unix domain socket on thrift clients #649
Conversation
thriftbp/thrifttest/server.go
Outdated
dir := cfg.TB.TempDir() | ||
path := filepath.Join(dir, "socket") | ||
socket = thrift.NewTServerSocketFromAddrTimeout(&net.UnixAddr{ | ||
Net: "unix", | ||
Name: path, | ||
}, 0) | ||
addr = "uds://" + path |
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.
I think this code will likely fail if ran on windows, but I don't think we care about windows users 🤷
if we do care about them, then we can extract this into 2 files with build conditions.
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.
Out of curiosity, what is the reason to prefer unix domain sockets over tcp for testing? I've always preferred TCP when that's what will be used in real code; the two are very similar but do not behave identically and the underlying libraries may even have different explicit behaviors.
I don't have a strong opinion here of course.
I think make the test as close to real production as possible makes sense. Reverted that part of the changes. |
Also update thrifttest to use UDS when possible.