Commit 61c0fbf
authored
Fix flaky ServerEphemeralLocalPortTest.builtWithoutLocalPort() (#6665)
Motivation:
Fixes #6616
it asserts that the OS assigns different ephemeral port numbers to
127.0.0.1 and ::1. Since these are different network interfaces, the OS
is free to assign the same port to both — no conflict exists. This
makes the assertion non-deterministic
Modifications:
- Removed the `distinct().hasSize(2)` assertion in
`builtWithoutLocalPort()`
- The remaining assertions (`hasSize(2)`, `isLoopbackAddress()`,
`portGroup() == 0`)
already fully verify the intended behavior
Result:
- The test no longer fails when the OS assigns the same ephemeral port
to both loopback interfaces1 parent 558100c commit 61c0fbf
File tree
1 file changed
+32
-2
lines changed- core/src/test/java/com/linecorp/armeria/server
1 file changed
+32
-2
lines changedLines changed: 32 additions & 2 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
62 | 62 | | |
63 | 63 | | |
64 | 64 | | |
| 65 | + | |
| 66 | + | |
| 67 | + | |
| 68 | + | |
| 69 | + | |
| 70 | + | |
| 71 | + | |
| 72 | + | |
| 73 | + | |
| 74 | + | |
65 | 75 | | |
66 | 76 | | |
67 | 77 | | |
| |||
125 | 135 | | |
126 | 136 | | |
127 | 137 | | |
| 138 | + | |
128 | 139 | | |
129 | | - | |
130 | | - | |
| 140 | + | |
| 141 | + | |
| 142 | + | |
| 143 | + | |
| 144 | + | |
| 145 | + | |
| 146 | + | |
| 147 | + | |
| 148 | + | |
| 149 | + | |
| 150 | + | |
| 151 | + | |
| 152 | + | |
| 153 | + | |
| 154 | + | |
| 155 | + | |
| 156 | + | |
| 157 | + | |
| 158 | + | |
| 159 | + | |
| 160 | + | |
131 | 161 | | |
132 | 162 | | |
0 commit comments