A vibe-coded container setup that runs System.Net.Sockets.Socket.ConnectAsync tests on Linux. It uses tc to introduce artificial delay so we can simulate slow connections and define tests for Happy Eyeballs scenarios where IPv4 and IPv4 connection attempts are racing with each other.
- You have to be on Linux
- Change
TESTRUNTIMEin.envto point to your locally-built runtime. - Run
docker compose up --build --abort-on-container-exitfrom the repo root.
- The docker setup defines a
testclientcontainer and various test server containers (server-v4-fast,server-v4-slow,server-v6-fast,server-v6-slow).testclientruns Xunit tests which attempt to connect to the sockets hosted in the server containers. - Each server is configured with
tc qdisc add dev eth0 root netem delay ${DELAY}msto delay TCP packets. testclienthosts a CoreDNS server to resolve predefined hostnames.- The IP addresses and the hostnames are defined in the
.envfile. - The IP addresses and the hostnames are used in
TestClient/ConnectTests.cstest cases to test various (Parallel) connection behaviors.