SOLR-13637: BasicAuthIntegrationTest failures fixed

This commit is contained in:
noble 2019-07-25 04:29:15 -04:00
parent c0da27173c
commit 100c160017
2 changed files with 6 additions and 3 deletions

View File

@ -249,8 +249,9 @@ public class ApiBag {
@Override
public Name getPermissionName(AuthorizationContext ctx) {
if (rh instanceof PermissionNameProvider) {
return ((PermissionNameProvider) rh).getPermissionName(ctx);
SolrRequestHandler handler = rh.get();
if (handler instanceof PermissionNameProvider) {
return ((PermissionNameProvider) handler).getPermissionName(ctx);
}
return null;
}

View File

@ -135,7 +135,9 @@ public class BasicAuthIntegrationTest extends SolrCloudAuthTestCase {
final SolrRequest genericReq;
if (isUseV2Api) {
genericReq = new V2Request.Builder("/cluster/security/authentication").withMethod(SolrRequest.METHOD.POST).build();
genericReq = new V2Request.Builder("/cluster/security/authentication")
.withPayload(command)
.withMethod(SolrRequest.METHOD.POST).build();
} else {
genericReq = new GenericSolrRequest(SolrRequest.METHOD.POST, authcPrefix, new ModifiableSolrParams());
((GenericSolrRequest)genericReq).setContentWriter(new StringPayloadContentWriter(command, CommonParams.JSON_MIME));