lucene-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From jpou...@apache.org
Subject svn commit: r1640159 - /lucene/dev/trunk/lucene/analysis/common/src/test/org/apache/lucene/analysis/miscellaneous/TestStemmerOverrideFilter.java
Date Mon, 17 Nov 2014 13:53:42 GMT
Author: jpountz
Date: Mon Nov 17 13:53:41 2014
New Revision: 1640159

URL: http://svn.apache.org/r1640159
Log:
Fix test bug in TestStemmerOverrideFilter.

This test cannot pass with a random map if ignoring case since the map might
contain the same key twice (once lowercased and once uppercased).

Modified:
    lucene/dev/trunk/lucene/analysis/common/src/test/org/apache/lucene/analysis/miscellaneous/TestStemmerOverrideFilter.java

Modified: lucene/dev/trunk/lucene/analysis/common/src/test/org/apache/lucene/analysis/miscellaneous/TestStemmerOverrideFilter.java
URL: http://svn.apache.org/viewvc/lucene/dev/trunk/lucene/analysis/common/src/test/org/apache/lucene/analysis/miscellaneous/TestStemmerOverrideFilter.java?rev=1640159&r1=1640158&r2=1640159&view=diff
==============================================================================
--- lucene/dev/trunk/lucene/analysis/common/src/test/org/apache/lucene/analysis/miscellaneous/TestStemmerOverrideFilter.java
(original)
+++ lucene/dev/trunk/lucene/analysis/common/src/test/org/apache/lucene/analysis/miscellaneous/TestStemmerOverrideFilter.java
Mon Nov 17 13:53:41 2014
@@ -135,7 +135,9 @@ public class TestStemmerOverrideFilter e
     if (map.isEmpty()) {
       map.put("booked", "books");
     }
-    StemmerOverrideFilter.Builder builder = new StemmerOverrideFilter.Builder(random().nextBoolean());
+    // This test might fail if ignoreCase is true since the map might have twice the same
key, once
+    // lowercased and once uppercased
+    StemmerOverrideFilter.Builder builder = new StemmerOverrideFilter.Builder(false);
     Set<Entry<String,String>> entrySet = map.entrySet();
     for (Entry<String,String> entry : entrySet) {
       builder.add(entry.getKey(), entry.getValue());



Mime
View raw message