Commit c2a0be3
authored
Fix DatafeedJobsIT.testDatafeedTimingStats_DatafeedRecreated (elastic#137928)
This commit fixes two separate issues in the test.
Firstly, the assertion that search_count stats should be equal to zero
may fail the second time the openAndRunJob runnable is invoked if the
stats haven't been updated since the previous datafeed with the same ID
was deleted. Wrapping the assertion in an assertBusy() call prevents
this.
Secondly, deleting the datafeed may fail if the master node which
processes the delete datafeed action hasn't finished updating its state
to reflect the fact that the datafeed has been stopped yet, but the node
that processes the datafeed stats request has. Wrapping the
datafeed deletion in an assertBusy() call allows it to be retried if
this race condition is encountered.
Closes elastic#137207
(cherry picked from commit 2bb729b)1 parent 73ef18e commit c2a0be3
File tree
2 files changed
+9
-5
lines changed- x-pack/plugin/ml/qa/native-multi-node-tests/src/javaRestTest/java/org/elasticsearch/xpack/ml/integration
2 files changed
+9
-5
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
398 | 398 | | |
399 | 399 | | |
400 | 400 | | |
401 | | - | |
402 | | - | |
403 | | - | |
404 | 401 | | |
405 | 402 | | |
406 | 403 | | |
| |||
Lines changed: 9 additions & 2 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
250 | 250 | | |
251 | 251 | | |
252 | 252 | | |
253 | | - | |
| 253 | + | |
254 | 254 | | |
255 | 255 | | |
256 | 256 | | |
| |||
263 | 263 | | |
264 | 264 | | |
265 | 265 | | |
266 | | - | |
| 266 | + | |
| 267 | + | |
| 268 | + | |
| 269 | + | |
| 270 | + | |
| 271 | + | |
| 272 | + | |
| 273 | + | |
267 | 274 | | |
268 | 275 | | |
269 | 276 | | |
| |||
0 commit comments