Skip to content

Commit

Permalink
Fix issue with releasing resources in bulk tests (elastic#114186)
Browse files Browse the repository at this point in the history
A recent commit incidentally changed a release resources call from
doBefore to doAfter. Several tests depending on resources being released
synchronously which requires doBefore.

Closes elastic#114181
Closes elastic#114182
  • Loading branch information
Tim-Brooks authored Oct 7, 2024
1 parent 7987c01 commit 8f24f43
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 4 deletions.
3 changes: 0 additions & 3 deletions muted-tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -345,9 +345,6 @@ tests:
- class: org.elasticsearch.xpack.inference.InferenceCrudIT
method: testGet
issue: https://github.com/elastic/elasticsearch/issues/114135
- class: org.elasticsearch.action.bulk.IncrementalBulkIT
method: testIncrementalBulkHighWatermarkBackOff
issue: https://github.com/elastic/elasticsearch/issues/114073
- class: org.elasticsearch.xpack.esql.expression.function.aggregate.AvgTests
method: "testFold {TestCase=<double> #7}"
issue: https://github.com/elastic/elasticsearch/issues/114175
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -194,7 +194,7 @@ public void lastItems(List<DocWriteRequest<?>> items, Releasable releasable, Act
releasables.clear();
// We do not need to set this back to false as this will be the last request.
bulkInProgress = true;
client.bulk(bulkRequest, ActionListener.runAfter(new ActionListener<>() {
client.bulk(bulkRequest, ActionListener.runBefore(new ActionListener<>() {

private final boolean isFirstRequest = incrementalRequestSubmitted == false;

Expand Down

0 comments on commit 8f24f43

Please sign in to comment.