From d07124ef6f90f7cb89173a2aa687473804e1e8bd Mon Sep 17 00:00:00 2001 From: Dawid Weiss Date: Wed, 18 Nov 2015 07:50:02 +0000 Subject: [PATCH] LUCENE-6899: upgrade randomizedtesting to version 2.3.1 git-svn-id: https://svn.apache.org/repos/asf/lucene/dev/trunk@1714945 13f79535-47bb-0310-9956-ffa450edef68 --- dev-tools/idea/.idea/libraries/JUnit.xml | 2 +- lucene/CHANGES.txt | 2 ++ lucene/ivy-versions.properties | 2 +- lucene/licenses/junit4-ant-2.2.0.jar.sha1 | 1 - lucene/licenses/junit4-ant-2.3.1.jar.sha1 | 1 + .../randomizedtesting-runner-2.2.0.jar.sha1 | 1 - .../randomizedtesting-runner-2.3.1.jar.sha1 | 1 + .../lucene/spatial/DistanceStrategyTest.java | 35 +++++-------------- .../lucene/spatial/PortedSolr3Test.java | 26 ++++---------- solr/licenses/junit4-ant-2.2.0.jar.sha1 | 1 - solr/licenses/junit4-ant-2.3.1.jar.sha1 | 1 + .../randomizedtesting-runner-2.2.0.jar.sha1 | 1 - .../randomizedtesting-runner-2.3.1.jar.sha1 | 1 + 13 files changed, 22 insertions(+), 53 deletions(-) delete mode 100644 lucene/licenses/junit4-ant-2.2.0.jar.sha1 create mode 100644 lucene/licenses/junit4-ant-2.3.1.jar.sha1 delete mode 100644 lucene/licenses/randomizedtesting-runner-2.2.0.jar.sha1 create mode 100644 lucene/licenses/randomizedtesting-runner-2.3.1.jar.sha1 delete mode 100644 solr/licenses/junit4-ant-2.2.0.jar.sha1 create mode 100644 solr/licenses/junit4-ant-2.3.1.jar.sha1 delete mode 100644 solr/licenses/randomizedtesting-runner-2.2.0.jar.sha1 create mode 100644 solr/licenses/randomizedtesting-runner-2.3.1.jar.sha1 diff --git a/dev-tools/idea/.idea/libraries/JUnit.xml b/dev-tools/idea/.idea/libraries/JUnit.xml index 9df587247a6..f851c8466f6 100644 --- a/dev-tools/idea/.idea/libraries/JUnit.xml +++ b/dev-tools/idea/.idea/libraries/JUnit.xml @@ -2,7 +2,7 @@ - + diff --git a/lucene/CHANGES.txt b/lucene/CHANGES.txt index 928b6148f6a..9639ecd3690 100644 --- a/lucene/CHANGES.txt +++ b/lucene/CHANGES.txt @@ -294,6 +294,8 @@ Bug Fixes Other +* LUCENE-6899: Upgrade randomizedtesting to 2.3.1. (Dawid Weiss) + * LUCENE-6478: Test execution can hang with java.security.debug. (Dawid Weiss) * LUCENE-6862: Upgrade of RandomizedRunner to version 2.2.0. (Dawid Weiss) diff --git a/lucene/ivy-versions.properties b/lucene/ivy-versions.properties index 59ed4702373..5ad2450416c 100644 --- a/lucene/ivy-versions.properties +++ b/lucene/ivy-versions.properties @@ -7,7 +7,7 @@ /cglib/cglib-nodep = 2.2 /com.adobe.xmp/xmpcore = 5.1.2 -com.carrotsearch.randomizedtesting.version = 2.2.0 +com.carrotsearch.randomizedtesting.version = 2.3.1 /com.carrotsearch.randomizedtesting/junit4-ant = ${com.carrotsearch.randomizedtesting.version} /com.carrotsearch.randomizedtesting/randomizedtesting-runner = ${com.carrotsearch.randomizedtesting.version} diff --git a/lucene/licenses/junit4-ant-2.2.0.jar.sha1 b/lucene/licenses/junit4-ant-2.2.0.jar.sha1 deleted file mode 100644 index 1290d64c9e7..00000000000 --- a/lucene/licenses/junit4-ant-2.2.0.jar.sha1 +++ /dev/null @@ -1 +0,0 @@ -0d401c9c729deccd5db8a5df3102eb18793c2224 diff --git a/lucene/licenses/junit4-ant-2.3.1.jar.sha1 b/lucene/licenses/junit4-ant-2.3.1.jar.sha1 new file mode 100644 index 00000000000..1f2dadffbc8 --- /dev/null +++ b/lucene/licenses/junit4-ant-2.3.1.jar.sha1 @@ -0,0 +1 @@ +054cdf1533c6362812605dab2a984494930108d6 diff --git a/lucene/licenses/randomizedtesting-runner-2.2.0.jar.sha1 b/lucene/licenses/randomizedtesting-runner-2.2.0.jar.sha1 deleted file mode 100644 index b23b23fb373..00000000000 --- a/lucene/licenses/randomizedtesting-runner-2.2.0.jar.sha1 +++ /dev/null @@ -1 +0,0 @@ -60de504132241be049564a3a34fd7dcc296e2ef0 diff --git a/lucene/licenses/randomizedtesting-runner-2.3.1.jar.sha1 b/lucene/licenses/randomizedtesting-runner-2.3.1.jar.sha1 new file mode 100644 index 00000000000..da4334dafaa --- /dev/null +++ b/lucene/licenses/randomizedtesting-runner-2.3.1.jar.sha1 @@ -0,0 +1 @@ +a6e5446a14e44802b91983b3e5c2d56e1d1c424a diff --git a/lucene/spatial/src/test/org/apache/lucene/spatial/DistanceStrategyTest.java b/lucene/spatial/src/test/org/apache/lucene/spatial/DistanceStrategyTest.java index 109ba20f534..9046b3b310a 100644 --- a/lucene/spatial/src/test/org/apache/lucene/spatial/DistanceStrategyTest.java +++ b/lucene/spatial/src/test/org/apache/lucene/spatial/DistanceStrategyTest.java @@ -22,7 +22,6 @@ import java.util.ArrayList; import java.util.Arrays; import java.util.List; -import com.carrotsearch.randomizedtesting.annotations.Name; import com.carrotsearch.randomizedtesting.annotations.ParametersFactory; import com.spatial4j.core.context.SpatialContext; import com.spatial4j.core.shape.Point; @@ -41,8 +40,7 @@ import org.apache.lucene.spatial.vector.PointVectorStrategy; import org.junit.Test; public class DistanceStrategyTest extends StrategyTestCase { - - @ParametersFactory + @ParametersFactory(argumentFormatting = "strategy=%s") public static Iterable parameters() { List ctorArgs = new ArrayList<>(); @@ -52,46 +50,29 @@ public class DistanceStrategyTest extends StrategyTestCase { grid = new QuadPrefixTree(ctx,25); strategy = new RecursivePrefixTreeStrategy(grid, "recursive_quad"); - ctorArgs.add(new Object[]{new Param(strategy)}); + ctorArgs.add(new Object[]{strategy.getFieldName(), strategy}); grid = new GeohashPrefixTree(ctx,12); strategy = new TermQueryPrefixTreeStrategy(grid, "termquery_geohash"); - ctorArgs.add(new Object[]{new Param(strategy)}); + ctorArgs.add(new Object[]{strategy.getFieldName(), strategy}); grid = new PackedQuadPrefixTree(ctx,25); strategy = new RecursivePrefixTreeStrategy(grid, "recursive_packedquad"); - ctorArgs.add(new Object[]{new Param(strategy)}); + ctorArgs.add(new Object[]{strategy.getFieldName(), strategy}); strategy = new PointVectorStrategy(ctx, "pointvector"); - ctorArgs.add(new Object[]{new Param(strategy)}); + ctorArgs.add(new Object[]{strategy.getFieldName(), strategy}); strategy = new BBoxStrategy(ctx, "bbox"); - ctorArgs.add(new Object[]{new Param(strategy)}); + ctorArgs.add(new Object[]{strategy.getFieldName(), strategy}); strategy = new SerializedDVStrategy(ctx, "serialized"); - ctorArgs.add(new Object[]{new Param(strategy)}); + ctorArgs.add(new Object[]{strategy.getFieldName(), strategy}); return ctorArgs; } - // this is a hack for clover! - static class Param { - SpatialStrategy strategy; - - Param(SpatialStrategy strategy) { - this.strategy = strategy; - } - - @Override - public String toString() { - return strategy.getFieldName(); - } - } - -// private String fieldName; - - public DistanceStrategyTest(@Name("strategy") Param param) { - SpatialStrategy strategy = param.strategy; + public DistanceStrategyTest(String suiteName, SpatialStrategy strategy) { this.ctx = strategy.getSpatialContext(); this.strategy = strategy; } diff --git a/lucene/spatial/src/test/org/apache/lucene/spatial/PortedSolr3Test.java b/lucene/spatial/src/test/org/apache/lucene/spatial/PortedSolr3Test.java index 3356fb66b1c..bd2f9bacda8 100644 --- a/lucene/spatial/src/test/org/apache/lucene/spatial/PortedSolr3Test.java +++ b/lucene/spatial/src/test/org/apache/lucene/spatial/PortedSolr3Test.java @@ -22,7 +22,6 @@ import java.util.HashSet; import java.util.List; import java.util.Set; -import com.carrotsearch.randomizedtesting.annotations.Name; import com.carrotsearch.randomizedtesting.annotations.ParametersFactory; import com.spatial4j.core.context.SpatialContext; import com.spatial4j.core.distance.DistanceUtils; @@ -44,7 +43,7 @@ import org.junit.Test; */ public class PortedSolr3Test extends StrategyTestCase { - @ParametersFactory + @ParametersFactory(argumentFormatting = "strategy=%s") public static Iterable parameters() { List ctorArgs = new ArrayList<>(); @@ -54,36 +53,23 @@ public class PortedSolr3Test extends StrategyTestCase { grid = new GeohashPrefixTree(ctx,12); strategy = new RecursivePrefixTreeStrategy(grid, "recursive_geohash"); - ctorArgs.add(new Object[]{new Param(strategy)}); + ctorArgs.add(new Object[]{strategy.getFieldName(), strategy}); grid = new QuadPrefixTree(ctx,25); strategy = new RecursivePrefixTreeStrategy(grid, "recursive_quad"); - ctorArgs.add(new Object[]{new Param(strategy)}); + ctorArgs.add(new Object[]{strategy.getFieldName(), strategy}); grid = new GeohashPrefixTree(ctx,12); strategy = new TermQueryPrefixTreeStrategy(grid, "termquery_geohash"); - ctorArgs.add(new Object[]{new Param(strategy)}); + ctorArgs.add(new Object[]{strategy.getFieldName(), strategy}); strategy = new PointVectorStrategy(ctx, "pointvector"); - ctorArgs.add(new Object[]{new Param(strategy)}); + ctorArgs.add(new Object[]{strategy.getFieldName(), strategy}); return ctorArgs; } - - // this is a hack for clover! (otherwise strategy.toString() used as file name) - static class Param { - SpatialStrategy strategy; - Param(SpatialStrategy strategy) { this.strategy = strategy; } - - @Override - public String toString() { return strategy.getFieldName(); } - } - -// private String fieldName; - - public PortedSolr3Test(@Name("strategy") Param param) { - SpatialStrategy strategy = param.strategy; + public PortedSolr3Test(String suiteName, SpatialStrategy strategy) { this.ctx = strategy.getSpatialContext(); this.strategy = strategy; } diff --git a/solr/licenses/junit4-ant-2.2.0.jar.sha1 b/solr/licenses/junit4-ant-2.2.0.jar.sha1 deleted file mode 100644 index 1290d64c9e7..00000000000 --- a/solr/licenses/junit4-ant-2.2.0.jar.sha1 +++ /dev/null @@ -1 +0,0 @@ -0d401c9c729deccd5db8a5df3102eb18793c2224 diff --git a/solr/licenses/junit4-ant-2.3.1.jar.sha1 b/solr/licenses/junit4-ant-2.3.1.jar.sha1 new file mode 100644 index 00000000000..1f2dadffbc8 --- /dev/null +++ b/solr/licenses/junit4-ant-2.3.1.jar.sha1 @@ -0,0 +1 @@ +054cdf1533c6362812605dab2a984494930108d6 diff --git a/solr/licenses/randomizedtesting-runner-2.2.0.jar.sha1 b/solr/licenses/randomizedtesting-runner-2.2.0.jar.sha1 deleted file mode 100644 index b23b23fb373..00000000000 --- a/solr/licenses/randomizedtesting-runner-2.2.0.jar.sha1 +++ /dev/null @@ -1 +0,0 @@ -60de504132241be049564a3a34fd7dcc296e2ef0 diff --git a/solr/licenses/randomizedtesting-runner-2.3.1.jar.sha1 b/solr/licenses/randomizedtesting-runner-2.3.1.jar.sha1 new file mode 100644 index 00000000000..da4334dafaa --- /dev/null +++ b/solr/licenses/randomizedtesting-runner-2.3.1.jar.sha1 @@ -0,0 +1 @@ +a6e5446a14e44802b91983b3e5c2d56e1d1c424a