You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@lucene.apache.org by ds...@apache.org on 2015/02/11 20:15:13 UTC
svn commit: r1659042 - in /lucene/dev/branches/branch_5x: ./ lucene/
lucene/spatial/
lucene/spatial/src/test/org/apache/lucene/spatial/prefix/HeatmapFacetCounterTest.java
Author: dsmiley
Date: Wed Feb 11 19:15:13 2015
New Revision: 1659042
URL: http://svn.apache.org/r1659042
Log:
LUCENE-6191: fix test bug when given 0-area input
Modified:
lucene/dev/branches/branch_5x/ (props changed)
lucene/dev/branches/branch_5x/lucene/ (props changed)
lucene/dev/branches/branch_5x/lucene/spatial/ (props changed)
lucene/dev/branches/branch_5x/lucene/spatial/src/test/org/apache/lucene/spatial/prefix/HeatmapFacetCounterTest.java
Modified: lucene/dev/branches/branch_5x/lucene/spatial/src/test/org/apache/lucene/spatial/prefix/HeatmapFacetCounterTest.java
URL: http://svn.apache.org/viewvc/lucene/dev/branches/branch_5x/lucene/spatial/src/test/org/apache/lucene/spatial/prefix/HeatmapFacetCounterTest.java?rev=1659042&r1=1659041&r2=1659042&view=diff
==============================================================================
--- lucene/dev/branches/branch_5x/lucene/spatial/src/test/org/apache/lucene/spatial/prefix/HeatmapFacetCounterTest.java (original)
+++ lucene/dev/branches/branch_5x/lucene/spatial/src/test/org/apache/lucene/spatial/prefix/HeatmapFacetCounterTest.java Wed Feb 11 19:15:13 2015
@@ -78,6 +78,7 @@ public class HeatmapFacetCounterTest ext
validateHeatmapResultLoop(ctx.makeRectangle(+170, +180, -90, -85), 1, 100);
validateHeatmapResultLoop(ctx.makeRectangle(-180, -160, -89, -50), 1, 100);
+ validateHeatmapResultLoop(ctx.makeRectangle(179, 179, -89, -50), 1, 100);//line
// We could test anything and everything at this point... I prefer we leave that to random testing and then
// add specific tests if we find a bug.
}
@@ -179,6 +180,11 @@ public class HeatmapFacetCounterTest ext
/** Build heatmap, validate results, then descend recursively to another facet level. */
private boolean queryHeatmapRecursive(Rectangle inputRange, int facetLevel) throws IOException {
+ if (!inputRange.hasArea()) {
+ // Don't test line inputs. It's not that we don't support it but it is more challenging to test if per-chance it
+ // coincides with a grid line due due to edge overlap issue for some grid implementations (geo & quad).
+ return false;
+ }
Filter filter = null; //FYI testing filtering of underlying PrefixTreeFacetCounter is done in another test
//Calculate facets
final int maxCells = 10_000;