cli
cli copied to clipboard
[Feature Request] Fix free-port assignment to actually try to connect
Describe the solution you'd like
We assumed incorrectly that OSs won't give out recently bound ports, but tests reveal it may. Fix https://github.com/temporalio/cli/blob/main/temporalcli/devserver/freeport.go to:
- Just have one
GetFreePort() (int, error)call and none of that extra port-provider stuff - Make the
GetFreePort()listener also accept a socket connection before closing both the listener and socket and returning the port
Probably don't even need a separate file anymore, this can be a simple single-method utility with the rest of the dev server stuff