lucene-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From dsmi...@apache.org
Subject lucene-solr:branch_7x: LUCENE-7960: fix Solr test to include mandatory args
Date Tue, 05 Jun 2018 16:32:24 GMT
Repository: lucene-solr
Updated Branches:
  refs/heads/branch_7x 90e8be7a8 -> 3694bbdaa


LUCENE-7960: fix Solr test to include mandatory args

(cherry picked from commit c587598)


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

Branch: refs/heads/branch_7x
Commit: 3694bbdaaf9f9b094db364c892cd707facb0d680
Parents: 90e8be7
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:32:17 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/3694bbda/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