dsmiley commented on code in PR #4266:
URL: https://github.com/apache/solr/pull/4266#discussion_r3041816823


##########
solr/core/src/test/org/apache/solr/cloud/TestConfigSetsAPI.java:
##########
@@ -374,41 +357,21 @@ public void testUploadErrors() throws Exception {
     ignoreException("already exists");
     map =
         postDataAndGetResponse(
-            cluster.getSolrClient(),
-            cluster.getJettySolrRunners().get(0).getBaseUrl().toString()
-                + "/admin/configs?action=UPLOAD&name=myconf",
+            cluster.getJettySolrRunners().getFirst(),
+            "/admin/configs?action=UPLOAD&name=myconf",
             emptyData,
             null,
             false);
-    assertNotNull(map);
     unIgnoreException("already exists`");
-    statusCode = (long) getObjectByPath(map, Arrays.asList("responseHeader", 
"status"));
-    assertEquals(400l, statusCode);
+    assertEquals(400, getStatusCode(map));
     assertTrue(
         "Expected file doesnt exist in zk. It's possibly overwritten",
         zkClient.exists("/configs/myconf/firstDummyFile"));
     assertTrue(
         "Expected file doesnt exist in zk. It's possibly overwritten",
         zkClient.exists("/configs/myconf/anotherDummyFile"));
 
-    // Checking error when configuration name contains invalid characters
-    for (String invalidName : new String[] {"configset!", "-configset"}) {
-      map =
-          postDataAndGetResponse(
-              cluster.getSolrClient(),
-              cluster.getJettySolrRunners().get(0).getBaseUrl().toString()
-                  + "/admin/configs?action=UPLOAD&name="
-                  + invalidName,
-              emptyData,
-              null,
-              false);
-      assertNotNull(map);
-      statusCode = (long) getObjectByPath(map, Arrays.asList("responseHeader", 
"status"));
-      assertEquals("Expected 400 for invalid configset name: " + invalidName, 
400l, statusCode);
-    }
-
     zkClient.close();

Review Comment:
   eh; don't want to here



-- 
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.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to