dsmiley commented on a change in pull request #1414: SOLR-14385 added shard
name thru MDC and collection name to split histogram logs
URL: https://github.com/apache/lucene-solr/pull/1414#discussion_r405246919
##########
File path:
solr/core/src/test/org/apache/solr/handler/admin/SplitHandlerTest.java
##########
@@ -22,24 +22,50 @@
import java.util.List;
import java.util.Random;
-import org.apache.solr.SolrTestCaseJ4;
+import org.apache.log4j.MDC;
+import org.apache.solr.client.solrj.impl.CloudSolrClient;
+import org.apache.solr.client.solrj.request.CollectionAdminRequest;
+import org.apache.solr.cloud.SolrCloudTestCase;
import org.apache.solr.cloud.api.collections.SplitByPrefixTest;
import org.apache.solr.cloud.api.collections.SplitByPrefixTest.Prefix;
+import org.apache.solr.common.cloud.ClusterState;
import org.apache.solr.common.cloud.CompositeIdRouter;
+import org.apache.solr.common.cloud.DocCollection;
import org.apache.solr.common.cloud.DocRouter;
import org.apache.solr.request.SolrQueryRequest;
import org.junit.BeforeClass;
import org.junit.Test;
+import static org.apache.solr.common.cloud.ZkStateReader.SHARD_ID_PROP;
+
// test low level splitByPrefix range recommendations.
// This is here to access package private methods.
// See SplitByPrefixTest for cloud level tests of SPLITSHARD that use this by
passing getRanges with the SPLIT command
-public class SplitHandlerTest extends SolrTestCaseJ4 {
-
+public class SplitHandlerTest extends SolrCloudTestCase {
+
+ private static CloudSolrClient solrClient;
+ private static String systemCollNode;
+ private static String COLL_NAME = "collection1";
+ private static String SHARD_NAME = "shard1";
+
@BeforeClass
public static void beforeTests() throws Exception {
System.setProperty("managed.schema.mutable", "true"); // needed by
cloud-managed config set
initCore("solrconfig.xml","schema_latest.xml");
+
+ configureCluster(2)
Review comment:
No. Maybe some _other_ test that is _already_ SolrCloud based could assert
whatever log statement you want to do?
IMO log statements don't _need_ tests. A nice to have. If it's hard, spend
your engineering hours on more worthwhile things.
----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:
[email protected]
With regards,
Apache Git Services
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]