mirror of https://github.com/apache/lucene.git
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). git-svn-id: https://svn.apache.org/repos/asf/lucene/dev/trunk@1640159 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
parent
8339fd8cfc
commit
1ecee51df4
|
@ -135,7 +135,9 @@ public class TestStemmerOverrideFilter extends BaseTokenStreamTestCase {
|
|||
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());
|
||||
|
|
Loading…
Reference in New Issue