Skip to content

chore: random ports in tests#190

Draft
mightyiam wants to merge 1 commit intolomirus:mainfrom
molybdenumsoftware:test-random-ports
Draft

chore: random ports in tests#190
mightyiam wants to merge 1 commit intolomirus:mainfrom
molybdenumsoftware:test-random-ports

Conversation

@mightyiam
Copy link
Contributor

No description provided.

@mightyiam mightyiam marked this pull request as ready for review December 4, 2025 11:33
@lomirus
Copy link
Owner

lomirus commented Dec 7, 2025

If the goal is to test on a random port, maybe we can simply use port 0 to avoid introducing an extra dependency?

@mightyiam
Copy link
Contributor Author

Well, we need to use the port number both in the argument to the test subject and in arguments to whatever will be making requests. Ideally, the platform could give us a way to reserve a port and then pass it to a CLI to use, but I guess that's too much to ask. So we need to keep track of ports across multiple threads 🤷

@mightyiam mightyiam marked this pull request as draft December 7, 2025 07:29
@mightyiam
Copy link
Contributor Author

I converted this to draft because I have learned while working on #191 (which is also still draft for a different reason) that each such port must be reserved (locally, at least) to prevent port reuse which would result in failure. Such a mechanism is included in #191, so perhaps I shall focus on getting that through and subsequently the mechanism could be reused here. Although it is a trivial mechanism really.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants