Enable assertions in integration tests
This commit fixes some bugs that were found after enabling assertions in integration tests. Relates elastic/elasticsearch#4443 Original commit: elastic/x-pack-elasticsearch@4fdd84166d
This commit is contained in:
parent
4ff6279865
commit
935eec54c5
|
@ -404,7 +404,6 @@ public class NativeUsersStore extends AbstractComponent implements ClusterStateL
|
||||||
.execute(new ActionListener<UpdateResponse>() {
|
.execute(new ActionListener<UpdateResponse>() {
|
||||||
@Override
|
@Override
|
||||||
public void onResponse(UpdateResponse updateResponse) {
|
public void onResponse(UpdateResponse updateResponse) {
|
||||||
assert updateResponse.getResult() == Result.UPDATED;
|
|
||||||
clearRealmCache(username, listener, null);
|
clearRealmCache(username, listener, null);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -60,7 +60,7 @@ public class RestChangePasswordAction extends BaseRestHandler {
|
||||||
ChangePasswordResponse changePasswordResponse,
|
ChangePasswordResponse changePasswordResponse,
|
||||||
XContentBuilder builder)
|
XContentBuilder builder)
|
||||||
throws Exception {
|
throws Exception {
|
||||||
return new BytesRestResponse(RestStatus.OK, channel.newBuilder().startObject().endObject());
|
return new BytesRestResponse(RestStatus.OK, builder.startObject().endObject());
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
|
@ -48,7 +48,7 @@ public class RestSetEnabledAction extends BaseRestHandler {
|
||||||
.execute(new RestBuilderListener<SetEnabledResponse>(channel) {
|
.execute(new RestBuilderListener<SetEnabledResponse>(channel) {
|
||||||
@Override
|
@Override
|
||||||
public RestResponse buildResponse(SetEnabledResponse setEnabledResponse, XContentBuilder builder) throws Exception {
|
public RestResponse buildResponse(SetEnabledResponse setEnabledResponse, XContentBuilder builder) throws Exception {
|
||||||
return new BytesRestResponse(RestStatus.OK, channel.newBuilder().startObject().endObject());
|
return new BytesRestResponse(RestStatus.OK, builder.startObject().endObject());
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue