epugh commented on code in PR #4101:
URL: https://github.com/apache/solr/pull/4101#discussion_r2765115244


##########
solr/core/src/test/org/apache/solr/handler/admin/TestCollectionAPIs.java:
##########
@@ -163,16 +163,32 @@ public List<CommandOperation> getCommands(boolean 
validateInput) {
           public Map<String, String> getPathTemplateValues() {
             return parts;
           }
-
-          @Override
-          public String getHttpMethod() {
-            return method.toString();
-          }
         };
     api.call(req, rsp);
     return new Pair<>(req, rsp);
   }
 
+  private SolrQueryRequestBase createTestRequest(
+      SolrParams params,
+      Map<String, String> pathTemplateValues,
+      String httpMethod,
+      String requestBody,
+      Api api) {
+    return new SolrQueryRequestBase(null, params) {
+      @Override
+      public List<CommandOperation> getCommands(boolean validateInput) {
+        if (requestBody == null) return Collections.emptyList();
+        return ApiBag.getCommandOperations(
+            new ContentStreamBase.StringStream(requestBody), 
api.getCommandSchema(), true);
+      }
+
+      @Override
+      public Map<String, String> getPathTemplateValues() {
+        return pathTemplateValues;
+      }
+    };
+  }

Review Comment:
   thanks



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