mirror of https://github.com/apache/lucene.git
SOLR-13453: Adjust auth metrics asserts in tests after SOLR-13449 (#668)
(cherry picked from commit 5b772f7c9d
)
This commit is contained in:
parent
726fb8facc
commit
03cca62af3
|
@ -38,6 +38,11 @@ New Features
|
|||
|
||||
* SOLR-13049: Make contrib/ltr Feature.defaultValue configurable. (Stanislav Livotov, Christine Poerschke)
|
||||
|
||||
Other Changes
|
||||
----------------------
|
||||
|
||||
* SOLR-13453: Adjust auth metrics asserts in tests caused by SOLR-13449 (janhoy)
|
||||
|
||||
================== 8.1.0 ==================
|
||||
|
||||
Consult the LUCENE_CHANGES.txt file for additional, low level, changes in this release.
|
||||
|
|
|
@ -34,7 +34,6 @@ import org.apache.http.client.methods.HttpPost;
|
|||
import org.apache.http.entity.ByteArrayEntity;
|
||||
import org.apache.http.entity.ContentType;
|
||||
import org.apache.http.impl.client.CloseableHttpClient;
|
||||
import org.apache.lucene.util.LuceneTestCase;
|
||||
import org.apache.solr.SolrTestCaseJ4;
|
||||
import org.apache.solr.client.solrj.impl.HttpClientUtil;
|
||||
import org.apache.solr.cloud.SolrCloudAuthTestCase;
|
||||
|
@ -61,7 +60,6 @@ import static java.nio.charset.StandardCharsets.UTF_8;
|
|||
* </p>
|
||||
*/
|
||||
@SolrTestCaseJ4.SuppressSSL
|
||||
@LuceneTestCase.AwaitsFix(bugUrl = "https://issues.apache.org/jira/browse/SOLR-13453")
|
||||
public class JWTAuthPluginIntegrationTest extends SolrCloudAuthTestCase {
|
||||
protected static final int NUM_SERVERS = 2;
|
||||
protected static final int NUM_SHARDS = 2;
|
||||
|
@ -172,11 +170,11 @@ public class JWTAuthPluginIntegrationTest extends SolrCloudAuthTestCase {
|
|||
|
||||
// Now update three documents
|
||||
assertAuthMetricsMinimums(1, 1, 0, 0, 0, 0);
|
||||
assertPkiAuthMetricsMinimums(12, 12, 0, 0, 0, 0);
|
||||
assertPkiAuthMetricsMinimums(4, 4, 0, 0, 0, 0);
|
||||
Pair<String,Integer> result = post(baseUrl + "/" + COLLECTION + "/update?commit=true", "[{\"id\" : \"1\"}, {\"id\": \"2\"}, {\"id\": \"3\"}]", jwtTestToken);
|
||||
assertEquals(Integer.valueOf(200), result.second());
|
||||
assertAuthMetricsMinimums(3, 3, 0, 0, 0, 0);
|
||||
assertPkiAuthMetricsMinimums(13, 13, 0, 0, 0, 0);
|
||||
assertPkiAuthMetricsMinimums(5, 5, 0, 0, 0, 0);
|
||||
|
||||
// First a non distributed query
|
||||
result = get(baseUrl + "/" + COLLECTION + "/query?q=*:*&distrib=false", jwtTestToken);
|
||||
|
@ -191,7 +189,7 @@ public class JWTAuthPluginIntegrationTest extends SolrCloudAuthTestCase {
|
|||
// Delete
|
||||
assertEquals(200, get(baseUrl + "/admin/collections?action=DELETE&name=" + COLLECTION, jwtTestToken).second().intValue());
|
||||
assertAuthMetricsMinimums(10, 10, 0, 0, 0, 0);
|
||||
assertPkiAuthMetricsMinimums(15, 15, 0, 0, 0, 0);
|
||||
assertPkiAuthMetricsMinimums(7, 7, 0, 0, 0, 0);
|
||||
}
|
||||
|
||||
private void getAndFail(String url, String token) {
|
||||
|
|
|
@ -21,7 +21,6 @@ import java.nio.charset.StandardCharsets;
|
|||
|
||||
import org.apache.commons.io.FileUtils;
|
||||
import org.apache.lucene.util.Constants;
|
||||
import org.apache.lucene.util.LuceneTestCase;
|
||||
import org.apache.solr.client.solrj.SolrQuery;
|
||||
import org.apache.solr.client.solrj.impl.CloudSolrClient;
|
||||
import org.apache.solr.client.solrj.request.CollectionAdminRequest;
|
||||
|
@ -34,7 +33,6 @@ import org.junit.AfterClass;
|
|||
import org.junit.BeforeClass;
|
||||
import org.junit.Test;
|
||||
|
||||
@LuceneTestCase.AwaitsFix(bugUrl = "https://issues.apache.org/jira/browse/SOLR-13453")
|
||||
public class TestSolrCloudWithHadoopAuthPlugin extends SolrCloudAuthTestCase {
|
||||
protected static final int NUM_SERVERS = 1;
|
||||
protected static final int NUM_SHARDS = 1;
|
||||
|
@ -138,6 +136,6 @@ public class TestSolrCloudWithHadoopAuthPlugin extends SolrCloudAuthTestCase {
|
|||
deleteReq.process(solrClient);
|
||||
AbstractDistribZkTestBase.waitForCollectionToDisappear(collectionName,
|
||||
solrClient.getZkStateReader(), true, true, 330);
|
||||
assertAuthMetricsMinimums(16, 8, 0, 8, 0, 0);
|
||||
assertAuthMetricsMinimums(14, 8, 0, 6, 0, 0);
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue