Apache Solr open-source search software
LUCENE-8611: Update randomizedtesting to 2.7.2, JUnit to 4.12, add hamcrest-core dependency.
Dawid Weisse916f1fb86c1
diff --git a/lucene/CHANGES.txt b/lucene/CHANGES.txtindex bed537b9dc5..a7d5fb9ff18 100644--- a/lucene/CHANGES.txt+++ b/lucene/CHANGES.txt@@ -230,6 +230,9 @@ OptimizationsBuild+* LUCENE-8611: Update randomizedtesting to 2.7.2, JUnit to 4.12, add hamcrest-core+ dependency. (Dawid Weiss)+* LUCENE-8537: ant test command fails under lucene/tools (Peter Somogyi)Bug fixes:diff --git a/lucene/core/src/test/org/apache/lucene/index/TestIndexSorting.java b/lucene/core/src/test/org/apache/lucene/index/TestIndexSorting.javaindex 5bfd9d54897..857caa81f1d 100644--- a/lucene/core/src/test/org/apache/lucene/index/TestIndexSorting.java+++ b/lucene/core/src/test/org/apache/lucene/index/TestIndexSorting.java@@ -86,7 +86,7 @@ import org.apache.lucene.util.NumericUtils;import org.apache.lucene.util.TestUtil;import static org.apache.lucene.search.DocIdSetIterator.NO_MORE_DOCS;-import static org.junit.internal.matchers.StringContains.containsString;+import static org.hamcrest.core.StringContains.containsString;public class TestIndexSorting extends LuceneTestCase {static class AssertingNeedsIndexSortCodec extends FilterCodec {diff --git a/lucene/ivy-versions.properties b/lucene/ivy-versions.propertiesindex 5a38cbb45fe..05dc766450d 100644--- a/lucene/ivy-versions.properties+++ b/lucene/ivy-versions.properties@@ -5,7 +5,7 @@/antlr/antlr = 2.7.7/com.adobe.xmp/xmpcore = 5.1.3-com.carrotsearch.randomizedtesting.version = 2.6.4+com.carrotsearch.randomizedtesting.version = 2.7.2/com.carrotsearch.randomizedtesting/junit4-ant = ${com.carrotsearch.randomizedtesting.version}/com.carrotsearch.randomizedtesting/randomizedtesting-runner = ${com.carrotsearch.randomizedtesting.version}@@ -79,7 +79,7 @@ io.prometheus.version = 0.2.0/javax.activation/activation = 1.1.1/javax.servlet/javax.servlet-api = 3.1.0-/junit/junit = 4.10+/junit/junit = 4.12/mecab/mecab-ipadic = 2.7.0-20070801/mecab/mecab-ko-dic = 2.0.3-20170922@@ -264,6 +264,8 @@ org.gagravarr.vorbis.java.version = 0.8/org.gagravarr/vorbis-java-core = ${org.gagravarr.vorbis.java.version}/org.gagravarr/vorbis-java-tika = ${org.gagravarr.vorbis.java.version}+/org.hamcrest/hamcrest-core = 1.3+/org.hsqldb/hsqldb = 2.4.0/org.jdom/jdom2 = 2.0.6diff --git a/lucene/licenses/hamcrest-core-1.3.jar.sha1 b/lucene/licenses/hamcrest-core-1.3.jar.sha1new file mode 100644index 00000000000..67add77ada7--- /dev/null+++ b/lucene/licenses/hamcrest-core-1.3.jar.sha1@@ -0,0 +1 @@+42a25dc3219429f0e5d060061f71acb49bf010a0diff --git a/lucene/licenses/hamcrest-core-LICENSE-BSD.txt b/lucene/licenses/hamcrest-core-LICENSE-BSD.txtnew file mode 100644index 00000000000..7f201a5686c--- /dev/null+++ b/lucene/licenses/hamcrest-core-LICENSE-BSD.txt@@ -0,0 +1,27 @@+BSD License++Copyright (c) 2000-2006, www.hamcrest.org+All rights reserved.++Redistribution and use in source and binary forms, with or without+modification, are permitted provided that the following conditions are met:++Redistributions of source code must retain the above copyright notice, this list of+conditions and the following disclaimer. Redistributions in binary form must reproduce+the above copyright notice, this list of conditions and the following disclaimer in+the documentation and/or other materials provided with the distribution.++Neither the name of Hamcrest nor the names of its contributors may be used to endorse+or promote products derived from this software without specific prior written+permission.++THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY+EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES+OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT+SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT,+INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED+TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR+BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN+CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY+WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH+DAMAGE.\ No newline at end of filediff --git a/lucene/licenses/hamcrest-core-NOTICE.txt b/lucene/licenses/hamcrest-core-NOTICE.txtnew file mode 100644index 00000000000..e69de29bb2ddiff --git a/lucene/licenses/junit-4.10.jar.sha1 b/lucene/licenses/junit-4.10.jar.sha1deleted file mode 100644index 875e26cee22..00000000000--- a/lucene/licenses/junit-4.10.jar.sha1+++ /dev/null@@ -1 +0,0 @@-e4f1766ce7404a08f45d859fb9c226fc9e41a861diff --git a/lucene/licenses/junit-4.12.jar.sha1 b/lucene/licenses/junit-4.12.jar.sha1new file mode 100644index 00000000000..d0dbc0c46c7--- /dev/null+++ b/lucene/licenses/junit-4.12.jar.sha1@@ -0,0 +1 @@+2973d150c0dc1fefe998f834810d68f278ea58ecdiff --git a/lucene/licenses/randomizedtesting-runner-2.6.4.jar.sha1 b/lucene/licenses/randomizedtesting-runner-2.6.4.jar.sha1deleted file mode 100644index 83634d903d6..00000000000--- a/lucene/licenses/randomizedtesting-runner-2.6.4.jar.sha1+++ /dev/null@@ -1 +0,0 @@-37bc4cf1f458d4718892d33ab77378e38d4877d8diff --git a/lucene/licenses/randomizedtesting-runner-2.7.2.jar.sha1 b/lucene/licenses/randomizedtesting-runner-2.7.2.jar.sha1new file mode 100644index 00000000000..9eeaf24b7ba--- /dev/null+++ b/lucene/licenses/randomizedtesting-runner-2.7.2.jar.sha1@@ -0,0 +1 @@+84ed6b5f70906f9ef173db67ccde657b43ea60dfdiff --git a/lucene/memory/src/test/org/apache/lucene/index/memory/TestMemoryIndex.java b/lucene/memory/src/test/org/apache/lucene/index/memory/TestMemoryIndex.javaindex 94cf97448f6..e09c9d161fe 100644--- a/lucene/memory/src/test/org/apache/lucene/index/memory/TestMemoryIndex.java+++ b/lucene/memory/src/test/org/apache/lucene/index/memory/TestMemoryIndex.java@@ -76,7 +76,7 @@ import org.junit.Test;import static org.hamcrest.CoreMatchers.is;import static org.hamcrest.CoreMatchers.not;-import static org.junit.internal.matchers.StringContains.containsString;+import static org.hamcrest.core.StringContains.containsString;public class TestMemoryIndex extends LuceneTestCase {diff --git a/lucene/test-framework/ivy.xml b/lucene/test-framework/ivy.xmlindex a51716c8698..9b2932de095 100644--- a/lucene/test-framework/ivy.xml+++ b/lucene/test-framework/ivy.xml@@ -25,6 +25,7 @@<dependencies><dependency org="junit" name="junit" rev="${/junit/junit}" conf="compile"/>+ <dependency org="org.hamcrest" name="hamcrest-core" rev="${/org.hamcrest/hamcrest-core}" conf="compile"/><dependency org="com.carrotsearch.randomizedtesting" name="randomizedtesting-runner" rev="${/com.carrotsearch.randomizedtesting/randomizedtesting-runner}" conf="compile"/><exclude org="*" ext="*" matcher="regexp" type="${ivy.exclude.types}"/>diff --git a/solr/contrib/ltr/src/test/org/apache/solr/ltr/model/TestMultipleAdditiveTreesModel.java b/solr/contrib/ltr/src/test/org/apache/solr/ltr/model/TestMultipleAdditiveTreesModel.javaindex edc0e24e251..e7c920fea19 100644--- a/solr/contrib/ltr/src/test/org/apache/solr/ltr/model/TestMultipleAdditiveTreesModel.java+++ b/solr/contrib/ltr/src/test/org/apache/solr/ltr/model/TestMultipleAdditiveTreesModel.java@@ -16,7 +16,7 @@*/package org.apache.solr.ltr.model;-import static org.junit.internal.matchers.StringContains.containsString;+import static org.hamcrest.core.StringContains.containsString;import org.apache.solr.client.solrj.SolrQuery;import org.apache.solr.ltr.TestRerankBase;diff --git a/solr/core/src/test/org/apache/solr/cloud/RemoteQueryErrorTest.java b/solr/core/src/test/org/apache/solr/cloud/RemoteQueryErrorTest.javaindex 54503bfe1ea..7962a601dfe 100644--- a/solr/core/src/test/org/apache/solr/cloud/RemoteQueryErrorTest.java+++ b/solr/core/src/test/org/apache/solr/cloud/RemoteQueryErrorTest.java@@ -24,7 +24,7 @@ import org.apache.solr.common.SolrInputDocument;import org.junit.BeforeClass;import org.junit.Test;-import static org.junit.internal.matchers.StringContains.containsString;+import static org.hamcrest.core.StringContains.containsString;/*** Verify that remote (proxied) queries return proper error messagesdiff --git a/solr/core/src/test/org/apache/solr/core/TestConfigSets.java b/solr/core/src/test/org/apache/solr/core/TestConfigSets.javaindex b0d8212dc35..6c110c3f441 100644--- a/solr/core/src/test/org/apache/solr/core/TestConfigSets.java+++ b/solr/core/src/test/org/apache/solr/core/TestConfigSets.java@@ -33,7 +33,7 @@ import org.junit.rules.TestRule;import static org.hamcrest.CoreMatchers.notNullValue;import static org.hamcrest.CoreMatchers.nullValue;import static org.hamcrest.core.Is.is;-import static org.junit.internal.matchers.StringContains.containsString;+import static org.hamcrest.core.StringContains.containsString;public class TestConfigSets extends SolrTestCaseJ4 {diff --git a/solr/core/src/test/org/apache/solr/core/TestCoreDiscovery.java b/solr/core/src/test/org/apache/solr/core/TestCoreDiscovery.javaindex f960c89da3d..2b9bdc0e059 100644--- a/solr/core/src/test/org/apache/solr/core/TestCoreDiscovery.java+++ b/solr/core/src/test/org/apache/solr/core/TestCoreDiscovery.java@@ -43,7 +43,7 @@ import static org.apache.solr.core.CoreContainer.CORE_DISCOVERY_COMPLETE;import static org.apache.solr.core.CoreContainer.INITIAL_CORE_LOAD_COMPLETE;import static org.apache.solr.core.CoreContainer.LOAD_COMPLETE;import static org.hamcrest.CoreMatchers.not;-import static org.junit.internal.matchers.StringContains.containsString;+import static org.hamcrest.core.StringContains.containsString;public class TestCoreDiscovery extends SolrTestCaseJ4 {diff --git a/solr/core/src/test/org/apache/solr/core/TestSolrXml.java b/solr/core/src/test/org/apache/solr/core/TestSolrXml.javaindex 031b4c8d0e1..f0702dcffda 100644--- a/solr/core/src/test/org/apache/solr/core/TestSolrXml.java+++ b/solr/core/src/test/org/apache/solr/core/TestSolrXml.java@@ -34,7 +34,7 @@ import org.junit.rules.ExpectedException;import org.junit.rules.RuleChain;import org.junit.rules.TestRule;-import static org.junit.internal.matchers.StringContains.containsString;+import static org.hamcrest.core.StringContains.containsString;public class TestSolrXml extends SolrTestCaseJ4 {diff --git a/solr/core/src/test/org/apache/solr/update/PeerSyncTest.java b/solr/core/src/test/org/apache/solr/update/PeerSyncTest.javaindex 001c7279fcb..9e6fd603133 100644--- a/solr/core/src/test/org/apache/solr/update/PeerSyncTest.java+++ b/solr/core/src/test/org/apache/solr/update/PeerSyncTest.java@@ -38,7 +38,7 @@ import org.apache.solr.schema.IndexSchema;import org.apache.solr.update.processor.DistributedUpdateProcessor;import org.apache.solr.update.processor.DistributedUpdateProcessor.DistribPhase;import org.junit.Test;-import static org.junit.internal.matchers.StringContains.containsString;+import static org.hamcrest.core.StringContains.containsString;@SuppressSSL(bugUrl = "https://issues.apache.org/jira/browse/SOLR-5776")public class PeerSyncTest extends BaseDistributedSearchTestCase {diff --git a/solr/core/src/test/org/apache/solr/update/TestInPlaceUpdatesStandalone.java b/solr/core/src/test/org/apache/solr/update/TestInPlaceUpdatesStandalone.javaindex 5986870f908..88dc7bb6f3e 100644--- a/solr/core/src/test/org/apache/solr/update/TestInPlaceUpdatesStandalone.java+++ b/solr/core/src/test/org/apache/solr/update/TestInPlaceUpdatesStandalone.java@@ -53,7 +53,7 @@ import org.junit.BeforeClass;import org.junit.Test;import static org.apache.solr.update.UpdateLogTest.buildAddUpdateCommand;-import static org.junit.internal.matchers.StringContains.containsString;+import static org.hamcrest.core.StringContains.containsString;/**diff --git a/solr/core/src/test/org/apache/solr/update/UpdateLogTest.java b/solr/core/src/test/org/apache/solr/update/UpdateLogTest.javaindex d2a57507310..e66b05a933b 100644--- a/solr/core/src/test/org/apache/solr/update/UpdateLogTest.java+++ b/solr/core/src/test/org/apache/solr/update/UpdateLogTest.java@@ -31,7 +31,7 @@ import org.junit.BeforeClass;import org.junit.Test;import static org.apache.solr.common.params.CommonParams.VERSION_FIELD;-import static org.junit.internal.matchers.StringContains.containsString;+import static org.hamcrest.core.StringContains.containsString;public class UpdateLogTest extends SolrTestCaseJ4 {diff --git a/solr/core/src/test/org/apache/solr/util/configuration/SSLCredentialProviderFactoryTest.java b/solr/core/src/test/org/apache/solr/util/configuration/SSLCredentialProviderFactoryTest.javaindex 21e7f8a594d..a6a5b06ccc9 100644--- a/solr/core/src/test/org/apache/solr/util/configuration/SSLCredentialProviderFactoryTest.java+++ b/solr/core/src/test/org/apache/solr/util/configuration/SSLCredentialProviderFactoryTest.java@@ -22,11 +22,13 @@ import java.util.List;import org.apache.lucene.util.TestRuleRestoreSystemProperties;import org.apache.solr.util.configuration.providers.EnvSSLCredentialProvider;import org.apache.solr.util.configuration.providers.SysPropSSLCredentialProvider;+import org.hamcrest.Matcher;import org.junit.Rule;import org.junit.Test;import org.junit.rules.TestRule;import static org.hamcrest.core.Is.is;+import static org.hamcrest.core.IsInstanceOf.instanceOf;import static org.junit.Assert.assertThat;/**@@ -38,26 +40,31 @@ public class SSLCredentialProviderFactoryTest {SSLCredentialProviderFactory.PROVIDER_CHAIN_KEY);+ public static <T> Matcher<T> isA(Class<?> type) {+ final Matcher<T> typeMatcher = instanceOf(type);+ return is(typeMatcher);+ }+@Testpublic void testGetProvidersOrder() {SSLCredentialProviderFactory sut = getSut("sysprop;env");List<SSLCredentialProvider> providers = sut.getProviders();- assertThat(providers.get(0), is(SysPropSSLCredentialProvider.class));- assertThat(providers.get(1), is(EnvSSLCredentialProvider.class));+ assertThat(providers.get(0), isA(SysPropSSLCredentialProvider.class));+ assertThat(providers.get(1), isA(EnvSSLCredentialProvider.class));sut = getSut("env;sysprop");providers = sut.getProviders();- assertThat(providers.get(0), is(EnvSSLCredentialProvider.class));- assertThat(providers.get(1), is(SysPropSSLCredentialProvider.class));+ assertThat(providers.get(0), isA(EnvSSLCredentialProvider.class));+ assertThat(providers.get(1), isA(SysPropSSLCredentialProvider.class));}@Testpublic void testGetProvidersWithCustomProvider() {SSLCredentialProviderFactory sut = getSut("sysprop;class://" + CustomSSLCredentialProvider.class.getName() + ";env");List<SSLCredentialProvider> providers = sut.getProviders();- assertThat(providers.get(0), is(SysPropSSLCredentialProvider.class));- assertThat(providers.get(1), is(CustomSSLCredentialProvider.class));- assertThat(providers.get(2), is(EnvSSLCredentialProvider.class));+ assertThat(providers.get(0), isA(SysPropSSLCredentialProvider.class));+ assertThat(providers.get(1), isA(CustomSSLCredentialProvider.class));+ assertThat(providers.get(2), isA(EnvSSLCredentialProvider.class));}@Test(expected = RuntimeException.class)@@ -71,9 +78,9 @@ public class SSLCredentialProviderFactoryTest {System.setProperty(SSLCredentialProviderFactory.PROVIDER_CHAIN_KEY, chain);SSLCredentialProviderFactory sut = new SSLCredentialProviderFactory();List<SSLCredentialProvider> providers = sut.getProviders();- assertThat(providers.get(0), is(SysPropSSLCredentialProvider.class));- assertThat(providers.get(1), is(CustomSSLCredentialProvider.class));- assertThat(providers.get(2), is(EnvSSLCredentialProvider.class));+ assertThat(providers.get(0), isA(SysPropSSLCredentialProvider.class));+ assertThat(providers.get(1), isA(CustomSSLCredentialProvider.class));+ assertThat(providers.get(2), isA(EnvSSLCredentialProvider.class));}private SSLCredentialProviderFactory getSut(String providerChain) {diff --git a/solr/licenses/hamcrest-core-1.3.jar.sha1 b/solr/licenses/hamcrest-core-1.3.jar.sha1new file mode 100644index 00000000000..67add77ada7--- /dev/null+++ b/solr/licenses/hamcrest-core-1.3.jar.sha1@@ -0,0 +1 @@+42a25dc3219429f0e5d060061f71acb49bf010a0diff --git a/solr/licenses/hamcrest-core-LICENSE-BSD.txt b/solr/licenses/hamcrest-core-LICENSE-BSD.txtnew file mode 100644index 00000000000..7f201a5686c--- /dev/null+++ b/solr/licenses/hamcrest-core-LICENSE-BSD.txt@@ -0,0 +1,27 @@+BSD License++Copyright (c) 2000-2006, www.hamcrest.org+All rights reserved.++Redistribution and use in source and binary forms, with or without+modification, are permitted provided that the following conditions are met:++Redistributions of source code must retain the above copyright notice, this list of+conditions and the following disclaimer. Redistributions in binary form must reproduce+the above copyright notice, this list of conditions and the following disclaimer in+the documentation and/or other materials provided with the distribution.++Neither the name of Hamcrest nor the names of its contributors may be used to endorse+or promote products derived from this software without specific prior written+permission.++THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY+EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES+OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT+SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT,+INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED+TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR+BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN+CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY+WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH+DAMAGE.\ No newline at end of filediff --git a/solr/licenses/hamcrest-core-NOTICE.txt b/solr/licenses/hamcrest-core-NOTICE.txtnew file mode 100644index 00000000000..e69de29bb2ddiff --git a/solr/licenses/junit-4.10.jar.sha1 b/solr/licenses/junit-4.10.jar.sha1deleted file mode 100644index 875e26cee22..00000000000--- a/solr/licenses/junit-4.10.jar.sha1+++ /dev/null@@ -1 +0,0 @@-e4f1766ce7404a08f45d859fb9c226fc9e41a861diff --git a/solr/licenses/junit-4.12.jar.sha1 b/solr/licenses/junit-4.12.jar.sha1new file mode 100644index 00000000000..d0dbc0c46c7--- /dev/null+++ b/solr/licenses/junit-4.12.jar.sha1@@ -0,0 +1 @@+2973d150c0dc1fefe998f834810d68f278ea58ecdiff --git a/solr/licenses/junit4-ant-2.6.4.jar.sha1 b/solr/licenses/junit4-ant-2.6.4.jar.sha1deleted file mode 100644index 203d88872a0..00000000000--- a/solr/licenses/junit4-ant-2.6.4.jar.sha1+++ /dev/null@@ -1 +0,0 @@-b0a50c6dce5060f8f9040e072b77f7cd85242b3cdiff --git a/solr/licenses/junit4-ant-2.7.2.jar.sha1 b/solr/licenses/junit4-ant-2.7.2.jar.sha1new file mode 100644index 00000000000..f51d140c941--- /dev/null+++ b/solr/licenses/junit4-ant-2.7.2.jar.sha1@@ -0,0 +1 @@+b9e4fce45b3ee7bb14c5b72804dc1e483e61340ddiff --git a/solr/licenses/randomizedtesting-runner-2.6.4.jar.sha1 b/solr/licenses/randomizedtesting-runner-2.6.4.jar.sha1deleted file mode 100644index 83634d903d6..00000000000--- a/solr/licenses/randomizedtesting-runner-2.6.4.jar.sha1+++ /dev/null@@ -1 +0,0 @@-37bc4cf1f458d4718892d33ab77378e38d4877d8diff --git a/solr/licenses/randomizedtesting-runner-2.7.2.jar.sha1 b/solr/licenses/randomizedtesting-runner-2.7.2.jar.sha1new file mode 100644index 00000000000..9eeaf24b7ba--- /dev/null+++ b/solr/licenses/randomizedtesting-runner-2.7.2.jar.sha1@@ -0,0 +1 @@+84ed6b5f70906f9ef173db67ccde657b43ea60dfdiff --git a/solr/solrj/src/test/org/apache/solr/client/solrj/SolrExampleTests.java b/solr/solrj/src/test/org/apache/solr/client/solrj/SolrExampleTests.javaindex 807757ce77c..cbafc6eb0b7 100644--- a/solr/solrj/src/test/org/apache/solr/client/solrj/SolrExampleTests.java+++ b/solr/solrj/src/test/org/apache/solr/client/solrj/SolrExampleTests.java@@ -76,7 +76,7 @@ import org.slf4j.Logger;import org.slf4j.LoggerFactory;import static org.apache.solr.common.params.UpdateParams.ASSUME_CONTENT_TYPE;-import static org.junit.internal.matchers.StringContains.containsString;+import static org.hamcrest.core.StringContains.containsString;import static org.hamcrest.CoreMatchers.is;/**diff --git a/solr/solrj/src/test/org/apache/solr/client/solrj/impl/CloudSolrClientBadInputTest.java b/solr/solrj/src/test/org/apache/solr/client/solrj/impl/CloudSolrClientBadInputTest.javaindex 5ec5bc62501..61f8ceb885f 100644--- a/solr/solrj/src/test/org/apache/solr/client/solrj/impl/CloudSolrClientBadInputTest.java+++ b/solr/solrj/src/test/org/apache/solr/client/solrj/impl/CloudSolrClientBadInputTest.java@@ -27,7 +27,7 @@ import org.apache.solr.cloud.SolrCloudTestCase;import org.junit.BeforeClass;import org.junit.Test;-import static org.junit.internal.matchers.StringContains.containsString;+import static org.hamcrest.core.StringContains.containsString;public class CloudSolrClientBadInputTest extends SolrCloudTestCase {private static final List<String> NULL_STR_LIST = null;diff --git a/solr/solrj/src/test/org/apache/solr/client/solrj/impl/ConcurrentUpdateSolrClientBadInputTest.java b/solr/solrj/src/test/org/apache/solr/client/solrj/impl/ConcurrentUpdateSolrClientBadInputTest.javaindex 62a60b04f25..f95680785a9 100644--- a/solr/solrj/src/test/org/apache/solr/client/solrj/impl/ConcurrentUpdateSolrClientBadInputTest.java+++ b/solr/solrj/src/test/org/apache/solr/client/solrj/impl/ConcurrentUpdateSolrClientBadInputTest.java@@ -28,7 +28,7 @@ import org.apache.solr.client.solrj.embedded.JettyConfig;import org.junit.BeforeClass;import org.junit.Test;-import static org.junit.internal.matchers.StringContains.containsString;+import static org.hamcrest.core.StringContains.containsString;public class ConcurrentUpdateSolrClientBadInputTest extends SolrJettyTestBase {private static final List<String> NULL_STR_LIST = null;diff --git a/solr/solrj/src/test/org/apache/solr/client/solrj/impl/HttpSolrClientBadInputTest.java b/solr/solrj/src/test/org/apache/solr/client/solrj/impl/HttpSolrClientBadInputTest.javaindex 6157c32a0f5..ed83ac55acb 100644--- a/solr/solrj/src/test/org/apache/solr/client/solrj/impl/HttpSolrClientBadInputTest.java+++ b/solr/solrj/src/test/org/apache/solr/client/solrj/impl/HttpSolrClientBadInputTest.java@@ -26,7 +26,7 @@ import org.apache.solr.client.solrj.SolrClient;import org.apache.solr.client.solrj.embedded.JettyConfig;import org.junit.BeforeClass;import org.junit.Test;-import static org.junit.internal.matchers.StringContains.containsString;+import static org.hamcrest.core.StringContains.containsString;/*** Tests {@link HttpSolrClient}'s response to a variety of bad inputs.diff --git a/solr/solrj/src/test/org/apache/solr/client/solrj/impl/LBHttpSolrClientBadInputTest.java b/solr/solrj/src/test/org/apache/solr/client/solrj/impl/LBHttpSolrClientBadInputTest.javaindex dd7b14e3558..c9fa2b4b5f9 100644--- a/solr/solrj/src/test/org/apache/solr/client/solrj/impl/LBHttpSolrClientBadInputTest.java+++ b/solr/solrj/src/test/org/apache/solr/client/solrj/impl/LBHttpSolrClientBadInputTest.java@@ -28,7 +28,7 @@ import org.apache.solr.client.solrj.embedded.JettyConfig;import org.junit.BeforeClass;import org.junit.Test;-import static org.junit.internal.matchers.StringContains.containsString;+import static org.hamcrest.core.StringContains.containsString;public class LBHttpSolrClientBadInputTest extends SolrJettyTestBase {private static final List<String> NULL_STR_LIST = null;diff --git a/solr/solrj/src/test/org/apache/solr/client/solrj/request/json/DomainMapTest.java b/solr/solrj/src/test/org/apache/solr/client/solrj/request/json/DomainMapTest.javaindex d437d14ada8..5b46514e98e 100644--- a/solr/solrj/src/test/org/apache/solr/client/solrj/request/json/DomainMapTest.java+++ b/solr/solrj/src/test/org/apache/solr/client/solrj/request/json/DomainMapTest.java@@ -23,7 +23,7 @@ import java.util.Map;import org.apache.solr.SolrTestCaseJ4;import org.junit.Test;-import static org.junit.internal.matchers.StringContains.containsString;+import static org.hamcrest.core.StringContains.containsString;public class DomainMapTest extends SolrTestCaseJ4 {diff --git a/solr/solrj/src/test/org/apache/solr/client/solrj/request/json/HeatmapFacetMapTest.java b/solr/solrj/src/test/org/apache/solr/client/solrj/request/json/HeatmapFacetMapTest.javaindex 906371442b0..02a88dd5de7 100644--- a/solr/solrj/src/test/org/apache/solr/client/solrj/request/json/HeatmapFacetMapTest.java+++ b/solr/solrj/src/test/org/apache/solr/client/solrj/request/json/HeatmapFacetMapTest.java@@ -20,7 +20,7 @@ package org.apache.solr.client.solrj.request.json;import org.apache.solr.SolrTestCaseJ4;import org.junit.Test;-import static org.junit.internal.matchers.StringContains.containsString;+import static org.hamcrest.core.StringContains.containsString;public class HeatmapFacetMapTest extends SolrTestCaseJ4 {diff --git a/solr/solrj/src/test/org/apache/solr/client/solrj/request/json/JsonQueryRequestUnitTest.java b/solr/solrj/src/test/org/apache/solr/client/solrj/request/json/JsonQueryRequestUnitTest.javaindex 6e8c647068d..51a0aa5bd84 100644--- a/solr/solrj/src/test/org/apache/solr/client/solrj/request/json/JsonQueryRequestUnitTest.java+++ b/solr/solrj/src/test/org/apache/solr/client/solrj/request/json/JsonQueryRequestUnitTest.java@@ -28,7 +28,7 @@ import org.apache.solr.client.solrj.request.RequestWriter;import org.apache.solr.client.solrj.util.ClientUtils;import org.apache.solr.common.MapWriter;import org.junit.Test;-import static org.junit.internal.matchers.StringContains.containsString;+import static org.hamcrest.core.StringContains.containsString;/*** Unit tests for {@link JsonQueryRequest}diff --git a/solr/solrj/src/test/org/apache/solr/client/solrj/request/json/QueryFacetMapTest.java b/solr/solrj/src/test/org/apache/solr/client/solrj/request/json/QueryFacetMapTest.javaindex 8d07a4fe102..03ba9b53fb9 100644--- a/solr/solrj/src/test/org/apache/solr/client/solrj/request/json/QueryFacetMapTest.java+++ b/solr/solrj/src/test/org/apache/solr/client/solrj/request/json/QueryFacetMapTest.java@@ -20,7 +20,7 @@ package org.apache.solr.client.solrj.request.json;import org.apache.solr.SolrTestCaseJ4;import org.junit.Test;-import static org.junit.internal.matchers.StringContains.containsString;+import static org.hamcrest.core.StringContains.containsString;public class QueryFacetMapTest extends SolrTestCaseJ4 {@Testdiff --git a/solr/solrj/src/test/org/apache/solr/client/solrj/request/json/RangeFacetMapTest.java b/solr/solrj/src/test/org/apache/solr/client/solrj/request/json/RangeFacetMapTest.javaindex 43bb5f519f9..395a3ab7ee2 100644--- a/solr/solrj/src/test/org/apache/solr/client/solrj/request/json/RangeFacetMapTest.java+++ b/solr/solrj/src/test/org/apache/solr/client/solrj/request/json/RangeFacetMapTest.java@@ -20,7 +20,7 @@ package org.apache.solr.client.solrj.request.json;import org.apache.solr.SolrTestCaseJ4;import org.junit.Test;-import static org.junit.internal.matchers.StringContains.containsString;+import static org.hamcrest.core.StringContains.containsString;/*** Unit tests for {@link RangeFacetMap}diff --git a/solr/solrj/src/test/org/apache/solr/client/solrj/request/json/TermsFacetMapTest.java b/solr/solrj/src/test/org/apache/solr/client/solrj/request/json/TermsFacetMapTest.javaindex 58f807d27ae..0d06e590e6f 100644--- a/solr/solrj/src/test/org/apache/solr/client/solrj/request/json/TermsFacetMapTest.java+++ b/solr/solrj/src/test/org/apache/solr/client/solrj/request/json/TermsFacetMapTest.java@@ -19,7 +19,7 @@ package org.apache.solr.client.solrj.request.json;import org.apache.solr.SolrTestCaseJ4;import org.junit.Test;-import static org.junit.internal.matchers.StringContains.containsString;+import static org.hamcrest.core.StringContains.containsString;public class TermsFacetMapTest extends SolrTestCaseJ4 {diff --git a/solr/test-framework/ivy.xml b/solr/test-framework/ivy.xmlindex e203b466401..018da5d9992 100644--- a/solr/test-framework/ivy.xml+++ b/solr/test-framework/ivy.xml@@ -31,9 +31,8 @@<dependencies><dependency org="org.apache.ant" name="ant" rev="${/org.apache.ant/ant}" conf="compile" />- <dependency org="junit" name="junit" rev="${/junit/junit}" conf="compile;junit4-stdalone">- <exclude org="org.hamcrest" module="hamcrest-core" />- </dependency>+ <dependency org="junit" name="junit" rev="${/junit/junit}" conf="compile;junit4-stdalone" />+ <dependency org="org.hamcrest" name="hamcrest-core" rev="${/org.hamcrest/hamcrest-core}" conf="compile;junit4-stdalone" /><dependency org="com.carrotsearch.randomizedtesting" name="junit4-ant" rev="${/com.carrotsearch.randomizedtesting/junit4-ant}" conf="compile;junit4-stdalone" /><dependency org="com.carrotsearch.randomizedtesting" name="randomizedtesting-runner" rev="${/com.carrotsearch.randomizedtesting/randomizedtesting-runner}" conf="compile;junit4-stdalone" />