Commit 1b7d919
committed
Avoid listening port collision by letting OS assing ports
Previously, we could in tests potentially run into listening port
collisions resulting into `InvalidSocketAddress` errors. These errors
could surface if we rolled port numbers that either collided with other
concurrent tests *or* with other unrelated services running on
localhost.
Here, we simply let the OS assign us a free port number when setting up
the testing nodes, which avoids such collisions altoghether (mod the
potential TOCTOU race here, which we ignore for now).1 parent 37045f4 commit 1b7d919
1 file changed
+6
-10
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
215 | 215 | | |
216 | 216 | | |
217 | 217 | | |
218 | | - | |
219 | | - | |
220 | | - | |
221 | | - | |
222 | | - | |
223 | 218 | | |
224 | 219 | | |
225 | | - | |
| 220 | + | |
226 | 221 | | |
227 | | - | |
228 | | - | |
| 222 | + | |
| 223 | + | |
| 224 | + | |
229 | 225 | | |
230 | | - | |
| 226 | + | |
231 | 227 | | |
232 | 228 | | |
233 | | - | |
| 229 | + | |
234 | 230 | | |
235 | 231 | | |
236 | 232 | | |
| |||
0 commit comments