Skip to content

test: use port 0 to simulate connection refused

Yaroslav Dynnikov requested to merge test-zero-port into master

This MR includes two commits:

  1. chore: string conversion according to styleguide

    Address picodata#171 (comment 19591).

  2. 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 see man 7 ip and man 2 bind. You can also refer to an explanation on stackoverflow.

Merge request reports