Commit 3c3ea41
authored
Fix test allocated processors test (#55429)
This test tries to set the number of allocated processors to seven. That
is fine, unless the test is running on a machine where
Runtime#availableProcessors is less than seven (typically when there are
fewer than seven logical cores, but it can happen in various other ways
related to CPU quotas in Docker containers with Docker-aware JVMs,
etc.). This commit addresses this by randomizing the number of allocated
processors, to a value that is less than or equal to the hard constraint
on the number of allocated processors.1 parent 71a3dc9 commit 3c3ea41
File tree
1 file changed
+4
-3
lines changed- server/src/test/java/org/elasticsearch/action/admin/cluster/stats
1 file changed
+4
-3
lines changedLines changed: 4 additions & 3 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
210 | 210 | | |
211 | 211 | | |
212 | 212 | | |
213 | | - | |
214 | | - | |
| 213 | + | |
| 214 | + | |
| 215 | + | |
215 | 216 | | |
216 | 217 | | |
217 | 218 | | |
218 | | - | |
| 219 | + | |
219 | 220 | | |
220 | 221 | | |
221 | 222 | | |
| |||
0 commit comments