test: use port 0 to simulate connection refused
This MR includes two commits:
-
chore: string conversion according to styleguide
Address picodata#171 (comment 19591).
-
test: use port 0 to simulate connection refused
This change emphasizes the intention to test client behavior against "connection refused" errors. It is impossible to bind a socket to port 0, as it allocates an ephemeral port from
ip_local_port_range
. Therefore, connections to port 0 always fail. For more information on how this works, please seeman 7 ip
andman 2 bind
. You can also refer to an explanation on stackoverflow.