tflobbe commented on a change in pull request #978: SOLR-13207: Handle misuse 
of < operator
URL: https://github.com/apache/lucene-solr/pull/978#discussion_r339815865
 
 

 ##########
 File path: solr/core/src/test/org/apache/solr/util/SolrPluginUtilsTest.java
 ##########
 @@ -297,6 +298,16 @@ public void testMinShouldMatchCalculator() {
     assertEquals(1, calcMSM(4, "\n 3 < \n25%\n "));
     assertEquals(1, calcMSM(5, "3<25%"));
 
+    /* malformed conditionals */
+    try {
+      calcMSM(1, "1<");
+      fail("Query '1<' should have thrown SolrException");
+    } catch (SolrException expected) {}
+    try {
+      calcMSM(1, "1<x");
+      fail("Query '1<x' should have thrown SolrException");
+    } catch (SolrException expected) {}
+
 
 Review comment:
   I'd move these lines into it's own test method

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