mirror of
https://github.com/apache/lucene.git
synced 2025-02-13 05:25:50 +00:00
LUCENE-7640: Fix test failure.
This commit is contained in:
parent
9571d0f3ab
commit
c7fdd10971
@ -253,8 +253,8 @@ public class TestLucene60PointsFormat extends BasePointsFormatTestCase {
|
|||||||
}));
|
}));
|
||||||
|
|
||||||
// If only one point matches, then the point count is (actualMaxPointsInLeafNode + 1) / 2
|
// If only one point matches, then the point count is (actualMaxPointsInLeafNode + 1) / 2
|
||||||
assertEquals((actualMaxPointsInLeafNode + 1) / 2,
|
// in general, or maybe 2x that if the point is a split value
|
||||||
points.estimatePointCount(new IntersectVisitor() {
|
final long pointCount = points.estimatePointCount(new IntersectVisitor() {
|
||||||
@Override
|
@Override
|
||||||
public void visit(int docID, byte[] packedValue) throws IOException {}
|
public void visit(int docID, byte[] packedValue) throws IOException {}
|
||||||
|
|
||||||
@ -271,7 +271,10 @@ public class TestLucene60PointsFormat extends BasePointsFormatTestCase {
|
|||||||
}
|
}
|
||||||
return Relation.CELL_CROSSES_QUERY;
|
return Relation.CELL_CROSSES_QUERY;
|
||||||
}
|
}
|
||||||
}));
|
});
|
||||||
|
assertTrue(""+pointCount,
|
||||||
|
pointCount == (actualMaxPointsInLeafNode + 1) / 2 || // common case
|
||||||
|
pointCount == 2*((actualMaxPointsInLeafNode + 1) / 2)); // if the point is a split value
|
||||||
|
|
||||||
r.close();
|
r.close();
|
||||||
dir.close();
|
dir.close();
|
||||||
|
@ -1173,8 +1173,8 @@ public class TestBKD extends LuceneTestCase {
|
|||||||
}));
|
}));
|
||||||
|
|
||||||
// If only one point matches, then the point count is (actualMaxPointsInLeafNode + 1) / 2
|
// If only one point matches, then the point count is (actualMaxPointsInLeafNode + 1) / 2
|
||||||
assertEquals((actualMaxPointsInLeafNode + 1) / 2,
|
// in general, or maybe 2x that if the point is a split value
|
||||||
points.estimatePointCount(new IntersectVisitor() {
|
final long pointCount = points.estimatePointCount(new IntersectVisitor() {
|
||||||
@Override
|
@Override
|
||||||
public void visit(int docID, byte[] packedValue) throws IOException {}
|
public void visit(int docID, byte[] packedValue) throws IOException {}
|
||||||
|
|
||||||
@ -1189,7 +1189,10 @@ public class TestBKD extends LuceneTestCase {
|
|||||||
}
|
}
|
||||||
return Relation.CELL_CROSSES_QUERY;
|
return Relation.CELL_CROSSES_QUERY;
|
||||||
}
|
}
|
||||||
}));
|
});
|
||||||
|
assertTrue(""+pointCount,
|
||||||
|
pointCount == (actualMaxPointsInLeafNode + 1) / 2 || // common case
|
||||||
|
pointCount == 2*((actualMaxPointsInLeafNode + 1) / 2)); // if the point is a split value
|
||||||
|
|
||||||
pointsIn.close();
|
pointsIn.close();
|
||||||
dir.close();
|
dir.close();
|
||||||
|
Loading…
x
Reference in New Issue
Block a user