Skip to content

Test that implement AbstractUpgradeTestCase fail with deprecation warnings #38395

@jkakavas

Description

@jkakavas

AbstractUpgradeTestCase#setupForTest() does a "template exists" request

public void setupForTests() throws Exception {
awaitBusy(() -> {
boolean success = true;
for (String template : templatesToWaitFor()) {
try {
final boolean exists = adminClient()
.performRequest(new Request("HEAD", "_template/" + template))
.getStatusLine().getStatusCode() == 200;
success &= exists;
logger.debug("template [{}] exists [{}]", template, exists);
} catch (IOException e) {
logger.warn("error calling template api", e);
}
}
return success;
});
}

which now started to throw deprecation warnings for types removal

> Warnings: [[types removal] The response format of get index template requests will change in the next major version. Please start using the `include_type_name` parameter set to `false` in the request to move to the new, typeless response format that will be the default in 7.0.]

and makes all tests fail. I assume we can just add setOptions(allowTypeRemovalWarnings()) to the request but seeing this is also a deprecated method, is there any better way?

Metadata

Metadata

Assignees

No one assigned

    Labels

    :Search Foundations/MappingIndex mappings, including merging and defining field types>test-failureTriaged test failures from CITeam:Search FoundationsMeta label for the Search Foundations team in Elasticsearch

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions