Commit 7c87b07
authored
Speed up internal cluster tests by optimizing #awaitGlobalNettyThreadsFinish (#93890)
Using the #awaitInactivity call costs almost 1s every time it's called
since that's the hard coded quiet period of the executor and its thread
is mostly started at the end of a test (before #awaitGlobalNettyThreadsFinish) as
a result of shutting down the nodes (the global pool is used for
resolving pool shutdown listeners).
By simply asserting that we don't have any tasks queued on it we get a
stronger assertion and save a second per test suite almost.
This is particularly helpful when running tests on a laptop with less
parallelism. This partically saves over a minute when running
`server:check` on my laptop.1 parent 0b1c91c commit 7c87b07
File tree
3 files changed
+28
-15
lines changed- test/framework/src/main/java/org/elasticsearch/test
3 files changed
+28
-15
lines changedLines changed: 5 additions & 14 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
2269 | 2269 | | |
2270 | 2270 | | |
2271 | 2271 | | |
2272 | | - | |
2273 | | - | |
| 2272 | + | |
2274 | 2273 | | |
2275 | | - | |
2276 | | - | |
2277 | | - | |
2278 | | - | |
2279 | | - | |
2280 | | - | |
2281 | | - | |
2282 | | - | |
2283 | | - | |
2284 | | - | |
2285 | | - | |
2286 | | - | |
| 2274 | + | |
| 2275 | + | |
| 2276 | + | |
| 2277 | + | |
2287 | 2278 | | |
2288 | 2279 | | |
2289 | 2280 | | |
| |||
Lines changed: 1 addition & 1 deletion
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
182 | 182 | | |
183 | 183 | | |
184 | 184 | | |
185 | | - | |
| 185 | + | |
186 | 186 | | |
187 | 187 | | |
188 | 188 | | |
| |||
Lines changed: 22 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
| 6 | + | |
| 7 | + | |
| 8 | + | |
| 9 | + | |
| 10 | + | |
| 11 | + | |
| 12 | + | |
| 13 | + | |
| 14 | + | |
| 15 | + | |
| 16 | + | |
| 17 | + | |
| 18 | + | |
| 19 | + | |
| 20 | + | |
| 21 | + | |
| 22 | + | |
0 commit comments