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:
Jason Tedor 2016-12-22 20:14:02 -05:00 committed by GitHub
parent 4ff6279865
commit 935eec54c5
3 changed files with 2 additions and 3 deletions

View File

@ -404,7 +404,6 @@ public class NativeUsersStore extends AbstractComponent implements ClusterStateL
.execute(new ActionListener<UpdateResponse>() {
@Override
public void onResponse(UpdateResponse updateResponse) {
assert updateResponse.getResult() == Result.UPDATED;
clearRealmCache(username, listener, null);
}

View File

@ -60,7 +60,7 @@ public class RestChangePasswordAction extends BaseRestHandler {
ChangePasswordResponse changePasswordResponse,
XContentBuilder builder)
throws Exception {
return new BytesRestResponse(RestStatus.OK, channel.newBuilder().startObject().endObject());
return new BytesRestResponse(RestStatus.OK, builder.startObject().endObject());
}
});
}

View File

@ -48,7 +48,7 @@ public class RestSetEnabledAction extends BaseRestHandler {
.execute(new RestBuilderListener<SetEnabledResponse>(channel) {
@Override
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());
}
});
}