mirror of https://github.com/apache/lucene.git
LUCENE-8611: Update randomizedtesting to 2.7.2, JUnit to 4.12, add hamcrest-core dependency.
This commit is contained in:
parent
5c5c42cc37
commit
e916f1fb86
|
@ -230,6 +230,9 @@ Optimizations
|
|||
|
||||
Build
|
||||
|
||||
* 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:
|
||||
|
|
|
@ -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 {
|
||||
|
|
|
@ -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.6
|
||||
|
||||
|
|
|
@ -0,0 +1 @@
|
|||
42a25dc3219429f0e5d060061f71acb49bf010a0
|
|
@ -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.
|
|
@ -1 +0,0 @@
|
|||
e4f1766ce7404a08f45d859fb9c226fc9e41a861
|
|
@ -0,0 +1 @@
|
|||
2973d150c0dc1fefe998f834810d68f278ea58ec
|
|
@ -1 +0,0 @@
|
|||
37bc4cf1f458d4718892d33ab77378e38d4877d8
|
|
@ -0,0 +1 @@
|
|||
84ed6b5f70906f9ef173db67ccde657b43ea60df
|
|
@ -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 {
|
||||
|
||||
|
|
|
@ -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}"/>
|
||||
|
|
|
@ -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;
|
||||
|
|
|
@ -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 messages
|
||||
|
|
|
@ -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 {
|
||||
|
||||
|
|
|
@ -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 {
|
||||
|
||||
|
|
|
@ -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 {
|
||||
|
||||
|
|
|
@ -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 {
|
||||
|
|
|
@ -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;
|
||||
|
||||
|
||||
/**
|
||||
|
|
|
@ -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 {
|
||||
|
||||
|
|
|
@ -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);
|
||||
}
|
||||
|
||||
@Test
|
||||
public 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));
|
||||
}
|
||||
|
||||
@Test
|
||||
public 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) {
|
||||
|
|
|
@ -0,0 +1 @@
|
|||
42a25dc3219429f0e5d060061f71acb49bf010a0
|
|
@ -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.
|
|
@ -1 +0,0 @@
|
|||
e4f1766ce7404a08f45d859fb9c226fc9e41a861
|
|
@ -0,0 +1 @@
|
|||
2973d150c0dc1fefe998f834810d68f278ea58ec
|
|
@ -1 +0,0 @@
|
|||
b0a50c6dce5060f8f9040e072b77f7cd85242b3c
|
|
@ -0,0 +1 @@
|
|||
b9e4fce45b3ee7bb14c5b72804dc1e483e61340d
|
|
@ -1 +0,0 @@
|
|||
37bc4cf1f458d4718892d33ab77378e38d4877d8
|
|
@ -0,0 +1 @@
|
|||
84ed6b5f70906f9ef173db67ccde657b43ea60df
|
|
@ -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;
|
||||
|
||||
/**
|
||||
|
|
|
@ -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;
|
||||
|
|
|
@ -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;
|
||||
|
|
|
@ -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.
|
||||
|
|
|
@ -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;
|
||||
|
|
|
@ -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 {
|
||||
|
||||
|
|
|
@ -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 {
|
||||
|
|
|
@ -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}
|
||||
|
|
|
@ -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 {
|
||||
@Test
|
||||
|
|
|
@ -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}
|
||||
|
|
|
@ -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 {
|
||||
|
|
|
@ -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" />
|
||||
|
||||
|
|
Loading…
Reference in New Issue