Apache Lucene open-source search software
Remove junit4 repeat annotations. #16028
Dawid Weiss539d9dbcde8f
diff --git a/lucene/core/src/test/org/apache/lucene/util/TestMergedIterator.java b/lucene/core/src/test/org/apache/lucene/util/TestMergedIterator.javaindex 36e03278314..86f0b56d5b4 100644--- a/lucene/core/src/test/org/apache/lucene/util/TestMergedIterator.java+++ b/lucene/core/src/test/org/apache/lucene/util/TestMergedIterator.java@@ -16,7 +16,6 @@*/package org.apache.lucene.util;-import com.carrotsearch.randomizedtesting.annotations.Repeat;import java.util.ArrayList;import java.util.Iterator;import java.util.List;@@ -24,7 +23,6 @@ import java.util.Random;import org.apache.lucene.tests.util.LuceneTestCase;public class TestMergedIterator extends LuceneTestCase {- private static final int REPEATS = 2;private static final int VALS_TO_MERGE = 15000;@SuppressWarnings({"rawtypes", "unchecked"})@@ -43,62 +41,50 @@ public class TestMergedIterator extends LuceneTestCase {assertFalse(merged.hasNext());}- @Repeat(iterations = REPEATS)public void testNoDupsRemoveDups() {testCase(1, 1, true);}- @Repeat(iterations = REPEATS)public void testOffItrDupsRemoveDups() {testCase(3, 1, true);}- @Repeat(iterations = REPEATS)public void testOnItrDupsRemoveDups() {testCase(1, 3, true);}- @Repeat(iterations = REPEATS)public void testOnItrRandomDupsRemoveDups() {testCase(1, -3, true);}- @Repeat(iterations = REPEATS)public void testBothDupsRemoveDups() {testCase(3, 3, true);}- @Repeat(iterations = REPEATS)public void testBothDupsWithRandomDupsRemoveDups() {testCase(3, -3, true);}- @Repeat(iterations = REPEATS)public void testNoDupsKeepDups() {testCase(1, 1, false);}- @Repeat(iterations = REPEATS)public void testOffItrDupsKeepDups() {testCase(3, 1, false);}- @Repeat(iterations = REPEATS)public void testOnItrDupsKeepDups() {testCase(1, 3, false);}- @Repeat(iterations = REPEATS)public void testOnItrRandomDupsKeepDups() {testCase(1, -3, false);}- @Repeat(iterations = REPEATS)public void testBothDupsKeepDups() {testCase(3, 3, false);}- @Repeat(iterations = REPEATS)public void testBothDupsWithRandomDupsKeepDups() {testCase(3, -3, false);}diff --git a/lucene/highlighter/src/test/org/apache/lucene/search/highlight/TestTokenSources.java b/lucene/highlighter/src/test/org/apache/lucene/search/highlight/TestTokenSources.javaindex 6a466822b40..9a88d011f1b 100644--- a/lucene/highlighter/src/test/org/apache/lucene/search/highlight/TestTokenSources.java+++ b/lucene/highlighter/src/test/org/apache/lucene/search/highlight/TestTokenSources.java@@ -16,7 +16,6 @@*/package org.apache.lucene.search.highlight;-import com.carrotsearch.randomizedtesting.annotations.Repeat;import java.io.IOException;import java.util.Arrays;import org.apache.lucene.analysis.TokenStream;@@ -360,8 +359,6 @@ public class TestTokenSources extends BaseTokenStreamTestCase {dir.close();}- @Repeat(iterations = 10)- // @Seed("947083AB20AB2D4F")public void testRandomizedRoundTrip() throws Exception {final int distinct = TestUtil.nextInt(random(), 1, 10);diff --git a/lucene/spatial-extras/src/test/org/apache/lucene/spatial/prefix/TestDateNRStrategy.java b/lucene/spatial-extras/src/test/org/apache/lucene/spatial/prefix/TestDateNRStrategy.javaindex 1133895d3bd..cfb60b91662 100644--- a/lucene/spatial-extras/src/test/org/apache/lucene/spatial/prefix/TestDateNRStrategy.java+++ b/lucene/spatial-extras/src/test/org/apache/lucene/spatial/prefix/TestDateNRStrategy.java@@ -19,7 +19,6 @@ package org.apache.lucene.spatial.prefix;import static com.carrotsearch.randomizedtesting.RandomizedTest.randomInt;import static com.carrotsearch.randomizedtesting.RandomizedTest.randomIntBetween;-import com.carrotsearch.randomizedtesting.annotations.Repeat;import java.io.IOException;import java.util.Calendar;import org.apache.lucene.spatial.prefix.tree.DateRangePrefixTree;@@ -29,9 +28,6 @@ import org.junit.Before;import org.locationtech.spatial4j.shape.Shape;public class TestDateNRStrategy extends RandomSpatialOpStrategyTestCase {-- static final int ITERATIONS = 10;-DateRangePrefixTree tree;long randomCalWindowMs;@@ -49,17 +45,14 @@ public class TestDateNRStrategy extends RandomSpatialOpStrategyTestCase {randomCalWindowMs = Math.max(2000L, tmpCal.getTimeInMillis());}- @Repeat(iterations = ITERATIONS)public void testIntersects() throws IOException {testOperationRandomShapes(SpatialOperation.Intersects);}- @Repeat(iterations = ITERATIONS)public void testWithin() throws IOException {testOperationRandomShapes(SpatialOperation.IsWithin);}- @Repeat(iterations = ITERATIONS)public void testContains() throws IOException {testOperationRandomShapes(SpatialOperation.Contains);}diff --git a/lucene/spatial-extras/src/test/org/apache/lucene/spatial/prefix/TestHeatmapFacetCounter.java b/lucene/spatial-extras/src/test/org/apache/lucene/spatial/prefix/TestHeatmapFacetCounter.javaindex 6ba025d321c..8afe91822c7 100644--- a/lucene/spatial-extras/src/test/org/apache/lucene/spatial/prefix/TestHeatmapFacetCounter.java+++ b/lucene/spatial-extras/src/test/org/apache/lucene/spatial/prefix/TestHeatmapFacetCounter.java@@ -19,7 +19,6 @@ package org.apache.lucene.spatial.prefix;import static com.carrotsearch.randomizedtesting.RandomizedTest.atMost;import static com.carrotsearch.randomizedtesting.RandomizedTest.randomIntBetween;-import com.carrotsearch.randomizedtesting.annotations.Repeat;import java.io.IOException;import java.util.ArrayList;import java.util.List;@@ -158,7 +157,6 @@ public class TestHeatmapFacetCounter extends StrategyTestCase {}}- @Repeat(iterations = 20)public void testRandom() throws IOException {// Tests using random index shapes & query shapes. This has found all sorts of edge case bugs// (e.g. dateline,diff --git a/lucene/spatial-extras/src/test/org/apache/lucene/spatial/prefix/TestNumberRangeFacets.java b/lucene/spatial-extras/src/test/org/apache/lucene/spatial/prefix/TestNumberRangeFacets.javaindex 5512b49a0d8..970609ca9d2 100644--- a/lucene/spatial-extras/src/test/org/apache/lucene/spatial/prefix/TestNumberRangeFacets.java+++ b/lucene/spatial-extras/src/test/org/apache/lucene/spatial/prefix/TestNumberRangeFacets.java@@ -18,7 +18,6 @@ package org.apache.lucene.spatial.prefix;import static com.carrotsearch.randomizedtesting.RandomizedTest.randomIntBetween;-import com.carrotsearch.randomizedtesting.annotations.Repeat;import java.io.IOException;import java.util.ArrayList;import java.util.Calendar;@@ -59,7 +58,6 @@ public class TestNumberRangeFacets extends StrategyTestCase {randomCalWindowMs = Math.max(2000L, tmpCal.getTimeInMillis());}- @Repeat(iterations = 20)public void test() throws IOException {// generate test dataList<Shape> indexedShapes = new ArrayList<>();diff --git a/lucene/spatial-extras/src/test/org/apache/lucene/spatial/prefix/TestRandomSpatialOpFuzzyPrefixTree.java b/lucene/spatial-extras/src/test/org/apache/lucene/spatial/prefix/TestRandomSpatialOpFuzzyPrefixTree.javaindex c9d7e0dbe32..99f171d6ab7 100644--- a/lucene/spatial-extras/src/test/org/apache/lucene/spatial/prefix/TestRandomSpatialOpFuzzyPrefixTree.java+++ b/lucene/spatial-extras/src/test/org/apache/lucene/spatial/prefix/TestRandomSpatialOpFuzzyPrefixTree.java@@ -24,7 +24,6 @@ import static org.locationtech.spatial4j.shape.SpatialRelation.DISJOINT;import static org.locationtech.spatial4j.shape.SpatialRelation.INTERSECTS;import static org.locationtech.spatial4j.shape.SpatialRelation.WITHIN;-import com.carrotsearch.randomizedtesting.annotations.Repeat;import java.io.IOException;import java.util.ArrayList;import java.util.Arrays;@@ -126,19 +125,16 @@ public class TestRandomSpatialOpFuzzyPrefixTree extends StrategyTestCase {return new RecursivePrefixTreeStrategy(this.grid, getClass().getSimpleName());}- @Repeat(iterations = ITERATIONS)public void testIntersects() throws IOException {setupGrid(-1);doTest(SpatialOperation.Intersects);}- @Repeat(iterations = ITERATIONS)public void testWithin() throws IOException {setupGrid(-1);doTest(SpatialOperation.IsWithin);}- @Repeat(iterations = ITERATIONS)public void testContains() throws IOException {setupGrid(-1);doTest(SpatialOperation.Contains);diff --git a/lucene/spatial-extras/src/test/org/apache/lucene/spatial/prefix/tree/TestS2PrefixTree.java b/lucene/spatial-extras/src/test/org/apache/lucene/spatial/prefix/tree/TestS2PrefixTree.javaindex c5fe3d7cb2c..5b2f72d119b 100644--- a/lucene/spatial-extras/src/test/org/apache/lucene/spatial/prefix/tree/TestS2PrefixTree.java+++ b/lucene/spatial-extras/src/test/org/apache/lucene/spatial/prefix/tree/TestS2PrefixTree.java@@ -17,7 +17,6 @@package org.apache.lucene.spatial.prefix.tree;-import com.carrotsearch.randomizedtesting.annotations.Repeat;import com.google.common.geometry.S2CellId;import com.google.common.geometry.S2Projections;import org.apache.lucene.spatial.spatial4j.Geo3dSpatialContextFactory;@@ -29,7 +28,6 @@ import org.locationtech.spatial4j.shape.Point;/** Test for S2 Spatial prefix tree. */public class TestS2PrefixTree extends LuceneTestCase {- @Repeat(iterations = 10)public void testCells() {int face = random().nextInt(6);S2CellId id = S2CellId.fromFacePosLevel(face, 0, 0);@@ -67,7 +65,6 @@ public class TestS2PrefixTree extends LuceneTestCase {assertEquals(cell, cell2);}- @Repeat(iterations = 10)public void testDistanceAndLevels() {S2PrefixTree tree =new S2PrefixTree(@@ -95,7 +92,6 @@ public class TestS2PrefixTree extends LuceneTestCase {assertTrue(randomDist > distanceLevel);}- @Repeat(iterations = 10)public void testPrecision() {int arity = random().nextInt(3) + 1;SpatialContext context = new Geo3dSpatialContextFactory().newSpatialContext();diff --git a/lucene/spatial3d/src/test/org/apache/lucene/spatial3d/geom/TestGeoExactCircle.java b/lucene/spatial3d/src/test/org/apache/lucene/spatial3d/geom/TestGeoExactCircle.javaindex 804d47e02cb..8bc9def80ac 100644--- a/lucene/spatial3d/src/test/org/apache/lucene/spatial3d/geom/TestGeoExactCircle.java+++ b/lucene/spatial3d/src/test/org/apache/lucene/spatial3d/geom/TestGeoExactCircle.java@@ -21,7 +21,6 @@ import static org.apache.lucene.spatial3d.tests.RandomGeo3dShapeGenerator.randomimport static org.apache.lucene.spatial3d.tests.RandomGeo3dShapeGenerator.randomGeoPoint;import static org.apache.lucene.spatial3d.tests.RandomGeo3dShapeGenerator.randomPlanetModel;-import com.carrotsearch.randomizedtesting.annotations.Repeat;import org.apache.lucene.spatial3d.tests.RandomGeo3dShapeGenerator;import org.apache.lucene.tests.util.LuceneTestCase;import org.junit.Test;@@ -79,7 +78,6 @@ public class TestGeoExactCircle extends LuceneTestCase {}@Test- @Repeat(iterations = 100)public void RandomPointBearingWGS84Test() {PlanetModel planetModel = PlanetModel.WGS84;GeoPoint center = randomGeoPoint(planetModel);@@ -91,7 +89,6 @@ public class TestGeoExactCircle extends LuceneTestCase {}@Test- @Repeat(iterations = 100)public void RandomPointBearingCardinalTest() {// surface distance calculations methods start not converging when// planet scaledFlattening > 0.4@@ -190,7 +187,6 @@ public class TestGeoExactCircle extends LuceneTestCase {* in LUCENE-8054 we have problems with exact circles that have edges that are close together.* This test creates those circles with the same center and slightly different radius.*/- @Repeat(iterations = 100)public void testRandomLUCENE8054() {PlanetModel planetModel = randomPlanetModel();GeoCircle circle1 =diff --git a/lucene/spatial3d/src/test/org/apache/lucene/spatial3d/geom/TestRandomBinaryCodec.java b/lucene/spatial3d/src/test/org/apache/lucene/spatial3d/geom/TestRandomBinaryCodec.javaindex c571036f505..53062203d95 100644--- a/lucene/spatial3d/src/test/org/apache/lucene/spatial3d/geom/TestRandomBinaryCodec.java+++ b/lucene/spatial3d/src/test/org/apache/lucene/spatial3d/geom/TestRandomBinaryCodec.java@@ -22,7 +22,6 @@ import static org.apache.lucene.spatial3d.tests.RandomGeo3dShapeGenerator.randomimport static org.apache.lucene.spatial3d.tests.RandomGeo3dShapeGenerator.randomPlanetModel;import static org.apache.lucene.spatial3d.tests.RandomGeo3dShapeGenerator.randomShapeType;-import com.carrotsearch.randomizedtesting.annotations.Repeat;import java.io.ByteArrayInputStream;import java.io.ByteArrayOutputStream;import java.io.IOException;@@ -30,7 +29,7 @@ import org.apache.lucene.tests.util.LuceneTestCase;/** Test to check Serialization */public class TestRandomBinaryCodec extends LuceneTestCase {- @Repeat(iterations = 10)+public void testRandomPointCodec() throws IOException {PlanetModel planetModel = randomPlanetModel();GeoPoint shape = randomGeoPoint(planetModel);@@ -41,7 +40,6 @@ public class TestRandomBinaryCodec extends LuceneTestCase {assertEquals(shape.toString(), shape, shapeCopy);}- @Repeat(iterations = 100)public void testRandomPlanetObjectCodec() throws IOException {PlanetModel planetModel = randomPlanetModel();int type = randomShapeType();@@ -53,7 +51,6 @@ public class TestRandomBinaryCodec extends LuceneTestCase {assertEquals(shape.toString(), shape, shapeCopy);}- @Repeat(iterations = 100)public void testRandomShapeCodec() throws IOException {PlanetModel planetModel = randomPlanetModel();int type = randomShapeType();diff --git a/lucene/spatial3d/src/test/org/apache/lucene/spatial3d/geom/TestRandomPlane.java b/lucene/spatial3d/src/test/org/apache/lucene/spatial3d/geom/TestRandomPlane.javaindex 360670ad7b7..687abb84bea 100644--- a/lucene/spatial3d/src/test/org/apache/lucene/spatial3d/geom/TestRandomPlane.java+++ b/lucene/spatial3d/src/test/org/apache/lucene/spatial3d/geom/TestRandomPlane.java@@ -20,7 +20,6 @@ package org.apache.lucene.spatial3d.geom;import static org.apache.lucene.spatial3d.tests.RandomGeo3dShapeGenerator.randomGeoPoint;import static org.apache.lucene.spatial3d.tests.RandomGeo3dShapeGenerator.randomPlanetModel;-import com.carrotsearch.randomizedtesting.annotations.Repeat;import java.util.ArrayList;import java.util.List;import org.apache.lucene.tests.util.LuceneTestCase;@@ -28,7 +27,6 @@ import org.apache.lucene.tests.util.LuceneTestCase;/** Random test for planes. */public class TestRandomPlane extends LuceneTestCase {- @Repeat(iterations = 10)public void testPlaneAccuracy() {PlanetModel planetModel = randomPlanetModel();GeoPoint point1 = randomGeoPoint(planetModel);@@ -51,7 +49,6 @@ public class TestRandomPlane extends LuceneTestCase {}}- @Repeat(iterations = 10)public void testPlaneThreePointsAccuracy() {PlanetModel planetModel = randomPlanetModel();for (int i = 0; i < 1000; i++) {@@ -88,7 +85,6 @@ public class TestRandomPlane extends LuceneTestCase {}}- @Repeat(iterations = 10)public void testPolygonAccuracy() {PlanetModel planetModel = randomPlanetModel();GeoPoint point1 = randomGeoPoint(planetModel);