Handle deprecation header-AbstractUpgradeTestCase (#38396)

This commit is contained in:
Ioannis Kakavas 2019-02-05 23:11:21 +02:00 committed by Christoph Büscher
parent afcdbd2bc0
commit 1f4f6f35c8
1 changed files with 3 additions and 1 deletions

View File

@ -86,8 +86,10 @@ public abstract class AbstractUpgradeTestCase extends ESRestTestCase {
boolean success = true;
for (String template : templatesToWaitFor()) {
try {
final Request headRequest = new Request("HEAD", "_template/" + template);
headRequest.setOptions(allowTypeRemovalWarnings());
final boolean exists = adminClient()
.performRequest(new Request("HEAD", "_template/" + template))
.performRequest(headRequest)
.getStatusLine().getStatusCode() == 200;
success &= exists;
logger.debug("template [{}] exists [{}]", template, exists);