-
Notifications
You must be signed in to change notification settings - Fork 670
Add unix domain socket based async channel test #3225
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
base: main
Are you sure you want to change the base?
Conversation
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.
Thanks for this Daniel! In general we're happy to take a test like this, but it will need to be an XCTest, not a swift-testing test, as we still support 5.10.
d2a74da
to
6771f4e
Compare
group.addTask { | ||
// Create a client connection to the server: | ||
let clientChannel = try await makeClientChannel(path: path) | ||
print("Executing client channel") |
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.
Can you remove the prints?
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.
Even in test code? This is super helpful for diagnosing these when they fail.
} | ||
print("S: Bye") | ||
} | ||
} catch { |
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.
Can we just make handleConnection
throwing and propagate that error up rather than suppressing it?
Add unix domain socket based async channel test.
Motivation:
This adds additional test coverage, and also provides an example for how to setup async-channel based UNIX domain socket channel pairs (server + client).
Modifications:
Adds a new file with test code.
Result:
Changes to test only.