You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@lucene.apache.org by no...@apache.org on 2015/08/07 14:43:51 UTC
svn commit: r1694675 - in /lucene/dev/branches/branch_5x: ./ solr/ solr/core/
solr/core/src/test/org/apache/solr/security/PKIAuthenticationIntegrationTest.java
Author: noble
Date: Fri Aug 7 12:43:51 2015
New Revision: 1694675
URL: http://svn.apache.org/r1694675
Log:
SOLR-7849: Verify all nodes have received the new security config
Modified:
lucene/dev/branches/branch_5x/ (props changed)
lucene/dev/branches/branch_5x/solr/ (props changed)
lucene/dev/branches/branch_5x/solr/core/ (props changed)
lucene/dev/branches/branch_5x/solr/core/src/test/org/apache/solr/security/PKIAuthenticationIntegrationTest.java
Modified: lucene/dev/branches/branch_5x/solr/core/src/test/org/apache/solr/security/PKIAuthenticationIntegrationTest.java
URL: http://svn.apache.org/viewvc/lucene/dev/branches/branch_5x/solr/core/src/test/org/apache/solr/security/PKIAuthenticationIntegrationTest.java?rev=1694675&r1=1694674&r2=1694675&view=diff
==============================================================================
--- lucene/dev/branches/branch_5x/solr/core/src/test/org/apache/solr/security/PKIAuthenticationIntegrationTest.java (original)
+++ lucene/dev/branches/branch_5x/solr/core/src/test/org/apache/solr/security/PKIAuthenticationIntegrationTest.java Fri Aug 7 12:43:51 2015
@@ -24,6 +24,7 @@ import java.security.Principal;
import java.util.concurrent.atomic.AtomicInteger;
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;
@@ -55,8 +56,10 @@ public class PKIAuthenticationIntegratio
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", "*:*");
@@ -92,8 +95,7 @@ public class PKIAuthenticationIntegratio
};
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