Skip to content

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

Open
wants to merge 5 commits into
base: main
Choose a base branch
from

Conversation

danieleggert
Copy link

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.

Copy link
Contributor

@Lukasa Lukasa left a 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.

@danieleggert danieleggert force-pushed the add-unix-domain-socket-test branch from d2a74da to 6771f4e Compare May 1, 2025 11:23
@glbrntt glbrntt added the semver/none No version bump required. label May 1, 2025
group.addTask {
// Create a client connection to the server:
let clientChannel = try await makeClientChannel(path: path)
print("Executing client channel")
Copy link
Contributor

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?

Copy link
Author

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 {
Copy link
Contributor

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?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
semver/none No version bump required.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants