mirror of https://github.com/apache/lucene.git
LUCENE-8626: Standardize Lucene test file naming Part 2 (#2053)
This commit is contained in:
parent
4735b4c12f
commit
b9a93cf695
|
@ -56,7 +56,7 @@ import org.apache.lucene.util.FixedBitSet;
|
|||
import org.apache.lucene.util.LuceneTestCase;
|
||||
import org.apache.lucene.util.TestUtil;
|
||||
|
||||
public class AllGroupHeadsCollectorTest extends LuceneTestCase {
|
||||
public class TestAllGroupHeadsCollector extends LuceneTestCase {
|
||||
|
||||
public void testBasic() throws Exception {
|
||||
final String groupField = "author";
|
|
@ -34,7 +34,7 @@ import org.apache.lucene.store.Directory;
|
|||
import org.apache.lucene.util.BytesRef;
|
||||
import org.apache.lucene.util.LuceneTestCase;
|
||||
|
||||
public class AllGroupsCollectorTest extends LuceneTestCase {
|
||||
public class TestAllGroupsCollector extends LuceneTestCase {
|
||||
|
||||
public void testTotalGroupCount() throws Exception {
|
||||
|
|
@ -40,7 +40,7 @@ import org.apache.lucene.search.TermQuery;
|
|||
import org.apache.lucene.search.TopDocs;
|
||||
import org.apache.lucene.util.BytesRef;
|
||||
|
||||
public class BlockGroupingTest extends AbstractGroupingTestCase {
|
||||
public class TestBlockGrouping extends AbstractGroupingTestCase {
|
||||
|
||||
public void testSimple() throws IOException {
|
||||
|
|
@ -49,7 +49,7 @@ import org.apache.lucene.util.BytesRef;
|
|||
import org.apache.lucene.util.mutable.MutableValue;
|
||||
import org.apache.lucene.util.mutable.MutableValueStr;
|
||||
|
||||
public class DistinctValuesCollectorTest extends AbstractGroupingTestCase {
|
||||
public class TestDistinctValuesCollector extends AbstractGroupingTestCase {
|
||||
|
||||
private final static NullComparator nullComparator = new NullComparator();
|
||||
|
|
@ -27,7 +27,7 @@ import org.apache.lucene.search.DoubleValuesSource;
|
|||
import org.apache.lucene.search.MatchAllDocsQuery;
|
||||
import org.apache.lucene.search.Query;
|
||||
|
||||
public class DoubleRangeGroupSelectorTest extends BaseGroupSelectorTestCase<DoubleRange> {
|
||||
public class TestDoubleRangeGroupSelector extends BaseGroupSelectorTestCase<DoubleRange> {
|
||||
|
||||
@Override
|
||||
protected void addGroupField(Document document, int id) {
|
|
@ -49,7 +49,7 @@ import org.apache.lucene.util.BytesRef;
|
|||
import org.apache.lucene.util.TestUtil;
|
||||
|
||||
|
||||
public class GroupFacetCollectorTest extends AbstractGroupingTestCase {
|
||||
public class TestGroupFacetCollector extends AbstractGroupingTestCase {
|
||||
|
||||
public void testSimple() throws Exception {
|
||||
final String groupField = "hotel";
|
|
@ -41,7 +41,7 @@ import java.util.ArrayList;
|
|||
import java.util.HashMap;
|
||||
import java.util.List;
|
||||
|
||||
public class GroupingSearchTest extends LuceneTestCase {
|
||||
public class TestGroupingSearch extends LuceneTestCase {
|
||||
|
||||
// Tests some very basic usages...
|
||||
public void testBasic() throws Exception {
|
|
@ -27,7 +27,7 @@ import org.apache.lucene.search.LongValuesSource;
|
|||
import org.apache.lucene.search.MatchAllDocsQuery;
|
||||
import org.apache.lucene.search.Query;
|
||||
|
||||
public class LongRangeGroupSelectorTest extends BaseGroupSelectorTestCase<LongRange> {
|
||||
public class TestLongRangeGroupSelector extends BaseGroupSelectorTestCase<LongRange> {
|
||||
|
||||
@Override
|
||||
protected void addGroupField(Document document, int id) {
|
|
@ -30,7 +30,7 @@ import org.apache.lucene.search.Query;
|
|||
import org.apache.lucene.search.TermQuery;
|
||||
import org.apache.lucene.util.BytesRef;
|
||||
|
||||
public class TermGroupSelectorTest extends BaseGroupSelectorTestCase<BytesRef> {
|
||||
public class TestTermGroupSelector extends BaseGroupSelectorTestCase<BytesRef> {
|
||||
|
||||
@Override
|
||||
protected void addGroupField(Document document, int id) {
|
|
@ -21,7 +21,7 @@ import org.apache.lucene.search.Sort;
|
|||
import org.apache.lucene.search.TotalHits;
|
||||
import org.apache.lucene.util.LuceneTestCase;
|
||||
|
||||
public class TopGroupsTest extends LuceneTestCase {
|
||||
public class TestTopGroups extends LuceneTestCase {
|
||||
|
||||
public void testAllGroupsEmptyInSecondPass() {
|
||||
narrativeMergeTestImplementation(false, false, false, false);
|
|
@ -30,7 +30,7 @@ import org.apache.lucene.search.TermQuery;
|
|||
import org.apache.lucene.util.BytesRef;
|
||||
import org.apache.lucene.util.mutable.MutableValue;
|
||||
|
||||
public class ValueSourceGroupSelectorTest extends BaseGroupSelectorTestCase<MutableValue> {
|
||||
public class TestValueSourceGroupSelector extends BaseGroupSelectorTestCase<MutableValue> {
|
||||
|
||||
@Override
|
||||
protected void addGroupField(Document document, int id) {
|
|
@ -56,7 +56,7 @@ import org.apache.lucene.util.PriorityQueue;
|
|||
import org.apache.lucene.util.TestUtil;
|
||||
import org.junit.Test;
|
||||
|
||||
public class CommonTermsQueryTest extends LuceneTestCase {
|
||||
public class TestCommonTermsQuery extends LuceneTestCase {
|
||||
|
||||
public void testBasics() throws IOException {
|
||||
Directory dir = newDirectory();
|
||||
|
@ -403,7 +403,7 @@ public class CommonTermsQueryTest extends LuceneTestCase {
|
|||
LeafReader wrapper = getOnlyLeafReader(reader);
|
||||
String field = "body";
|
||||
Terms terms = wrapper.terms(field);
|
||||
PriorityQueue<TermAndFreq> lowFreqQueue = new PriorityQueue<CommonTermsQueryTest.TermAndFreq>(
|
||||
PriorityQueue<TermAndFreq> lowFreqQueue = new PriorityQueue<TestCommonTermsQuery.TermAndFreq>(
|
||||
5) {
|
||||
|
||||
@Override
|
||||
|
@ -412,7 +412,7 @@ public class CommonTermsQueryTest extends LuceneTestCase {
|
|||
}
|
||||
|
||||
};
|
||||
PriorityQueue<TermAndFreq> highFreqQueue = new PriorityQueue<CommonTermsQueryTest.TermAndFreq>(
|
||||
PriorityQueue<TermAndFreq> highFreqQueue = new PriorityQueue<TestCommonTermsQuery.TermAndFreq>(
|
||||
5) {
|
||||
|
||||
@Override
|
|
@ -57,7 +57,7 @@ import org.junit.After;
|
|||
import org.junit.Before;
|
||||
import org.junit.Test;
|
||||
|
||||
public class IndexAndTaxonomyReplicationClientTest extends ReplicatorTestCase {
|
||||
public class TestIndexAndTaxonomyReplicationClient extends ReplicatorTestCase {
|
||||
|
||||
private static class IndexAndTaxonomyReadyCallback implements Callable<Boolean>, Closeable {
|
||||
|
|
@ -37,7 +37,7 @@ import org.apache.lucene.store.IndexInput;
|
|||
import org.apache.lucene.util.IOUtils;
|
||||
import org.junit.Test;
|
||||
|
||||
public class IndexAndTaxonomyRevisionTest extends ReplicatorTestCase {
|
||||
public class TestIndexAndTaxonomyRevision extends ReplicatorTestCase {
|
||||
|
||||
private Document newDocument(TaxonomyWriter taxoWriter) throws IOException {
|
||||
FacetsConfig config = new FacetsConfig();
|
|
@ -38,7 +38,7 @@ import org.junit.After;
|
|||
import org.junit.Before;
|
||||
import org.junit.Test;
|
||||
|
||||
public class IndexReplicationClientTest extends ReplicatorTestCase {
|
||||
public class TestIndexReplicationClient extends ReplicatorTestCase {
|
||||
|
||||
private static class IndexReadyCallback implements Callable<Boolean>, Closeable {
|
||||
|
|
@ -32,7 +32,7 @@ import org.apache.lucene.store.IndexInput;
|
|||
import org.apache.lucene.util.IOUtils;
|
||||
import org.junit.Test;
|
||||
|
||||
public class IndexRevisionTest extends ReplicatorTestCase {
|
||||
public class TestIndexRevision extends ReplicatorTestCase {
|
||||
|
||||
@Test
|
||||
public void testNoSnapshotDeletionPolicy() throws Exception {
|
|
@ -37,7 +37,7 @@ import org.junit.After;
|
|||
import org.junit.Before;
|
||||
import org.junit.Test;
|
||||
|
||||
public class LocalReplicatorTest extends ReplicatorTestCase {
|
||||
public class TestLocalReplicator extends ReplicatorTestCase {
|
||||
|
||||
private static final String VERSION_ID = "version";
|
||||
|
|
@ -31,7 +31,7 @@ import org.apache.lucene.store.Directory;
|
|||
import org.apache.lucene.util.IOUtils;
|
||||
import org.junit.Test;
|
||||
|
||||
public class SessionTokenTest extends ReplicatorTestCase {
|
||||
public class TestSessionToken extends ReplicatorTestCase {
|
||||
|
||||
@Test
|
||||
public void testSerialization() throws IOException {
|
|
@ -41,7 +41,7 @@ import org.eclipse.jetty.servlet.ServletHolder;
|
|||
import org.junit.Before;
|
||||
import org.junit.Test;
|
||||
|
||||
public class HttpReplicatorTest extends ReplicatorTestCase {
|
||||
public class TestHttpReplicator extends ReplicatorTestCase {
|
||||
private Path clientWorkDir;
|
||||
private Replicator serverReplicator;
|
||||
private IndexWriter writer;
|
|
@ -35,7 +35,7 @@ import org.apache.lucene.store.Directory;
|
|||
import org.apache.lucene.util.IOUtils;
|
||||
import org.apache.lucene.util.LuceneTestCase;
|
||||
|
||||
public class FuzzyLikeThisQueryTest extends LuceneTestCase {
|
||||
public class TestFuzzyLikeThisQuery extends LuceneTestCase {
|
||||
private Directory directory;
|
||||
private IndexSearcher searcher;
|
||||
private IndexReader reader;
|
|
@ -37,7 +37,7 @@ import org.locationtech.spatial4j.shape.Point;
|
|||
import org.locationtech.spatial4j.shape.Shape;
|
||||
import org.locationtech.spatial4j.shape.ShapeFactory;
|
||||
|
||||
public class DistanceStrategyTest extends StrategyTestCase {
|
||||
public class TestDistanceStrategy extends StrategyTestCase {
|
||||
@ParametersFactory(argumentFormatting = "strategy=%s")
|
||||
public static Iterable<Object[]> parameters() {
|
||||
List<Object[]> ctorArgs = new ArrayList<>();
|
||||
|
@ -75,7 +75,7 @@ public class DistanceStrategyTest extends StrategyTestCase {
|
|||
return ctorArgs;
|
||||
}
|
||||
|
||||
public DistanceStrategyTest(String suiteName, SpatialStrategy strategy) {
|
||||
public TestDistanceStrategy(String suiteName, SpatialStrategy strategy) {
|
||||
this.ctx = strategy.getSpatialContext();
|
||||
this.strategy = strategy;
|
||||
}
|
|
@ -41,7 +41,7 @@ import org.locationtech.spatial4j.shape.ShapeFactory;
|
|||
/**
|
||||
* Based off of Solr 3's SpatialFilterTest.
|
||||
*/
|
||||
public class PortedSolr3Test extends StrategyTestCase {
|
||||
public class TestPortedSolr3 extends StrategyTestCase {
|
||||
|
||||
private ShapeFactory shapeFactory;
|
||||
|
||||
|
@ -74,7 +74,7 @@ public class PortedSolr3Test extends StrategyTestCase {
|
|||
return ctorArgs;
|
||||
}
|
||||
|
||||
public PortedSolr3Test(String suiteName, SpatialStrategy strategy) {
|
||||
public TestPortedSolr3(String suiteName, SpatialStrategy strategy) {
|
||||
this.ctx = strategy.getSpatialContext();
|
||||
this.strategy = strategy;
|
||||
shapeFactory = ctx.getShapeFactory();
|
|
@ -23,7 +23,7 @@ import org.junit.Test;
|
|||
import org.locationtech.spatial4j.context.SpatialContext;
|
||||
import org.locationtech.spatial4j.shape.Shape;
|
||||
|
||||
public class SpatialArgsTest extends LuceneTestCase {
|
||||
public class TestSpatialArgs extends LuceneTestCase {
|
||||
|
||||
@Test
|
||||
public void calcDistanceFromErrPct() {
|
|
@ -37,7 +37,7 @@ import static com.carrotsearch.randomizedtesting.RandomizedTest.randomBoolean;
|
|||
import static com.carrotsearch.randomizedtesting.RandomizedTest.randomDouble;
|
||||
import static com.carrotsearch.randomizedtesting.RandomizedTest.randomIntBetween;
|
||||
|
||||
public class CompositeStrategyTest extends RandomSpatialOpStrategyTestCase {
|
||||
public class TestCompositeStrategy extends RandomSpatialOpStrategyTestCase {
|
||||
|
||||
private SpatialPrefixTree grid;
|
||||
private RecursivePrefixTreeStrategy rptStrategy;
|
|
@ -30,7 +30,7 @@ import org.locationtech.spatial4j.shape.Shape;
|
|||
import static com.carrotsearch.randomizedtesting.RandomizedTest.randomInt;
|
||||
import static com.carrotsearch.randomizedtesting.RandomizedTest.randomIntBetween;
|
||||
|
||||
public class DateNRStrategyTest extends RandomSpatialOpStrategyTestCase {
|
||||
public class TestDateNRStrategy extends RandomSpatialOpStrategyTestCase {
|
||||
|
||||
static final int ITERATIONS = 10;
|
||||
|
|
@ -44,7 +44,7 @@ import org.locationtech.spatial4j.shape.impl.RectangleImpl;
|
|||
import static com.carrotsearch.randomizedtesting.RandomizedTest.atMost;
|
||||
import static com.carrotsearch.randomizedtesting.RandomizedTest.randomIntBetween;
|
||||
|
||||
public class HeatmapFacetCounterTest extends StrategyTestCase {
|
||||
public class TestHeatmapFacetCounter extends StrategyTestCase {
|
||||
|
||||
SpatialPrefixTree grid;
|
||||
ShapeFactory shapeFactory;
|
|
@ -37,11 +37,11 @@ import org.junit.Test;
|
|||
import java.text.ParseException;
|
||||
import java.util.HashMap;
|
||||
|
||||
public class JtsPolygonTest extends StrategyTestCase {
|
||||
public class TestJtsPolygon extends StrategyTestCase {
|
||||
|
||||
private static final double LUCENE_4464_distErrPct = SpatialArgs.DEFAULT_DISTERRPCT;//DEFAULT 2.5%
|
||||
|
||||
public JtsPolygonTest() {
|
||||
public TestJtsPolygon() {
|
||||
try {
|
||||
HashMap<String, String> args = new HashMap<>();
|
||||
args.put("spatialContextFactory",
|
|
@ -44,7 +44,7 @@ import org.locationtech.spatial4j.shape.Shape;
|
|||
|
||||
import static com.carrotsearch.randomizedtesting.RandomizedTest.randomIntBetween;
|
||||
|
||||
public class NumberRangeFacetsTest extends StrategyTestCase {
|
||||
public class TestNumberRangeFacets extends StrategyTestCase {
|
||||
|
||||
DateRangePrefixTree tree;
|
||||
|
|
@ -63,7 +63,7 @@ import static org.locationtech.spatial4j.shape.SpatialRelation.WITHIN;
|
|||
|
||||
/** Randomized PrefixTree test that considers the fuzziness of the
|
||||
* results introduced by grid approximation. */
|
||||
public class RandomSpatialOpFuzzyPrefixTreeTest extends StrategyTestCase {
|
||||
public class TestRandomSpatialOpFuzzyPrefixTree extends StrategyTestCase {
|
||||
|
||||
static final int ITERATIONS = 10;
|
||||
|
||||
|
@ -471,7 +471,7 @@ public class RandomSpatialOpFuzzyPrefixTreeTest extends StrategyTestCase {
|
|||
final boolean biasContainsThenWithin;
|
||||
|
||||
public ShapePair(Shape shape1, Shape shape2, boolean containsThenWithin) {
|
||||
super(Arrays.asList(shape1, shape2), RandomSpatialOpFuzzyPrefixTreeTest.this.ctx);
|
||||
super(Arrays.asList(shape1, shape2), TestRandomSpatialOpFuzzyPrefixTree.this.ctx);
|
||||
this.shape1 = shape1;
|
||||
this.shape2 = shape2;
|
||||
this.shape1_2D = toNonGeo(shape1);
|
|
@ -17,7 +17,7 @@
|
|||
package org.apache.lucene.spatial.prefix;
|
||||
|
||||
/** Test RandomSpatialOpFuzzyPrefixTreeTest using the PrefixTree index format found in 5.0 and prior. */
|
||||
public class RandomSpatialOpFuzzyPrefixTree50Test extends RandomSpatialOpFuzzyPrefixTreeTest {
|
||||
public class TestRandomSpatialOpFuzzyPrefixTree50 extends TestRandomSpatialOpFuzzyPrefixTree {
|
||||
|
||||
protected RecursivePrefixTreeStrategy newRPT() {
|
||||
return new RecursivePrefixTreeStrategy(this.grid, getClass().getSimpleName()) {
|
|
@ -35,7 +35,7 @@ import org.locationtech.spatial4j.shape.SpatialRelation;
|
|||
|
||||
import static java.time.format.DateTimeFormatter.ISO_DATE_TIME;
|
||||
|
||||
public class DateRangePrefixTreeTest extends LuceneTestCase {
|
||||
public class TestDateRangePrefixTree extends LuceneTestCase {
|
||||
|
||||
@ParametersFactory(argumentFormatting = "calendar=%s")
|
||||
public static Iterable<Object[]> parameters() {
|
||||
|
@ -47,7 +47,7 @@ public class DateRangePrefixTreeTest extends LuceneTestCase {
|
|||
|
||||
private final DateRangePrefixTree tree;
|
||||
|
||||
public DateRangePrefixTreeTest(String suiteName, Calendar templateCal) {
|
||||
public TestDateRangePrefixTree(String suiteName, Calendar templateCal) {
|
||||
tree = new DateRangePrefixTree(templateCal);
|
||||
}
|
||||
|
|
@ -30,7 +30,7 @@ import org.locationtech.spatial4j.shape.Point;
|
|||
/**
|
||||
* Test for S2 Spatial prefix tree.
|
||||
*/
|
||||
public class S2PrefixTreeTest extends LuceneTestCase{
|
||||
public class TestS2PrefixTree extends LuceneTestCase{
|
||||
|
||||
@Test
|
||||
@Repeat(iterations = 10)
|
|
@ -37,7 +37,7 @@ import org.junit.Test;
|
|||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
|
||||
public class SpatialPrefixTreeTest extends SpatialTestCase {
|
||||
public class TestSpatialPrefixTree extends SpatialTestCase {
|
||||
|
||||
//TODO plug in others and test them
|
||||
private SpatialContext ctx;
|
|
@ -24,7 +24,7 @@ import org.junit.Test;
|
|||
import java.text.ParseException;
|
||||
|
||||
//Tests SpatialOperation somewhat too
|
||||
public class SpatialArgsParserTest extends LuceneTestCase {
|
||||
public class TestSpatialArgsParser extends LuceneTestCase {
|
||||
|
||||
private SpatialContext ctx = SpatialContext.GEO;
|
||||
|
|
@ -24,7 +24,7 @@ import org.junit.Before;
|
|||
import org.junit.Test;
|
||||
import org.locationtech.spatial4j.context.SpatialContext;
|
||||
|
||||
public class SerializedStrategyTest extends StrategyTestCase {
|
||||
public class TestSerializedStrategy extends StrategyTestCase {
|
||||
|
||||
@Before
|
||||
@Override
|
|
@ -637,4 +637,4 @@ public class DistribPackageStore implements PackageStore {
|
|||
log.error("", e);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
Loading…
Reference in New Issue