SOLR-15011: Remove flawed test

This commit is contained in:
David Smiley 2021-02-11 22:53:38 -05:00
parent 9837bc4a4d
commit db61297590
1 changed files with 0 additions and 33 deletions

View File

@ -18,7 +18,6 @@
package org.apache.solr.handler.admin;
import java.io.IOException;
import java.util.ArrayList;
import java.util.Collections;
import java.util.Set;
import java.util.concurrent.TimeUnit;
@ -28,17 +27,12 @@ import org.apache.lucene.util.IOUtils;
import org.apache.solr.client.solrj.SolrRequest;
import org.apache.solr.client.solrj.SolrServerException;
import org.apache.solr.client.solrj.impl.CloudSolrClient;
import org.apache.solr.client.solrj.request.CollectionAdminRequest;
import org.apache.solr.client.solrj.request.GenericSolrRequest;
import org.apache.solr.client.solrj.response.QueryResponse;
import org.apache.solr.client.solrj.response.SimpleSolrResponse;
import org.apache.solr.cloud.SolrCloudTestCase;
import org.apache.solr.common.SolrException;
import org.apache.solr.common.params.CommonParams;
import org.apache.solr.common.params.MapSolrParams;
import org.apache.solr.common.params.ModifiableSolrParams;
import org.apache.solr.common.util.NamedList;
import org.apache.solr.common.util.SimpleOrderedMap;
import org.junit.After;
import org.junit.Before;
import org.junit.BeforeClass;
@ -97,33 +91,6 @@ public class AdminHandlersProxyTest extends SolrCloudTestCase {
assertNotNull(((NamedList)nl.get(nl.getName(1))).get("metrics"));
}
@Test
@BadApple(bugUrl = "https://issues.apache.org/jira/browse/SOLR-15011")
public void proxyLoggingHandlerAllNodes() throws IOException, SolrServerException {
CollectionAdminRequest.createCollection("collection", "conf", 2, 2).process(solrClient);
ModifiableSolrParams mparams = new ModifiableSolrParams();
mparams.set(CommonParams.QT, "/admin/logging");
mparams.set("nodes", "all");
mparams.set("set", "com.codahale.metrics.jmx.JmxReporter:WARN");
solrClient.query("collection", mparams, SolrRequest.METHOD.GET);
Set<String> nodes = solrClient.getClusterStateProvider().getLiveNodes();
nodes.forEach(node -> {
mparams.clear();
mparams.set(CommonParams.QT, "/admin/logging");
mparams.set("nodes", node);
QueryResponse rsp = null;
try {
rsp = solrClient.query("collection", mparams, SolrRequest.METHOD.GET);
} catch (Exception e) {
fail("Exception while proxying request to node " + node);
}
NamedList<Object> nl = rsp.getResponse();
assertEquals("WARN", ((SimpleOrderedMap) ((ArrayList)nl.get("loggers")).get(5)).get("level"));
});
}
@Test(expected = SolrException.class)
public void proxySystemInfoHandlerNonExistingNode() throws IOException, SolrServerException {
MapSolrParams params = new MapSolrParams(Collections.singletonMap("nodes", "example.com:1234_solr"));