mirror of https://github.com/apache/lucene.git
SOLR-7849: Verify all nodes have received the new security config
git-svn-id: https://svn.apache.org/repos/asf/lucene/dev/trunk@1694673 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
parent
69deffc4f3
commit
0b27204418
|
@ -25,6 +25,7 @@ import java.util.concurrent.atomic.AtomicInteger;
|
|||
import java.util.function.Predicate;
|
||||
|
||||
import org.apache.solr.SolrTestCaseJ4;
|
||||
import org.apache.solr.client.solrj.embedded.JettySolrRunner;
|
||||
import org.apache.solr.client.solrj.request.QueryRequest;
|
||||
import org.apache.solr.cloud.AbstractFullDistribZkTestBase;
|
||||
import org.apache.solr.common.cloud.ZkStateReader;
|
||||
|
@ -56,8 +57,10 @@ public class PKIAuthenticationIntegrationTest extends AbstractFullDistribZkTestB
|
|||
TIMEOUT, TIMEOUT)) {
|
||||
zkStateReader.getZkClient().setData(ZkStateReader.SOLR_SECURITY_CONF_PATH, bytes, true);
|
||||
}
|
||||
String baseUrl = jettys.get(0).getBaseUrl().toString();
|
||||
TestAuthorizationFramework.verifySecurityStatus(cloudClient.getLbClient().getHttpClient(), baseUrl + "/admin/authorization", "authorization/class", MockAuthorizationPlugin.class.getName(), 20);
|
||||
for (JettySolrRunner jetty : jettys) {
|
||||
String baseUrl = jetty.getBaseUrl().toString();
|
||||
TestAuthorizationFramework.verifySecurityStatus(cloudClient.getLbClient().getHttpClient(), baseUrl + "/admin/authorization", "authorization/class", MockAuthorizationPlugin.class.getName(), 20);
|
||||
}
|
||||
log.info("Starting test");
|
||||
ModifiableSolrParams params = new ModifiableSolrParams();
|
||||
params.add("q", "*:*");
|
||||
|
@ -93,8 +96,7 @@ public class PKIAuthenticationIntegrationTest extends AbstractFullDistribZkTestB
|
|||
};
|
||||
QueryRequest query = new QueryRequest(params);
|
||||
query.process(cloudClient);
|
||||
log.info("count :{}", count);
|
||||
assertTrue(count.get() > 2);
|
||||
assertTrue("all nodes must get the user solr , no:of nodes got solr : " + count.get(),count.get() > 2);
|
||||
}
|
||||
|
||||
@Override
|
||||
|
|
Loading…
Reference in New Issue