Skip to content

Commit b2a2b84

Browse files
committed
Changed method name and relaxed when it is called
1 parent 9130ed4 commit b2a2b84

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed

qa/full-cluster-restart/src/test/java/org/elasticsearch/upgrades/FullClusterRestartIT.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -923,8 +923,8 @@ public void testSnapshotRestore() throws IOException {
923923
// We therefore use the deprecated typed APIs when running against the current version.
924924
if (isRunningAgainstOldCluster() == false) {
925925
createTemplateRequest.addParameter(INCLUDE_TYPE_NAME_PARAMETER, "true");
926-
createTemplateRequest.setOptions(expectTypeRemovalWarnings());
927926
}
927+
createTemplateRequest.setOptions(allowTypeRemovalWarnings());
928928

929929
client().performRequest(createTemplateRequest);
930930

@@ -1133,8 +1133,8 @@ && getOldClusterVersion().onOrAfter(Version.V_6_1_0) && getOldClusterVersion().b
11331133
// We therefore use the deprecated typed APIs when running against the current version.
11341134
if (isRunningAgainstOldCluster() == false) {
11351135
getTemplateRequest.addParameter(INCLUDE_TYPE_NAME_PARAMETER, "true");
1136-
getTemplateRequest.setOptions(expectTypeRemovalWarnings());
11371136
}
1137+
getTemplateRequest.setOptions(allowTypeRemovalWarnings());
11381138

11391139
Map<String, Object> getTemplateResponse = entityAsMap(client().performRequest(getTemplateRequest));
11401140
Map<String, Object> expectedTemplate = new HashMap<>();

test/framework/src/main/java/org/elasticsearch/test/rest/ESRestTestCase.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -263,7 +263,7 @@ public static RequestOptions expectWarnings(String... warnings) {
263263
* @deprecated this method is only required while we deprecate types and can be removed in 8.0
264264
*/
265265
@Deprecated
266-
public static RequestOptions expectTypeRemovalWarnings() {
266+
public static RequestOptions allowTypeRemovalWarnings() {
267267
Builder builder = RequestOptions.DEFAULT.toBuilder();
268268
builder.setWarningsHandler(new WarningsHandler() {
269269
@Override

0 commit comments

Comments
 (0)