Commit 2bb729b
authored
Fix DatafeedJobsIT.testDatafeedTimingStats_DatafeedRecreated (#137856)
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 #1372071 parent d621eb1 commit 2bb729b
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 | |
|---|---|---|---|
| |||
402 | 402 | | |
403 | 403 | | |
404 | 404 | | |
405 | | - | |
406 | | - | |
407 | | - | |
408 | 405 | | |
409 | 406 | | |
410 | 407 | | |
| |||
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