lucene-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From jpou...@apache.org
Subject svn commit: r1645614 - /lucene/dev/trunk/lucene/core/src/test/org/apache/lucene/search/TestLRUFilterCache.java
Date Mon, 15 Dec 2014 10:36:34 GMT
Author: jpountz
Date: Mon Dec 15 10:36:33 2014
New Revision: 1645614

URL: http://svn.apache.org/r1645614
Log:
LUCENE-6106: Fix test.

Modified:
    lucene/dev/trunk/lucene/core/src/test/org/apache/lucene/search/TestLRUFilterCache.java

Modified: lucene/dev/trunk/lucene/core/src/test/org/apache/lucene/search/TestLRUFilterCache.java
URL: http://svn.apache.org/viewvc/lucene/dev/trunk/lucene/core/src/test/org/apache/lucene/search/TestLRUFilterCache.java?rev=1645614&r1=1645613&r2=1645614&view=diff
==============================================================================
--- lucene/dev/trunk/lucene/core/src/test/org/apache/lucene/search/TestLRUFilterCache.java
(original)
+++ lucene/dev/trunk/lucene/core/src/test/org/apache/lucene/search/TestLRUFilterCache.java
Mon Dec 15 10:36:33 2014
@@ -434,7 +434,7 @@ public class TestLRUFilterCache extends
 
       @Override
       public void onUse(Filter filter) {
-        expectedCounts.put(filter, expectedCounts.getOrDefault(filter, 0));
+        expectedCounts.put(filter, 1 + expectedCounts.getOrDefault(filter, 0));
       }
     };
 
@@ -448,7 +448,7 @@ public class TestLRUFilterCache extends
     for (int i = 0; i < 20; ++i) {
       final int idx = random().nextInt(filters.length);
       searcher.search(new ConstantScoreQuery(cachedFilters[idx]), 1);
-      actualCounts.put(filters[idx], actualCounts.getOrDefault(filters[idx], 0));
+      actualCounts.put(filters[idx], 1 + actualCounts.getOrDefault(filters[idx], 0));
     }
 
     assertEquals(actualCounts, expectedCounts);



Mime
View raw message