You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@lucene.apache.org by GitBox <gi...@apache.org> on 2021/01/28 23:58:48 UTC

[GitHub] [lucene-solr] megancarey commented on a change in pull request #2265: SOLR-15119 Add logs and make default splitMethod to be LINK

megancarey commented on a change in pull request #2265:
URL: https://github.com/apache/lucene-solr/pull/2265#discussion_r566488882



##########
File path: solr/core/src/test/org/apache/solr/cloud/SplitShardTest.java
##########
@@ -106,6 +108,50 @@ public void doTest() throws IOException, SolrServerException {
     }
   }
 
+  /**
+   * Create a collection with 3 shards and split them each with a different splitMethod value.
+   * 1. No override specified. Verify that LINK method is used.
+   * 2. REWRITE method specified. Verify that LINK steps are skipped.
+   * 3. Invalid override specified. Verify that split fails.
+   */
+  @Test
+  public void testSplitMethods() throws Exception {
+    CollectionAdminRequest
+            .createCollection(COLLECTION_NAME, "conf", 3, 1)
+            .process(cluster.getSolrClient());
+
+    cluster.waitForActiveCollection(COLLECTION_NAME, 3, 3);
+
+    CollectionAdminRequest.SplitShard splitShard = CollectionAdminRequest.splitShard(COLLECTION_NAME)
+            .setShardName("shard1");
+    SolrResponse response = splitShard.process(cluster.getSolrClient());
+    assertTrue(response.getResponse().toString().contains("hardLinkCopy"));

Review comment:
       I tried to update but found that assertThat was deprecated. What lib do you use for that?




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



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