Commit 07e0704
authored
chore: Allow OS to assign port for unit tests (#336)
Previously we started looking for testing ports starting at 5000. If the
port was in use, we would incrementally search upwards until we found a
port we could use.
A recent change in the GH Windows image resulted in a permission error
being raised before we could find a port to use:
```
Failure/Error: WEBrick::HTTPServer.new(base_opts)
Errno::EACCES:
Permission denied - bind(2) for 127.0.0.1:50018
```
To address this, we are modifying the tests to set a port of 0, which
will allow the OS to assign an available port for us. This removes the
need for this silly retry logic and hard coded port numbers.1 parent 6308826 commit 07e0704
2 files changed
+14
-24
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
13 | 13 | | |
14 | 14 | | |
15 | 15 | | |
| 16 | + | |
16 | 17 | | |
17 | 18 | | |
18 | 19 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
7 | 7 | | |
8 | 8 | | |
9 | 9 | | |
10 | | - | |
11 | | - | |
12 | 10 | | |
13 | | - | |
14 | 11 | | |
15 | | - | |
16 | | - | |
17 | | - | |
18 | | - | |
19 | | - | |
20 | | - | |
21 | | - | |
22 | | - | |
23 | | - | |
24 | | - | |
25 | | - | |
26 | | - | |
27 | | - | |
| 12 | + | |
| 13 | + | |
| 14 | + | |
| 15 | + | |
| 16 | + | |
| 17 | + | |
| 18 | + | |
| 19 | + | |
28 | 20 | | |
29 | 21 | | |
30 | 22 | | |
31 | 23 | | |
32 | | - | |
33 | | - | |
34 | | - | |
35 | | - | |
36 | | - | |
37 | | - | |
38 | | - | |
39 | | - | |
| 24 | + | |
| 25 | + | |
| 26 | + | |
| 27 | + | |
| 28 | + | |
40 | 29 | | |
41 | 30 | | |
42 | 31 | | |
| |||
0 commit comments