Commit 53d2c47
committed
Fix testRunStateChangePolicyWithAsyncActionNextStep race condition (#40707)
Previously we only set the latch countdown with `nextStep.setLatch` after the
cluster state change has already been counted down. However, it's possible
execution could have already started, causing the latch to be missed when the
`MockAsyncActionStep` is being executed.
This moves the latch setting to be before the call to
`runPolicyAfterStateChange`, which means it is always available when the
`MockAsyncActionStep` is executed.
I was able to reproduce the failure every 30-40 runs before this change. With
this change, running 2000+ times the test passes.
Resolves #400181 parent 4ed591a commit 53d2c47
File tree
1 file changed
+2
-4
lines changed- x-pack/plugin/ilm/src/test/java/org/elasticsearch/xpack/indexlifecycle
1 file changed
+2
-4
lines changedLines changed: 2 additions & 4 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
385 | 385 | | |
386 | 386 | | |
387 | 387 | | |
| 388 | + | |
| 389 | + | |
388 | 390 | | |
389 | 391 | | |
390 | 392 | | |
391 | 393 | | |
392 | | - | |
393 | | - | |
394 | | - | |
395 | | - | |
396 | 394 | | |
397 | 395 | | |
398 | 396 | | |
| |||
0 commit comments