megancarey 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_r405150193
 
 

 ##########
 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:
   That's fair @dsmiley - do you know if a way to create a mock collection so 
we can leave as SolrTestCaseJ4 but still avoid NPE from the new log line?

----------------------------------------------------------------
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:
us...@infra.apache.org


With regards,
Apache Git Services

---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscr...@lucene.apache.org
For additional commands, e-mail: issues-h...@lucene.apache.org

Reply via email to