Right now some tests, especially docs tests, may launch async queries, that may due to the server load take significantly longer than intended. This query may linger post cleanup and thus potentially influence next tests or leave cluster in unclean state (e.g. by re-creating .async-search index).
Ideally, we should have some code in the "after" sections of those tests that along with all the rest of cleanups also cleans up all the async queries. It is complicated by the fact that right now we have several async APIs, for various searches and languages (e.g. _search, ES|QL, etc.) and most of them have neither "list all" not "delete all" operation as it appears.
Following up the discussion on https://github.com/elastic/elasticsearch/pull/117301
Right now some tests, especially docs tests, may launch async queries, that may due to the server load take significantly longer than intended. This query may linger post cleanup and thus potentially influence next tests or leave cluster in unclean state (e.g. by re-creating .async-search index).
Ideally, we should have some code in the "after" sections of those tests that along with all the rest of cleanups also cleans up all the async queries. It is complicated by the fact that right now we have several async APIs, for various searches and languages (e.g. _search, ES|QL, etc.) and most of them have neither "list all" not "delete all" operation as it appears.