lucene-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From a.@apache.org
Subject [04/18] lucene-solr:jira/solr-12438: LUCENE-7960: fix Solr test to include mandatory args
Date Thu, 07 Jun 2018 12:18:22 GMT
LUCENE-7960: fix Solr test to include mandatory args


Project: http://git-wip-us.apache.org/repos/asf/lucene-solr/repo
Commit: http://git-wip-us.apache.org/repos/asf/lucene-solr/commit/c5875980
Tree: http://git-wip-us.apache.org/repos/asf/lucene-solr/tree/c5875980
Diff: http://git-wip-us.apache.org/repos/asf/lucene-solr/diff/c5875980

Branch: refs/heads/jira/solr-12438
Commit: c587598096cde769c299594fb26d0a23b7bd5930
Parents: 7d0b64f
Author: David Smiley <dsmiley@apache.org>
Authored: Tue Jun 5 12:30:34 2018 -0400
Committer: David Smiley <dsmiley@apache.org>
Committed: Tue Jun 5 12:30:34 2018 -0400

----------------------------------------------------------------------
 .../core/src/test/org/apache/solr/core/ResourceLoaderTest.java | 6 ++++--
 1 file changed, 4 insertions(+), 2 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/lucene-solr/blob/c5875980/solr/core/src/test/org/apache/solr/core/ResourceLoaderTest.java
----------------------------------------------------------------------
diff --git a/solr/core/src/test/org/apache/solr/core/ResourceLoaderTest.java b/solr/core/src/test/org/apache/solr/core/ResourceLoaderTest.java
index 8ab9606..785195a 100644
--- a/solr/core/src/test/org/apache/solr/core/ResourceLoaderTest.java
+++ b/solr/core/src/test/org/apache/solr/core/ResourceLoaderTest.java
@@ -72,7 +72,8 @@ public class ResourceLoaderTest extends SolrTestCaseJ4 {
     
     Class<?> clazz = ResourceLoaderAware.class;
     // Check ResourceLoaderAware valid objects
-    assertAwareCompatibility(clazz, new NGramFilterFactory(new HashMap<>()));
+    //noinspection unchecked
+    assertAwareCompatibility(clazz, new NGramFilterFactory(map("minGramSize", "1", "maxGramSize",
"2")));
     assertAwareCompatibility(clazz, new KeywordTokenizerFactory(new HashMap<>()));
     
     // Make sure it throws an error for invalid objects
@@ -98,8 +99,9 @@ public class ResourceLoaderTest extends SolrTestCaseJ4 {
     assertAwareCompatibility(clazz, new JSONResponseWriter());
     
     // Make sure it throws an error for invalid objects
+    //noinspection unchecked
     invalid = new Object[] {
-        new NGramFilterFactory(new HashMap<>()),
+        new NGramFilterFactory(map("minGramSize", "1", "maxGramSize", "2")),
         "hello",  new Float( 12.3f ),
         new KeywordTokenizerFactory(new HashMap<>())
     };


Mime
View raw message