fix compilation changes
This commit is contained in:
parent
9850f44b95
commit
ebff02c1b2
|
@ -57,14 +57,6 @@ public class DeleteLifecycleAction
|
|||
super(acknowledged);
|
||||
}
|
||||
|
||||
@Override
|
||||
public XContentBuilder toXContent(XContentBuilder builder, Params params) throws IOException {
|
||||
builder.startObject();
|
||||
addAcknowledgedField(builder);
|
||||
builder.endObject();
|
||||
return builder;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void readFrom(StreamInput in) throws IOException {
|
||||
readAcknowledged(in);
|
||||
|
|
|
@ -59,14 +59,6 @@ public class PutLifecycleAction extends Action<PutLifecycleAction.Request, PutLi
|
|||
super(acknowledged);
|
||||
}
|
||||
|
||||
@Override
|
||||
public XContentBuilder toXContent(XContentBuilder builder, Params params) throws IOException {
|
||||
builder.startObject();
|
||||
addAcknowledgedField(builder);
|
||||
builder.endObject();
|
||||
return builder;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void readFrom(StreamInput in) throws IOException {
|
||||
readAcknowledged(in);
|
||||
|
|
|
@ -22,8 +22,8 @@ public class DeleteLifecycleRequestTests extends AbstractStreamableTestCase<Dele
|
|||
}
|
||||
|
||||
@Override
|
||||
protected MutateFunction<Request> getMutateFunction() {
|
||||
return resp -> new Request(resp.getPolicyName() + randomAlphaOfLengthBetween(1, 10));
|
||||
protected Request mutateInstance(Request request) {
|
||||
return new Request(request.getPolicyName() + randomAlphaOfLengthBetween(1, 10));
|
||||
}
|
||||
|
||||
}
|
||||
|
|
|
@ -22,8 +22,8 @@ public class DeleteLifecycleResponseTests extends AbstractStreamableTestCase<Del
|
|||
}
|
||||
|
||||
@Override
|
||||
protected MutateFunction<Response> getMutateFunction() {
|
||||
return resp -> new Response(resp.isAcknowledged() == false);
|
||||
protected Response mutateInstance(Response response) {
|
||||
return new Response(response.isAcknowledged() == false);
|
||||
}
|
||||
|
||||
}
|
||||
|
|
|
@ -22,7 +22,7 @@ public class GetLifecycleRequestTests extends AbstractStreamableTestCase<GetLife
|
|||
}
|
||||
|
||||
@Override
|
||||
protected MutateFunction<Request> getMutateFunction() {
|
||||
return resp -> new Request(resp.getPolicyName() + randomAlphaOfLengthBetween(1, 10));
|
||||
protected Request mutateInstance(Request request) {
|
||||
return new Request(request.getPolicyName() + randomAlphaOfLengthBetween(1, 10));
|
||||
}
|
||||
}
|
||||
|
|
|
@ -50,25 +50,23 @@ public class GetLifecycleResponseTests extends AbstractStreamableTestCase<GetLif
|
|||
}
|
||||
|
||||
@Override
|
||||
protected MutateFunction<Response> getMutateFunction() {
|
||||
return resp -> {
|
||||
LifecyclePolicy policy = resp.getPolicy();
|
||||
String name = policy.getName();
|
||||
Map<String, Phase> phases = policy.getPhases();
|
||||
switch (between(0, 1)) {
|
||||
case 0:
|
||||
name = name + randomAlphaOfLengthBetween(1, 5);
|
||||
break;
|
||||
case 1:
|
||||
phases = new HashMap<>(phases);
|
||||
String newPhaseName = randomAlphaOfLengthBetween(1, 10);
|
||||
phases.put(name, new Phase(newPhaseName, TimeValue.timeValueSeconds(randomIntBetween(1, 1000)),
|
||||
Collections.emptyMap()));
|
||||
break;
|
||||
default:
|
||||
throw new AssertionError("Illegal randomisation branch");
|
||||
}
|
||||
return new Response(new LifecyclePolicy(TestLifecycleType.INSTANCE, name, phases));
|
||||
};
|
||||
protected Response mutateInstance(Response response) {
|
||||
LifecyclePolicy policy = response.getPolicy();
|
||||
String name = policy.getName();
|
||||
Map<String, Phase> phases = policy.getPhases();
|
||||
switch (between(0, 1)) {
|
||||
case 0:
|
||||
name = name + randomAlphaOfLengthBetween(1, 5);
|
||||
break;
|
||||
case 1:
|
||||
phases = new HashMap<>(phases);
|
||||
String newPhaseName = randomAlphaOfLengthBetween(1, 10);
|
||||
phases.put(name, new Phase(newPhaseName, TimeValue.timeValueSeconds(randomIntBetween(1, 1000)),
|
||||
Collections.emptyMap()));
|
||||
break;
|
||||
default:
|
||||
throw new AssertionError("Illegal randomisation branch");
|
||||
}
|
||||
return new Response(new LifecyclePolicy(TestLifecycleType.INSTANCE, name, phases));
|
||||
}
|
||||
}
|
||||
|
|
|
@ -74,26 +74,24 @@ public class PutLifecycleRequestTests extends AbstractStreamableXContentTestCase
|
|||
}
|
||||
|
||||
@Override
|
||||
protected MutateFunction<Request> getMutateFunction() {
|
||||
return resp -> {
|
||||
LifecyclePolicy policy = resp.getPolicy();
|
||||
String name = policy.getName();
|
||||
Map<String, Phase> phases = policy.getPhases();
|
||||
switch (between(0, 1)) {
|
||||
case 0:
|
||||
name = name + randomAlphaOfLengthBetween(1, 5);
|
||||
break;
|
||||
case 1:
|
||||
phases = new HashMap<>(phases);
|
||||
String newPhaseName = randomAlphaOfLengthBetween(1, 10);
|
||||
phases.put(name, new Phase(newPhaseName, TimeValue.timeValueSeconds(randomIntBetween(1, 1000)),
|
||||
Collections.emptyMap()));
|
||||
break;
|
||||
default:
|
||||
throw new AssertionError("Illegal randomisation branch");
|
||||
}
|
||||
return new Request(new LifecyclePolicy(TestLifecycleType.INSTANCE, name, phases));
|
||||
};
|
||||
protected Request mutateInstance(Request request) {
|
||||
LifecyclePolicy policy = request.getPolicy();
|
||||
String name = policy.getName();
|
||||
Map<String, Phase> phases = policy.getPhases();
|
||||
switch (between(0, 1)) {
|
||||
case 0:
|
||||
name = name + randomAlphaOfLengthBetween(1, 5);
|
||||
break;
|
||||
case 1:
|
||||
phases = new HashMap<>(phases);
|
||||
String newPhaseName = randomAlphaOfLengthBetween(1, 10);
|
||||
phases.put(name, new Phase(newPhaseName, TimeValue.timeValueSeconds(randomIntBetween(1, 1000)),
|
||||
Collections.emptyMap()));
|
||||
break;
|
||||
default:
|
||||
throw new AssertionError("Illegal randomisation branch");
|
||||
}
|
||||
return new Request(new LifecyclePolicy(TestLifecycleType.INSTANCE, name, phases));
|
||||
}
|
||||
|
||||
}
|
||||
|
|
|
@ -22,8 +22,8 @@ public class PutLifecycleResponseTests extends AbstractStreamableTestCase<PutLif
|
|||
}
|
||||
|
||||
@Override
|
||||
protected MutateFunction<Response> getMutateFunction() {
|
||||
return resp -> new Response(resp.isAcknowledged() == false);
|
||||
protected Response mutateInstance(Response response) {
|
||||
return new Response(response.isAcknowledged() == false);
|
||||
}
|
||||
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue