Handle deprecation warnings in a permissive manner

Relates to #37290
This commit is contained in:
Luca Cavanna 2019-01-28 16:36:39 +01:00
parent 7e4c0e6991
commit 0a850f032b
1 changed files with 5 additions and 0 deletions

View File

@ -7,7 +7,9 @@ package org.elasticsearch.xpack.restart;
import org.elasticsearch.Version; import org.elasticsearch.Version;
import org.elasticsearch.client.Request; import org.elasticsearch.client.Request;
import org.elasticsearch.client.RequestOptions;
import org.elasticsearch.client.Response; import org.elasticsearch.client.Response;
import org.elasticsearch.client.WarningsHandler;
import org.elasticsearch.common.Strings; import org.elasticsearch.common.Strings;
import org.elasticsearch.common.settings.Settings; import org.elasticsearch.common.settings.Settings;
import org.elasticsearch.common.unit.TimeValue; import org.elasticsearch.common.unit.TimeValue;
@ -70,6 +72,9 @@ public class MlMigrationFullClusterRestartIT extends AbstractFullClusterRestartT
"\"airline\": {\"type\": \"keyword\"}," + "\"airline\": {\"type\": \"keyword\"}," +
"\"responsetime\": {\"type\": \"float\"}" + "\"responsetime\": {\"type\": \"float\"}" +
"}}}}"); "}}}}");
RequestOptions.Builder options = createTestIndex.getOptions().toBuilder();
options.setWarningsHandler(WarningsHandler.PERMISSIVE);
createTestIndex.setOptions(options);
client().performRequest(createTestIndex); client().performRequest(createTestIndex);
} }