diff --git a/lucene/tools/src/groovy/check-source-patterns.groovy b/lucene/tools/src/groovy/check-source-patterns.groovy index d370d9ede93..e2dfb302db6 100644 --- a/lucene/tools/src/groovy/check-source-patterns.groovy +++ b/lucene/tools/src/groovy/check-source-patterns.groovy @@ -74,6 +74,7 @@ def sourceHeaderPattern = ~$/\[source\b.*/$; def blockBoundaryPattern = ~$/----\s*/$; def blockTitlePattern = ~$/\..*/$; def unescapedSymbolPattern = ~$/(?<=[^\\]|^)([-=]>|<[-=])/$; // SOLR-10883 +def extendsLuceneTestCasePattern = ~$/public.*?class.*?extends.*?LuceneTestCase[^\n]*?\n/$; def isLicense = { matcher, ratDocument -> licenseMatcher.reset(); @@ -180,6 +181,11 @@ ant.fileScanner{ if (f.name.contains("Test")) { checkMockitoAssume(f, text); } + if (f.path.contains("solr/") && f.name.equals("SolrTestCase.java") == false) { + if (extendsLuceneTestCasePattern.matcher(text).find()) { + reportViolation(f, "Solr test cases should extend SolrTestCase rather than LuceneTestCase"); + } + } } if (f.name.endsWith('.xml') || f.name.endsWith('.xml.template')) { checkLicenseHeaderPrecedes(f, '', xmlTagPattern, xmlCommentPattern, text, ratDocument); diff --git a/solr/CHANGES.txt b/solr/CHANGES.txt index 963fd50d1ff..db9b95455be 100644 --- a/solr/CHANGES.txt +++ b/solr/CHANGES.txt @@ -140,6 +140,8 @@ Other Changes * SOLR-7321: Remove reflection in FSHDFSUtils.java (Mike Drob, Kevin Risden) +* SOLR-13268: Clean up any test failures resulting from defaulting to async logging (Erick Erickson) + ================== 8.0.0 ================== Consult the LUCENE_CHANGES.txt file for additional, low level, changes in this release. diff --git a/solr/contrib/ltr/src/test/org/apache/solr/ltr/TestLTRReRankingPipeline.java b/solr/contrib/ltr/src/test/org/apache/solr/ltr/TestLTRReRankingPipeline.java index 469eee19edd..24c77cafc77 100644 --- a/solr/contrib/ltr/src/test/org/apache/solr/ltr/TestLTRReRankingPipeline.java +++ b/solr/contrib/ltr/src/test/org/apache/solr/ltr/TestLTRReRankingPipeline.java @@ -41,7 +41,7 @@ import org.apache.lucene.search.ScoreMode; import org.apache.lucene.search.TermQuery; import org.apache.lucene.search.TopDocs; import org.apache.lucene.store.Directory; -import org.apache.lucene.util.LuceneTestCase; +import org.apache.solr.SolrTestCase; import org.apache.solr.core.SolrResourceLoader; import org.apache.solr.ltr.feature.Feature; import org.apache.solr.ltr.feature.FieldValueFeature; @@ -53,7 +53,7 @@ import org.junit.Test; import org.slf4j.Logger; import org.slf4j.LoggerFactory; -public class TestLTRReRankingPipeline extends LuceneTestCase { +public class TestLTRReRankingPipeline extends SolrTestCase { private static final Logger log = LoggerFactory.getLogger(MethodHandles.lookup().lookupClass()); diff --git a/solr/contrib/ltr/src/test/org/apache/solr/ltr/TestLTRScoringQuery.java b/solr/contrib/ltr/src/test/org/apache/solr/ltr/TestLTRScoringQuery.java index e9e44114357..973436f12ae 100644 --- a/solr/contrib/ltr/src/test/org/apache/solr/ltr/TestLTRScoringQuery.java +++ b/solr/contrib/ltr/src/test/org/apache/solr/ltr/TestLTRScoringQuery.java @@ -41,7 +41,7 @@ import org.apache.lucene.search.TermQuery; import org.apache.lucene.search.TopDocs; import org.apache.lucene.search.Weight; import org.apache.lucene.store.Directory; -import org.apache.lucene.util.LuceneTestCase; +import org.apache.solr.SolrTestCase; import org.apache.solr.core.SolrResourceLoader; import org.apache.solr.ltr.feature.Feature; import org.apache.solr.ltr.feature.ValueFeature; @@ -53,7 +53,7 @@ import org.apache.solr.ltr.norm.Normalizer; import org.apache.solr.ltr.norm.NormalizerException; import org.junit.Test; -public class TestLTRScoringQuery extends LuceneTestCase { +public class TestLTRScoringQuery extends SolrTestCase { public final static SolrResourceLoader solrResourceLoader = new SolrResourceLoader(); diff --git a/solr/contrib/ltr/src/test/org/apache/solr/ltr/feature/TestOriginalScoreScorer.java b/solr/contrib/ltr/src/test/org/apache/solr/ltr/feature/TestOriginalScoreScorer.java index e85ebedf084..1d73918edbe 100644 --- a/solr/contrib/ltr/src/test/org/apache/solr/ltr/feature/TestOriginalScoreScorer.java +++ b/solr/contrib/ltr/src/test/org/apache/solr/ltr/feature/TestOriginalScoreScorer.java @@ -20,10 +20,10 @@ import java.lang.reflect.Method; import java.lang.reflect.Modifier; import org.apache.lucene.search.Scorer; -import org.apache.lucene.util.LuceneTestCase; +import org.apache.solr.SolrTestCase; import org.junit.Test; -public class TestOriginalScoreScorer extends LuceneTestCase { +public class TestOriginalScoreScorer extends SolrTestCase { @Test public void testOverridesAbstractScorerMethods() { diff --git a/solr/core/src/test/org/apache/solr/TestDocumentBuilder.java b/solr/core/src/test/org/apache/solr/TestDocumentBuilder.java index a3ca089be16..8da8fe747ae 100644 --- a/solr/core/src/test/org/apache/solr/TestDocumentBuilder.java +++ b/solr/core/src/test/org/apache/solr/TestDocumentBuilder.java @@ -22,12 +22,11 @@ import java.util.Collection; import java.util.Iterator; import java.util.List; -import org.apache.lucene.util.LuceneTestCase; import org.apache.solr.common.SolrInputDocument; import org.junit.Test; -public class TestDocumentBuilder extends LuceneTestCase { +public class TestDocumentBuilder extends SolrTestCase { @Test public void testDeepCopy() throws IOException { diff --git a/solr/core/src/test/org/apache/solr/core/DirectoryFactoryTest.java b/solr/core/src/test/org/apache/solr/core/DirectoryFactoryTest.java index dfe50bd26c6..dada6321984 100755 --- a/solr/core/src/test/org/apache/solr/core/DirectoryFactoryTest.java +++ b/solr/core/src/test/org/apache/solr/core/DirectoryFactoryTest.java @@ -22,7 +22,7 @@ import java.nio.file.Path; import java.nio.file.Paths; import java.util.Properties; -import org.apache.lucene.util.LuceneTestCase; +import org.apache.solr.SolrTestCase; import org.apache.solr.common.util.NamedList; import org.junit.After; import org.junit.AfterClass; @@ -30,7 +30,7 @@ import org.junit.Before; import org.junit.BeforeClass; import org.junit.Test; -public class DirectoryFactoryTest extends LuceneTestCase { +public class DirectoryFactoryTest extends SolrTestCase { private static Path solrHome = null; private static SolrResourceLoader loader = null; diff --git a/solr/core/src/test/org/apache/solr/core/RAMDirectoryFactoryTest.java b/solr/core/src/test/org/apache/solr/core/RAMDirectoryFactoryTest.java index 713f60698cb..3ee673272f9 100644 --- a/solr/core/src/test/org/apache/solr/core/RAMDirectoryFactoryTest.java +++ b/solr/core/src/test/org/apache/solr/core/RAMDirectoryFactoryTest.java @@ -21,13 +21,13 @@ import java.io.IOException; import org.apache.lucene.store.ByteBuffersDirectory; import org.apache.lucene.store.Directory; import org.apache.lucene.store.LockFactory; -import org.apache.lucene.util.LuceneTestCase; +import org.apache.solr.SolrTestCase; import org.apache.solr.core.DirectoryFactory.DirContext; /** * Test-case for RAMDirectoryFactory */ -public class RAMDirectoryFactoryTest extends LuceneTestCase { +public class RAMDirectoryFactoryTest extends SolrTestCase { public void test() throws Exception { dotestOpenReturnsTheSameForSamePath(); diff --git a/solr/core/src/test/org/apache/solr/core/TestConfigOverlay.java b/solr/core/src/test/org/apache/solr/core/TestConfigOverlay.java index b41f33262d7..e98f5100fbf 100644 --- a/solr/core/src/test/org/apache/solr/core/TestConfigOverlay.java +++ b/solr/core/src/test/org/apache/solr/core/TestConfigOverlay.java @@ -19,11 +19,11 @@ package org.apache.solr.core; import java.util.Collections; import java.util.Map; -import org.apache.lucene.util.LuceneTestCase; +import org.apache.solr.SolrTestCase; import static org.apache.solr.core.ConfigOverlay.isEditableProp; -public class TestConfigOverlay extends LuceneTestCase { +public class TestConfigOverlay extends SolrTestCase { public void testPaths() { assertTrue(isEditableProp("updateHandler/autoCommit/maxDocs", true, null)); diff --git a/solr/core/src/test/org/apache/solr/handler/BackupRestoreUtils.java b/solr/core/src/test/org/apache/solr/handler/BackupRestoreUtils.java index 34509cf8b3e..74add18f726 100644 --- a/solr/core/src/test/org/apache/solr/handler/BackupRestoreUtils.java +++ b/solr/core/src/test/org/apache/solr/handler/BackupRestoreUtils.java @@ -27,8 +27,8 @@ import java.util.Map; import java.util.Random; import org.apache.commons.io.IOUtils; -import org.apache.lucene.util.LuceneTestCase; import org.apache.lucene.util.TestUtil; +import org.apache.solr.SolrTestCase; import org.apache.solr.client.solrj.SolrClient; import org.apache.solr.client.solrj.SolrServerException; import org.apache.solr.client.solrj.response.QueryResponse; @@ -37,7 +37,7 @@ import org.apache.solr.common.params.ModifiableSolrParams; import org.slf4j.Logger; import org.slf4j.LoggerFactory; -public class BackupRestoreUtils extends LuceneTestCase { +public class BackupRestoreUtils extends SolrTestCase { private static final Logger log = LoggerFactory.getLogger(MethodHandles.lookup().lookupClass()); diff --git a/solr/core/src/test/org/apache/solr/handler/admin/SystemInfoHandlerTest.java b/solr/core/src/test/org/apache/solr/handler/admin/SystemInfoHandlerTest.java index 2e20dc8bdba..f0126990757 100644 --- a/solr/core/src/test/org/apache/solr/handler/admin/SystemInfoHandlerTest.java +++ b/solr/core/src/test/org/apache/solr/handler/admin/SystemInfoHandlerTest.java @@ -21,12 +21,12 @@ import java.lang.management.OperatingSystemMXBean; import java.util.Arrays; import com.codahale.metrics.Gauge; -import org.apache.lucene.util.LuceneTestCase; +import org.apache.solr.SolrTestCase; import org.apache.solr.common.util.SimpleOrderedMap; import org.apache.solr.util.stats.MetricUtils; -public class SystemInfoHandlerTest extends LuceneTestCase { +public class SystemInfoHandlerTest extends SolrTestCase { public void testMagickGetter() throws Exception { diff --git a/solr/core/src/test/org/apache/solr/handler/component/ReplicaListTransformerTest.java b/solr/core/src/test/org/apache/solr/handler/component/ReplicaListTransformerTest.java index 81599712100..da140712519 100644 --- a/solr/core/src/test/org/apache/solr/handler/component/ReplicaListTransformerTest.java +++ b/solr/core/src/test/org/apache/solr/handler/component/ReplicaListTransformerTest.java @@ -23,7 +23,8 @@ import java.util.Iterator; import java.util.List; import java.util.Map; -import org.apache.lucene.util.LuceneTestCase; + +import org.apache.solr.SolrTestCase; import org.apache.solr.common.cloud.Replica; import org.apache.solr.common.params.ModifiableSolrParams; import org.apache.solr.common.params.SolrParams; @@ -31,7 +32,7 @@ import org.apache.solr.request.LocalSolrQueryRequest; import org.apache.solr.request.SolrQueryRequest; import org.junit.Test; -public class ReplicaListTransformerTest extends LuceneTestCase { +public class ReplicaListTransformerTest extends SolrTestCase { // A transformer that keeps only matching choices private static class ToyMatchingReplicaListTransformer implements ReplicaListTransformer { diff --git a/solr/core/src/test/org/apache/solr/handler/component/ShufflingReplicaListTransformerTest.java b/solr/core/src/test/org/apache/solr/handler/component/ShufflingReplicaListTransformerTest.java index 26bb00879dd..7fc9514debf 100644 --- a/solr/core/src/test/org/apache/solr/handler/component/ShufflingReplicaListTransformerTest.java +++ b/solr/core/src/test/org/apache/solr/handler/component/ShufflingReplicaListTransformerTest.java @@ -23,11 +23,11 @@ import java.util.HashSet; import java.util.List; import java.util.Set; -import org.apache.lucene.util.LuceneTestCase; +import org.apache.solr.SolrTestCase; import org.apache.solr.common.cloud.Replica; import org.junit.Test; -public class ShufflingReplicaListTransformerTest extends LuceneTestCase { +public class ShufflingReplicaListTransformerTest extends SolrTestCase { private final ShufflingReplicaListTransformer transformer = new ShufflingReplicaListTransformer(random()); diff --git a/solr/core/src/test/org/apache/solr/index/TestSlowCompositeReaderWrapper.java b/solr/core/src/test/org/apache/solr/index/TestSlowCompositeReaderWrapper.java index 3e693f2d3c2..0f474c92b8c 100644 --- a/solr/core/src/test/org/apache/solr/index/TestSlowCompositeReaderWrapper.java +++ b/solr/core/src/test/org/apache/solr/index/TestSlowCompositeReaderWrapper.java @@ -36,10 +36,10 @@ import org.apache.lucene.index.NoMergePolicy; import org.apache.lucene.index.RandomIndexWriter; import org.apache.lucene.store.Directory; import org.apache.lucene.util.BytesRef; -import org.apache.lucene.util.LuceneTestCase; import org.apache.lucene.util.TestUtil; +import org.apache.solr.SolrTestCase; -public class TestSlowCompositeReaderWrapper extends LuceneTestCase { +public class TestSlowCompositeReaderWrapper extends SolrTestCase { public void testCoreListenerOnSlowCompositeReaderWrapper() throws IOException { RandomIndexWriter w = new RandomIndexWriter(random(), newDirectory()); diff --git a/solr/core/src/test/org/apache/solr/legacy/TestLegacyField.java b/solr/core/src/test/org/apache/solr/legacy/TestLegacyField.java index 5cfac9ab89c..fec08ee935a 100644 --- a/solr/core/src/test/org/apache/solr/legacy/TestLegacyField.java +++ b/solr/core/src/test/org/apache/solr/legacy/TestLegacyField.java @@ -22,9 +22,9 @@ import org.apache.lucene.analysis.CannedTokenStream; import org.apache.lucene.analysis.Token; import org.apache.lucene.document.Field; import org.apache.lucene.util.BytesRef; -import org.apache.lucene.util.LuceneTestCase; +import org.apache.solr.SolrTestCase; -public class TestLegacyField extends LuceneTestCase { +public class TestLegacyField extends SolrTestCase { public void testLegacyDoubleField() throws Exception { Field fields[] = new Field[] { diff --git a/solr/core/src/test/org/apache/solr/legacy/TestLegacyNumericUtils.java b/solr/core/src/test/org/apache/solr/legacy/TestLegacyNumericUtils.java index a94b18e1c7f..aa350e9bbac 100644 --- a/solr/core/src/test/org/apache/solr/legacy/TestLegacyNumericUtils.java +++ b/solr/core/src/test/org/apache/solr/legacy/TestLegacyNumericUtils.java @@ -25,10 +25,10 @@ import java.util.Random; import org.apache.lucene.util.BytesRefBuilder; import org.apache.lucene.util.FixedBitSet; import org.apache.lucene.util.LongBitSet; -import org.apache.lucene.util.LuceneTestCase; import org.apache.lucene.util.NumericUtils; +import org.apache.solr.SolrTestCase; -public class TestLegacyNumericUtils extends LuceneTestCase { +public class TestLegacyNumericUtils extends SolrTestCase { public void testLongConversionAndOrdering() throws Exception { // generate a series of encoded longs, each numerical one bigger than the one before diff --git a/solr/core/src/test/org/apache/solr/legacy/TestLegacyTerms.java b/solr/core/src/test/org/apache/solr/legacy/TestLegacyTerms.java index 1d56272710a..2e2f38d7632 100644 --- a/solr/core/src/test/org/apache/solr/legacy/TestLegacyTerms.java +++ b/solr/core/src/test/org/apache/solr/legacy/TestLegacyTerms.java @@ -24,10 +24,10 @@ import org.apache.lucene.index.RandomIndexWriter; import org.apache.lucene.index.Terms; import org.apache.lucene.index.TermsEnum; import org.apache.lucene.store.Directory; -import org.apache.lucene.util.LuceneTestCase; import org.apache.lucene.util.NumericUtils; +import org.apache.solr.SolrTestCase; -public class TestLegacyTerms extends LuceneTestCase { +public class TestLegacyTerms extends SolrTestCase { public void testEmptyIntFieldMinMax() throws Exception { assertNull(LegacyNumericUtils.getMinInt(EMPTY_TERMS)); diff --git a/solr/core/src/test/org/apache/solr/legacy/TestMultiValuedNumericRangeQuery.java b/solr/core/src/test/org/apache/solr/legacy/TestMultiValuedNumericRangeQuery.java index 48da62c6afe..e7174a1b16c 100644 --- a/solr/core/src/test/org/apache/solr/legacy/TestMultiValuedNumericRangeQuery.java +++ b/solr/core/src/test/org/apache/solr/legacy/TestMultiValuedNumericRangeQuery.java @@ -31,10 +31,10 @@ import org.apache.lucene.search.TermRangeQuery; import org.apache.lucene.search.TopDocs; import org.apache.lucene.search.TopScoreDocCollector; import org.apache.lucene.store.Directory; -import org.apache.lucene.util.LuceneTestCase; import org.apache.lucene.util.TestUtil; +import org.apache.solr.SolrTestCase; -public class TestMultiValuedNumericRangeQuery extends LuceneTestCase { +public class TestMultiValuedNumericRangeQuery extends SolrTestCase { /** Tests LegacyNumericRangeQuery on a multi-valued field (multiple numeric values per document). * This test ensures, that a classical TermRangeQuery returns exactly the same document numbers as diff --git a/solr/core/src/test/org/apache/solr/legacy/TestNumericRangeQuery32.java b/solr/core/src/test/org/apache/solr/legacy/TestNumericRangeQuery32.java index 3dbfff0fdf4..a9265d15a25 100644 --- a/solr/core/src/test/org/apache/solr/legacy/TestNumericRangeQuery32.java +++ b/solr/core/src/test/org/apache/solr/legacy/TestNumericRangeQuery32.java @@ -34,14 +34,14 @@ import org.apache.lucene.search.TopDocs; import org.apache.lucene.search.TopFieldCollector; import org.apache.lucene.search.TopScoreDocCollector; import org.apache.lucene.store.Directory; -import org.apache.lucene.util.LuceneTestCase; import org.apache.lucene.util.NumericUtils; import org.apache.lucene.util.TestUtil; +import org.apache.solr.SolrTestCase; import org.junit.AfterClass; import org.junit.BeforeClass; import org.junit.Test; -public class TestNumericRangeQuery32 extends LuceneTestCase { +public class TestNumericRangeQuery32 extends SolrTestCase { // distance of entries private static int distance; // shift the starting of the values to the left, to also have negative values: diff --git a/solr/core/src/test/org/apache/solr/legacy/TestNumericRangeQuery64.java b/solr/core/src/test/org/apache/solr/legacy/TestNumericRangeQuery64.java index 8a9005d9157..71e0e67e51c 100644 --- a/solr/core/src/test/org/apache/solr/legacy/TestNumericRangeQuery64.java +++ b/solr/core/src/test/org/apache/solr/legacy/TestNumericRangeQuery64.java @@ -34,14 +34,14 @@ import org.apache.lucene.search.TopDocs; import org.apache.lucene.search.TopFieldCollector; import org.apache.lucene.search.TopScoreDocCollector; import org.apache.lucene.store.Directory; -import org.apache.lucene.util.LuceneTestCase; import org.apache.lucene.util.NumericUtils; import org.apache.lucene.util.TestUtil; +import org.apache.solr.SolrTestCase; import org.junit.AfterClass; import org.junit.BeforeClass; import org.junit.Test; -public class TestNumericRangeQuery64 extends LuceneTestCase { +public class TestNumericRangeQuery64 extends SolrTestCase { // distance of entries private static long distance; // shift the starting of the values to the left, to also have negative values: diff --git a/solr/core/src/test/org/apache/solr/request/RegexBytesRefFilterTest.java b/solr/core/src/test/org/apache/solr/request/RegexBytesRefFilterTest.java index 22af631a0ac..888d05d029c 100644 --- a/solr/core/src/test/org/apache/solr/request/RegexBytesRefFilterTest.java +++ b/solr/core/src/test/org/apache/solr/request/RegexBytesRefFilterTest.java @@ -17,10 +17,10 @@ package org.apache.solr.request; import org.apache.lucene.util.BytesRef; -import org.apache.lucene.util.LuceneTestCase; +import org.apache.solr.SolrTestCase; import org.junit.Test; -public class RegexBytesRefFilterTest extends LuceneTestCase { +public class RegexBytesRefFilterTest extends SolrTestCase { @Test public void testSubstringBytesRefFilter() { diff --git a/solr/core/src/test/org/apache/solr/request/SubstringBytesRefFilterTest.java b/solr/core/src/test/org/apache/solr/request/SubstringBytesRefFilterTest.java index a5b304882f8..db24312e0bb 100644 --- a/solr/core/src/test/org/apache/solr/request/SubstringBytesRefFilterTest.java +++ b/solr/core/src/test/org/apache/solr/request/SubstringBytesRefFilterTest.java @@ -19,11 +19,11 @@ package org.apache.solr.request; import java.util.ArrayList; import java.util.List; -import org.apache.lucene.util.LuceneTestCase; import org.apache.lucene.util.BytesRef; +import org.apache.solr.SolrTestCase; import org.junit.Test; -public class SubstringBytesRefFilterTest extends LuceneTestCase { +public class SubstringBytesRefFilterTest extends SolrTestCase { @Test public void testSubstringBytesRefFilter() { diff --git a/solr/core/src/test/org/apache/solr/request/TestFacetMethods.java b/solr/core/src/test/org/apache/solr/request/TestFacetMethods.java index e70083df171..bc451f5d3d7 100644 --- a/solr/core/src/test/org/apache/solr/request/TestFacetMethods.java +++ b/solr/core/src/test/org/apache/solr/request/TestFacetMethods.java @@ -19,16 +19,16 @@ package org.apache.solr.request; import java.util.Arrays; +import org.apache.solr.SolrTestCase; import org.apache.solr.request.SimpleFacets.FacetMethod; import org.apache.solr.schema.BoolField; import org.apache.solr.schema.IntPointField; import org.apache.solr.schema.SchemaField; import org.apache.solr.schema.StrField; import org.apache.solr.schema.TrieIntField; -import org.apache.lucene.util.LuceneTestCase; import org.junit.Test; -public class TestFacetMethods extends LuceneTestCase { +public class TestFacetMethods extends SolrTestCase { // TODO - make these public in FieldProperties? protected final static int MULTIVALUED = 0x00000200; diff --git a/solr/core/src/test/org/apache/solr/request/macro/TestMacroExpander.java b/solr/core/src/test/org/apache/solr/request/macro/TestMacroExpander.java index e908037cdd8..8e3d273099f 100644 --- a/solr/core/src/test/org/apache/solr/request/macro/TestMacroExpander.java +++ b/solr/core/src/test/org/apache/solr/request/macro/TestMacroExpander.java @@ -19,13 +19,14 @@ package org.apache.solr.request.macro; import java.util.Map; import java.util.HashMap; -import org.apache.lucene.util.LuceneTestCase; + +import org.apache.solr.SolrTestCase; import org.junit.Test; /* * Tests for the MacroExpander */ -public class TestMacroExpander extends LuceneTestCase { +public class TestMacroExpander extends SolrTestCase { @Test public void testExamples() { diff --git a/solr/core/src/test/org/apache/solr/response/TestSolrQueryResponse.java b/solr/core/src/test/org/apache/solr/response/TestSolrQueryResponse.java index 723ee64cc59..3e4dc6c6f17 100644 --- a/solr/core/src/test/org/apache/solr/response/TestSolrQueryResponse.java +++ b/solr/core/src/test/org/apache/solr/response/TestSolrQueryResponse.java @@ -22,14 +22,14 @@ import java.util.Iterator; import java.util.Map; import java.util.Map.Entry; -import org.apache.lucene.util.LuceneTestCase; +import org.apache.solr.SolrTestCase; import org.apache.solr.common.util.NamedList; import org.apache.solr.common.util.SimpleOrderedMap; import org.apache.solr.search.ReturnFields; import org.apache.solr.search.SolrReturnFields; import org.junit.Test; -public class TestSolrQueryResponse extends LuceneTestCase { +public class TestSolrQueryResponse extends SolrTestCase { @Test public void testName() throws Exception { diff --git a/solr/core/src/test/org/apache/solr/search/TestDocSet.java b/solr/core/src/test/org/apache/solr/search/TestDocSet.java index 999b080b994..20879ea47fd 100644 --- a/solr/core/src/test/org/apache/solr/search/TestDocSet.java +++ b/solr/core/src/test/org/apache/solr/search/TestDocSet.java @@ -42,13 +42,13 @@ import org.apache.lucene.search.DocIdSetIterator; import org.apache.lucene.util.BitSetIterator; import org.apache.lucene.util.Bits; import org.apache.lucene.util.FixedBitSet; -import org.apache.lucene.util.LuceneTestCase; import org.apache.lucene.util.Version; +import org.apache.solr.SolrTestCase; /** * */ -public class TestDocSet extends LuceneTestCase { +public class TestDocSet extends SolrTestCase { Random rand; float loadfactor; diff --git a/solr/core/src/test/org/apache/solr/search/TestFastLRUCache.java b/solr/core/src/test/org/apache/solr/search/TestFastLRUCache.java index 9ead65d653e..09e6ca1a8c7 100644 --- a/solr/core/src/test/org/apache/solr/search/TestFastLRUCache.java +++ b/solr/core/src/test/org/apache/solr/search/TestFastLRUCache.java @@ -16,8 +16,8 @@ */ package org.apache.solr.search; -import org.apache.lucene.util.LuceneTestCase; import org.apache.lucene.util.TestUtil; +import org.apache.solr.SolrTestCase; import org.apache.solr.metrics.MetricsMap; import org.apache.solr.metrics.SolrMetricManager; import org.apache.solr.util.ConcurrentLRUCache; @@ -37,7 +37,7 @@ import java.util.concurrent.atomic.AtomicInteger; * @see org.apache.solr.search.FastLRUCache * @since solr 1.4 */ -public class TestFastLRUCache extends LuceneTestCase { +public class TestFastLRUCache extends SolrTestCase { SolrMetricManager metricManager = new SolrMetricManager(); String registry = TestUtil.randomSimpleString(random(), 2, 10); String scope = TestUtil.randomSimpleString(random(), 2, 10); diff --git a/solr/core/src/test/org/apache/solr/search/TestFilteredDocIdSet.java b/solr/core/src/test/org/apache/solr/search/TestFilteredDocIdSet.java index 4a5c80543f4..cc9ec0ab2d0 100644 --- a/solr/core/src/test/org/apache/solr/search/TestFilteredDocIdSet.java +++ b/solr/core/src/test/org/apache/solr/search/TestFilteredDocIdSet.java @@ -37,9 +37,9 @@ import org.apache.lucene.search.MatchAllDocsQuery; import org.apache.lucene.search.Query; import org.apache.lucene.store.Directory; import org.apache.lucene.util.Bits; -import org.apache.lucene.util.LuceneTestCase; +import org.apache.solr.SolrTestCase; -public class TestFilteredDocIdSet extends LuceneTestCase { +public class TestFilteredDocIdSet extends SolrTestCase { public void testFilteredDocIdSet() throws Exception { final int maxdoc=10; final DocIdSet innerSet = new DocIdSet() { diff --git a/solr/core/src/test/org/apache/solr/search/TestLRUCache.java b/solr/core/src/test/org/apache/solr/search/TestLRUCache.java index 934c1ec53d9..41357a05da2 100644 --- a/solr/core/src/test/org/apache/solr/search/TestLRUCache.java +++ b/solr/core/src/test/org/apache/solr/search/TestLRUCache.java @@ -21,7 +21,7 @@ import java.util.HashMap; import java.util.Map; import org.apache.lucene.util.Accountable; -import org.apache.lucene.util.LuceneTestCase; +import org.apache.solr.SolrTestCase; import org.apache.lucene.util.RamUsageEstimator; import org.apache.lucene.util.TestUtil; import org.apache.solr.common.SolrException; @@ -30,7 +30,7 @@ import org.apache.solr.metrics.SolrMetricManager; /** * Test for org.apache.solr.search.LRUCache */ -public class TestLRUCache extends LuceneTestCase { +public class TestLRUCache extends SolrTestCase { SolrMetricManager metricManager = new SolrMetricManager(); String registry = TestUtil.randomSimpleString(random(), 2, 10); diff --git a/solr/core/src/test/org/apache/solr/search/TestLegacyNumericRangeQueryBuilder.java b/solr/core/src/test/org/apache/solr/search/TestLegacyNumericRangeQueryBuilder.java index a083bfdc370..ffa083ffd2c 100644 --- a/solr/core/src/test/org/apache/solr/search/TestLegacyNumericRangeQueryBuilder.java +++ b/solr/core/src/test/org/apache/solr/search/TestLegacyNumericRangeQueryBuilder.java @@ -17,7 +17,7 @@ package org.apache.solr.search; import org.apache.lucene.search.Query; -import org.apache.lucene.util.LuceneTestCase; +import org.apache.solr.SolrTestCase; import org.apache.solr.legacy.LegacyNumericRangeQuery; import org.apache.lucene.queryparser.xml.ParserException; import org.w3c.dom.Document; @@ -32,7 +32,7 @@ import java.io.IOException; import java.io.InputStream; import java.nio.charset.StandardCharsets; -public class TestLegacyNumericRangeQueryBuilder extends LuceneTestCase { +public class TestLegacyNumericRangeQueryBuilder extends SolrTestCase { public void testGetFilterHandleNumericParseErrorStrict() throws Exception { LegacyNumericRangeQueryBuilder filterBuilder = new LegacyNumericRangeQueryBuilder(); diff --git a/solr/core/src/test/org/apache/solr/search/TestSolrCoreParser.java b/solr/core/src/test/org/apache/solr/search/TestSolrCoreParser.java index 79740e68522..7a0e5194dc2 100644 --- a/solr/core/src/test/org/apache/solr/search/TestSolrCoreParser.java +++ b/solr/core/src/test/org/apache/solr/search/TestSolrCoreParser.java @@ -37,11 +37,11 @@ import org.apache.lucene.search.spans.SpanNearQuery; import org.apache.lucene.search.spans.SpanOrQuery; import org.apache.lucene.search.spans.SpanQuery; import org.apache.lucene.search.spans.SpanTermQuery; -import org.apache.lucene.util.LuceneTestCase; +import org.apache.solr.SolrTestCase; import org.apache.solr.common.util.NamedList; import org.apache.solr.request.SolrQueryRequest; -public class TestSolrCoreParser extends LuceneTestCase { +public class TestSolrCoreParser extends SolrTestCase { private SolrCoreParser solrCoreParser; diff --git a/solr/core/src/test/org/apache/solr/search/TestStandardQParsers.java b/solr/core/src/test/org/apache/solr/search/TestStandardQParsers.java index cab9026602a..fbb42103ed7 100644 --- a/solr/core/src/test/org/apache/solr/search/TestStandardQParsers.java +++ b/solr/core/src/test/org/apache/solr/search/TestStandardQParsers.java @@ -22,7 +22,7 @@ import java.util.ArrayList; import java.util.List; import java.util.Map; -import org.apache.lucene.util.LuceneTestCase; +import org.apache.solr.SolrTestCase; import org.junit.Test; /** @@ -34,7 +34,7 @@ import org.junit.Test; * @see org.apache.solr.search.QParserPlugin#standardPlugins * */ -public class TestStandardQParsers extends LuceneTestCase { +public class TestStandardQParsers extends SolrTestCase { /** * Field name of constant mandatory for query parser plugin. */ diff --git a/solr/core/src/test/org/apache/solr/search/TestXmlQParser.java b/solr/core/src/test/org/apache/solr/search/TestXmlQParser.java deleted file mode 100755 index e7237b32ccc..00000000000 --- a/solr/core/src/test/org/apache/solr/search/TestXmlQParser.java +++ /dev/null @@ -1,42 +0,0 @@ -/* - * Licensed to the Apache Software Foundation (ASF) under one or more - * contributor license agreements. See the NOTICE file distributed with - * this work for additional information regarding copyright ownership. - * The ASF licenses this file to You under the Apache License, Version 2.0 - * (the "License"); you may not use this file except in compliance with - * the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -package org.apache.solr.search; - -import org.apache.lucene.queryparser.xml.CoreParser; -import org.apache.lucene.queryparser.xml.TestCoreParser; - -public class TestXmlQParser extends TestCoreParser { - - private CoreParser solrCoreParser; - - @Override - protected CoreParser coreParser() { - if (solrCoreParser == null) { - solrCoreParser = new SolrCoreParser( - super.defaultField(), - super.analyzer(), - null); - } - return solrCoreParser; - } - - //public void testSomeOtherQuery() { - // Query q = parse("SomeOtherQuery.xml"); - // dumpResults("SomeOtherQuery", q, ?); - //} - -} diff --git a/solr/core/src/test/org/apache/solr/search/function/TestOrdValues.java b/solr/core/src/test/org/apache/solr/search/function/TestOrdValues.java index 6b68bf3340f..7cd1cd0f0e9 100644 --- a/solr/core/src/test/org/apache/solr/search/function/TestOrdValues.java +++ b/solr/core/src/test/org/apache/solr/search/function/TestOrdValues.java @@ -29,6 +29,7 @@ import org.apache.lucene.index.DirectoryReader; import org.apache.lucene.index.IndexReader; import org.apache.lucene.index.IndexWriterConfig; import org.apache.lucene.index.RandomIndexWriter; +import org.apache.solr.SolrTestCase; import org.apache.solr.legacy.LegacyFloatField; import org.apache.solr.legacy.LegacyIntField; import org.apache.lucene.queries.function.FunctionQuery; @@ -42,7 +43,6 @@ import org.apache.lucene.search.ScoreDoc; import org.apache.lucene.search.TopDocs; import org.apache.lucene.store.Directory; import org.apache.lucene.util.BytesRef; -import org.apache.lucene.util.LuceneTestCase; import org.apache.lucene.util.TestUtil; import org.junit.AfterClass; import org.junit.BeforeClass; @@ -59,7 +59,7 @@ import org.junit.Test; *

* The exact score tests use TopDocs top to verify the exact score. */ -public class TestOrdValues extends LuceneTestCase { +public class TestOrdValues extends SolrTestCase { @BeforeClass public static void beforeClass() throws Exception { diff --git a/solr/core/src/test/org/apache/solr/spelling/ConjunctionSolrSpellCheckerTest.java b/solr/core/src/test/org/apache/solr/spelling/ConjunctionSolrSpellCheckerTest.java index 8ec933b94d6..98ec2e715e5 100644 --- a/solr/core/src/test/org/apache/solr/spelling/ConjunctionSolrSpellCheckerTest.java +++ b/solr/core/src/test/org/apache/solr/spelling/ConjunctionSolrSpellCheckerTest.java @@ -23,13 +23,13 @@ import org.apache.lucene.search.spell.LevenshteinDistance; import org.apache.lucene.search.spell.LuceneLevenshteinDistance; import org.apache.lucene.search.spell.NGramDistance; import org.apache.lucene.search.spell.StringDistance; -import org.apache.lucene.util.LuceneTestCase; +import org.apache.solr.SolrTestCase; import org.apache.solr.core.SolrCore; import org.apache.solr.search.SolrIndexSearcher; import org.junit.Assert; import org.junit.Test; -public class ConjunctionSolrSpellCheckerTest extends LuceneTestCase { +public class ConjunctionSolrSpellCheckerTest extends SolrTestCase { public static final Class[] AVAILABLE_DISTANCES = {LevenshteinDistance.class, LuceneLevenshteinDistance.class, JaroWinklerDistance.class, NGramDistance.class}; diff --git a/solr/core/src/test/org/apache/solr/spelling/SpellingQueryConverterTest.java b/solr/core/src/test/org/apache/solr/spelling/SpellingQueryConverterTest.java index 11a31c2880b..04e1da9cc90 100644 --- a/solr/core/src/test/org/apache/solr/spelling/SpellingQueryConverterTest.java +++ b/solr/core/src/test/org/apache/solr/spelling/SpellingQueryConverterTest.java @@ -21,7 +21,7 @@ import java.util.Collection; import java.util.List; import org.apache.lucene.analysis.core.WhitespaceAnalyzer; -import org.apache.lucene.util.LuceneTestCase; +import org.apache.solr.SolrTestCase; import org.apache.solr.common.util.NamedList; import org.junit.Test; @@ -32,7 +32,7 @@ import org.junit.Test; * * @since solr 1.3 */ -public class SpellingQueryConverterTest extends LuceneTestCase { +public class SpellingQueryConverterTest extends SolrTestCase { @Test public void test() throws Exception { diff --git a/solr/core/src/test/org/apache/solr/store/blockcache/BlockCacheTest.java b/solr/core/src/test/org/apache/solr/store/blockcache/BlockCacheTest.java index 31fad5cff87..c6b8496556f 100644 --- a/solr/core/src/test/org/apache/solr/store/blockcache/BlockCacheTest.java +++ b/solr/core/src/test/org/apache/solr/store/blockcache/BlockCacheTest.java @@ -23,10 +23,11 @@ import java.util.concurrent.atomic.AtomicLong; import com.github.benmanes.caffeine.cache.*; import org.apache.lucene.util.LuceneTestCase; +import org.apache.solr.SolrTestCase; import org.junit.Test; @LuceneTestCase.BadApple(bugUrl="https://issues.apache.org/jira/browse/SOLR-12028") // 12-Jun-2018 -public class BlockCacheTest extends LuceneTestCase { +public class BlockCacheTest extends SolrTestCase { @Test public void testBlockCache() { int blocksInTest = 2000000; diff --git a/solr/core/src/test/org/apache/solr/store/blockcache/BufferStoreTest.java b/solr/core/src/test/org/apache/solr/store/blockcache/BufferStoreTest.java index 228f5a3ce75..cec94466fd0 100644 --- a/solr/core/src/test/org/apache/solr/store/blockcache/BufferStoreTest.java +++ b/solr/core/src/test/org/apache/solr/store/blockcache/BufferStoreTest.java @@ -19,14 +19,14 @@ package org.apache.solr.store.blockcache; import java.math.BigDecimal; import java.util.Map; -import org.apache.lucene.util.LuceneTestCase; import org.apache.lucene.util.TestUtil; +import org.apache.solr.SolrTestCase; import org.apache.solr.metrics.MetricsMap; import org.apache.solr.metrics.SolrMetricManager; import org.junit.Before; import org.junit.Test; -public class BufferStoreTest extends LuceneTestCase { +public class BufferStoreTest extends SolrTestCase { private final static int blockSize = 1024; private Metrics metrics; diff --git a/solr/core/src/test/org/apache/solr/uninverting/TestDocTermOrds.java b/solr/core/src/test/org/apache/solr/uninverting/TestDocTermOrds.java index f4d9fb10fb8..ef51c76b880 100644 --- a/solr/core/src/test/org/apache/solr/uninverting/TestDocTermOrds.java +++ b/solr/core/src/test/org/apache/solr/uninverting/TestDocTermOrds.java @@ -46,7 +46,7 @@ import org.apache.lucene.index.TermsEnum; import org.apache.lucene.index.TermsEnum.SeekStatus; import org.apache.lucene.store.Directory; import org.apache.lucene.util.BytesRef; -import org.apache.lucene.util.LuceneTestCase; +import org.apache.solr.SolrTestCase; import org.apache.lucene.util.StringHelper; import org.apache.lucene.util.TestUtil; import org.apache.solr.index.SlowCompositeReaderWrapper; @@ -60,7 +60,7 @@ import org.apache.solr.legacy.LegacyNumericUtils; // - test w/ cutoff // - crank docs way up so we get some merging sometimes -public class TestDocTermOrds extends LuceneTestCase { +public class TestDocTermOrds extends SolrTestCase { public void testEmptyIndex() throws IOException { final Directory dir = newDirectory(); diff --git a/solr/core/src/test/org/apache/solr/uninverting/TestDocTermOrdsUninvertLimit.java b/solr/core/src/test/org/apache/solr/uninverting/TestDocTermOrdsUninvertLimit.java index 278b2c51e8b..27942d28923 100644 --- a/solr/core/src/test/org/apache/solr/uninverting/TestDocTermOrdsUninvertLimit.java +++ b/solr/core/src/test/org/apache/solr/uninverting/TestDocTermOrdsUninvertLimit.java @@ -26,11 +26,11 @@ import org.apache.lucene.index.IndexReader; import org.apache.lucene.index.LeafReader; import org.apache.lucene.index.RandomIndexWriter; import org.apache.lucene.store.Directory; -import org.apache.lucene.util.LuceneTestCase; +import org.apache.solr.SolrTestCase; import org.apache.lucene.util.TestUtil; import org.apache.solr.index.SlowCompositeReaderWrapper; -public class TestDocTermOrdsUninvertLimit extends LuceneTestCase { +public class TestDocTermOrdsUninvertLimit extends SolrTestCase { /* UnInvertedField had a reference block limitation of 2^24. This unit test triggered it. * diff --git a/solr/core/src/test/org/apache/solr/uninverting/TestFieldCache.java b/solr/core/src/test/org/apache/solr/uninverting/TestFieldCache.java index 60bb9e815aa..c525f8bdf39 100644 --- a/solr/core/src/test/org/apache/solr/uninverting/TestFieldCache.java +++ b/solr/core/src/test/org/apache/solr/uninverting/TestFieldCache.java @@ -54,7 +54,7 @@ import org.apache.lucene.index.TermsEnum; import org.apache.lucene.store.Directory; import org.apache.lucene.util.Bits; import org.apache.lucene.util.BytesRef; -import org.apache.lucene.util.LuceneTestCase; +import org.apache.solr.SolrTestCase; import org.apache.lucene.util.TestUtil; import org.apache.solr.index.SlowCompositeReaderWrapper; import org.junit.AfterClass; @@ -62,7 +62,7 @@ import org.junit.BeforeClass; import static org.apache.lucene.search.DocIdSetIterator.NO_MORE_DOCS; -public class TestFieldCache extends LuceneTestCase { +public class TestFieldCache extends SolrTestCase { private static LeafReader reader; private static int NUM_DOCS; private static int NUM_ORDS; diff --git a/solr/core/src/test/org/apache/solr/uninverting/TestFieldCacheReopen.java b/solr/core/src/test/org/apache/solr/uninverting/TestFieldCacheReopen.java index 410f920b31c..665d68773f6 100644 --- a/solr/core/src/test/org/apache/solr/uninverting/TestFieldCacheReopen.java +++ b/solr/core/src/test/org/apache/solr/uninverting/TestFieldCacheReopen.java @@ -24,9 +24,9 @@ import org.apache.lucene.index.DirectoryReader; import org.apache.lucene.index.IndexWriter; import org.apache.lucene.index.NumericDocValues; import org.apache.lucene.store.Directory; -import org.apache.lucene.util.LuceneTestCase; +import org.apache.solr.SolrTestCase; -public class TestFieldCacheReopen extends LuceneTestCase { +public class TestFieldCacheReopen extends SolrTestCase { // TODO: make a version of this that tests the same thing with UninvertingReader.wrap() diff --git a/solr/core/src/test/org/apache/solr/uninverting/TestFieldCacheSort.java b/solr/core/src/test/org/apache/solr/uninverting/TestFieldCacheSort.java index ac7bd7f4dbd..f7d7960b4bf 100644 --- a/solr/core/src/test/org/apache/solr/uninverting/TestFieldCacheSort.java +++ b/solr/core/src/test/org/apache/solr/uninverting/TestFieldCacheSort.java @@ -53,13 +53,13 @@ import org.apache.lucene.search.TopDocs; import org.apache.lucene.search.similarities.BM25Similarity; import org.apache.lucene.store.Directory; import org.apache.solr.uninverting.UninvertingReader.Type; -import org.apache.lucene.util.LuceneTestCase; +import org.apache.solr.SolrTestCase; import org.apache.lucene.util.TestUtil; /* * Tests sorting (but with fieldcache instead of docvalues) */ -public class TestFieldCacheSort extends LuceneTestCase { +public class TestFieldCacheSort extends SolrTestCase { public void testString() throws IOException { testString(SortField.Type.STRING); diff --git a/solr/core/src/test/org/apache/solr/uninverting/TestFieldCacheSortRandom.java b/solr/core/src/test/org/apache/solr/uninverting/TestFieldCacheSortRandom.java index 318ba59ad30..bca479483ec 100644 --- a/solr/core/src/test/org/apache/solr/uninverting/TestFieldCacheSortRandom.java +++ b/solr/core/src/test/org/apache/solr/uninverting/TestFieldCacheSortRandom.java @@ -54,12 +54,12 @@ import org.apache.lucene.store.Directory; import org.apache.lucene.util.BitSetIterator; import org.apache.lucene.util.BytesRef; import org.apache.lucene.util.FixedBitSet; -import org.apache.lucene.util.LuceneTestCase; +import org.apache.solr.SolrTestCase; import org.apache.lucene.util.TestUtil; import org.apache.solr.uninverting.UninvertingReader.Type; /** random sorting tests with uninversion */ -public class TestFieldCacheSortRandom extends LuceneTestCase { +public class TestFieldCacheSortRandom extends SolrTestCase { public void testRandomStringSort() throws Exception { testRandomStringSort(SortField.Type.STRING); diff --git a/solr/core/src/test/org/apache/solr/uninverting/TestFieldCacheVsDocValues.java b/solr/core/src/test/org/apache/solr/uninverting/TestFieldCacheVsDocValues.java index 0377dff5022..5649f87ac80 100644 --- a/solr/core/src/test/org/apache/solr/uninverting/TestFieldCacheVsDocValues.java +++ b/solr/core/src/test/org/apache/solr/uninverting/TestFieldCacheVsDocValues.java @@ -45,14 +45,14 @@ import org.apache.lucene.store.Directory; import org.apache.lucene.util.Bits; import org.apache.lucene.util.BytesRef; import org.apache.lucene.util.Constants; -import org.apache.lucene.util.LuceneTestCase; +import org.apache.solr.SolrTestCase; import org.apache.lucene.util.TestUtil; import org.apache.solr.index.SlowCompositeReaderWrapper; import static org.apache.lucene.index.SortedSetDocValues.NO_MORE_ORDS; import static org.apache.lucene.search.DocIdSetIterator.NO_MORE_DOCS; -public class TestFieldCacheVsDocValues extends LuceneTestCase { +public class TestFieldCacheVsDocValues extends SolrTestCase { @Override public void setUp() throws Exception { diff --git a/solr/core/src/test/org/apache/solr/uninverting/TestFieldCacheWithThreads.java b/solr/core/src/test/org/apache/solr/uninverting/TestFieldCacheWithThreads.java index 810e4934ee3..a624531bd3a 100644 --- a/solr/core/src/test/org/apache/solr/uninverting/TestFieldCacheWithThreads.java +++ b/solr/core/src/test/org/apache/solr/uninverting/TestFieldCacheWithThreads.java @@ -40,11 +40,11 @@ import org.apache.lucene.index.RandomIndexWriter; import org.apache.lucene.index.SortedDocValues; import org.apache.lucene.store.Directory; import org.apache.lucene.util.BytesRef; -import org.apache.lucene.util.LuceneTestCase; import org.apache.lucene.util.TestUtil; +import org.apache.solr.SolrTestCase; // TODO: what happened to this test... its not actually uninverting? -public class TestFieldCacheWithThreads extends LuceneTestCase { +public class TestFieldCacheWithThreads extends SolrTestCase { public void test() throws Exception { Directory dir = newDirectory(); diff --git a/solr/core/src/test/org/apache/solr/uninverting/TestLegacyFieldCache.java b/solr/core/src/test/org/apache/solr/uninverting/TestLegacyFieldCache.java index b75bab5e0ed..ebb9f4122dc 100644 --- a/solr/core/src/test/org/apache/solr/uninverting/TestLegacyFieldCache.java +++ b/solr/core/src/test/org/apache/solr/uninverting/TestLegacyFieldCache.java @@ -39,7 +39,7 @@ import org.apache.solr.legacy.LegacyLongField; import org.apache.lucene.store.Directory; import org.apache.lucene.util.Bits; import org.apache.lucene.util.BytesRef; -import org.apache.lucene.util.LuceneTestCase; +import org.apache.solr.SolrTestCase; import org.apache.lucene.util.TestUtil; import org.apache.solr.index.SlowCompositeReaderWrapper; import org.junit.AfterClass; @@ -55,7 +55,7 @@ import java.util.concurrent.atomic.AtomicInteger; import static org.apache.lucene.search.DocIdSetIterator.NO_MORE_DOCS; /** random assortment of tests against legacy numerics */ -public class TestLegacyFieldCache extends LuceneTestCase { +public class TestLegacyFieldCache extends SolrTestCase { private static LeafReader reader; private static int NUM_DOCS; private static Directory directory; diff --git a/solr/core/src/test/org/apache/solr/uninverting/TestNumericTerms32.java b/solr/core/src/test/org/apache/solr/uninverting/TestNumericTerms32.java index cc80867b0c1..2955b91ee81 100644 --- a/solr/core/src/test/org/apache/solr/uninverting/TestNumericTerms32.java +++ b/solr/core/src/test/org/apache/solr/uninverting/TestNumericTerms32.java @@ -33,14 +33,14 @@ import org.apache.lucene.search.Sort; import org.apache.lucene.search.SortField; import org.apache.lucene.search.TopDocs; import org.apache.lucene.store.Directory; -import org.apache.lucene.util.LuceneTestCase; +import org.apache.solr.SolrTestCase; import org.apache.lucene.util.TestUtil; import org.apache.solr.uninverting.UninvertingReader.Type; import org.junit.AfterClass; import org.junit.BeforeClass; import org.junit.Test; -public class TestNumericTerms32 extends LuceneTestCase { +public class TestNumericTerms32 extends SolrTestCase { // distance of entries private static int distance; // shift the starting of the values to the left, to also have negative values: diff --git a/solr/core/src/test/org/apache/solr/uninverting/TestNumericTerms64.java b/solr/core/src/test/org/apache/solr/uninverting/TestNumericTerms64.java index 7de523b8a84..d8b5a6a5fa6 100644 --- a/solr/core/src/test/org/apache/solr/uninverting/TestNumericTerms64.java +++ b/solr/core/src/test/org/apache/solr/uninverting/TestNumericTerms64.java @@ -33,14 +33,14 @@ import org.apache.lucene.search.Sort; import org.apache.lucene.search.SortField; import org.apache.lucene.search.TopDocs; import org.apache.lucene.store.Directory; -import org.apache.lucene.util.LuceneTestCase; +import org.apache.solr.SolrTestCase; import org.apache.lucene.util.TestUtil; import org.apache.solr.uninverting.UninvertingReader.Type; import org.junit.AfterClass; import org.junit.BeforeClass; import org.junit.Test; -public class TestNumericTerms64 extends LuceneTestCase { +public class TestNumericTerms64 extends SolrTestCase { // distance of entries private static long distance; // shift the starting of the values to the left, to also have negative values: diff --git a/solr/core/src/test/org/apache/solr/uninverting/TestUninvertingReader.java b/solr/core/src/test/org/apache/solr/uninverting/TestUninvertingReader.java index 05a1254eb17..fda824683eb 100644 --- a/solr/core/src/test/org/apache/solr/uninverting/TestUninvertingReader.java +++ b/solr/core/src/test/org/apache/solr/uninverting/TestUninvertingReader.java @@ -47,12 +47,12 @@ import org.apache.solr.legacy.LegacyLongField; import org.apache.solr.legacy.LegacyNumericUtils; import org.apache.lucene.store.Directory; import org.apache.lucene.util.BytesRef; -import org.apache.lucene.util.LuceneTestCase; +import org.apache.solr.SolrTestCase; import org.apache.lucene.util.TestUtil; import org.apache.solr.index.SlowCompositeReaderWrapper; import org.apache.solr.uninverting.UninvertingReader.Type; -public class TestUninvertingReader extends LuceneTestCase { +public class TestUninvertingReader extends SolrTestCase { public void testSortedSetInteger() throws IOException { Directory dir = newDirectory(); diff --git a/solr/core/src/test/org/apache/solr/update/TransactionLogTest.java b/solr/core/src/test/org/apache/solr/update/TransactionLogTest.java index 66ecbc65ff6..167b3b469b5 100644 --- a/solr/core/src/test/org/apache/solr/update/TransactionLogTest.java +++ b/solr/core/src/test/org/apache/solr/update/TransactionLogTest.java @@ -22,11 +22,11 @@ import java.nio.file.Path; import java.util.ArrayList; import java.util.Locale; -import org.apache.lucene.util.LuceneTestCase; +import org.apache.solr.SolrTestCase; import org.apache.solr.common.SolrInputDocument; import org.junit.Test; -public class TransactionLogTest extends LuceneTestCase { +public class TransactionLogTest extends SolrTestCase { @Test public void testBigLastAddSize() { diff --git a/solr/core/src/test/org/apache/solr/update/processor/IgnoreLargeDocumentProcessorFactoryTest.java b/solr/core/src/test/org/apache/solr/update/processor/IgnoreLargeDocumentProcessorFactoryTest.java index 1674a7d6ef9..c5319ea1773 100644 --- a/solr/core/src/test/org/apache/solr/update/processor/IgnoreLargeDocumentProcessorFactoryTest.java +++ b/solr/core/src/test/org/apache/solr/update/processor/IgnoreLargeDocumentProcessorFactoryTest.java @@ -25,7 +25,7 @@ import java.util.HashMap; import java.util.List; import java.util.Map; -import org.apache.lucene.util.LuceneTestCase; +import org.apache.solr.SolrTestCase; import org.apache.solr.common.SolrException; import org.apache.solr.common.SolrInputDocument; import org.apache.solr.common.util.NamedList; @@ -34,7 +34,7 @@ import org.junit.Test; import static org.apache.solr.update.processor.IgnoreLargeDocumentProcessorFactory.ObjectSizeEstimator.estimate; -public class IgnoreLargeDocumentProcessorFactoryTest extends LuceneTestCase { +public class IgnoreLargeDocumentProcessorFactoryTest extends SolrTestCase { @Test public void testProcessor() throws IOException { diff --git a/solr/core/src/test/org/apache/solr/update/processor/ScriptEngineTest.java b/solr/core/src/test/org/apache/solr/update/processor/ScriptEngineTest.java index 6bf20cec19b..8a913e16426 100644 --- a/solr/core/src/test/org/apache/solr/update/processor/ScriptEngineTest.java +++ b/solr/core/src/test/org/apache/solr/update/processor/ScriptEngineTest.java @@ -17,7 +17,6 @@ package org.apache.solr.update.processor; import org.apache.lucene.util.Constants; -import org.apache.lucene.util.LuceneTestCase; import javax.script.Invocable; import javax.script.ScriptEngine; @@ -25,6 +24,7 @@ import javax.script.ScriptEngineManager; import javax.script.ScriptException; import java.io.StringReader; +import org.apache.solr.SolrTestCase; import org.junit.Assume; import org.junit.BeforeClass; @@ -32,7 +32,7 @@ import org.junit.BeforeClass; * Sanity tests basic functionality of {@link ScriptEngineManager} and * {@link ScriptEngine} w/o exercising any Lucene specific code. */ -public class ScriptEngineTest extends LuceneTestCase { +public class ScriptEngineTest extends SolrTestCase { private ScriptEngineManager manager; diff --git a/solr/core/src/test/org/apache/solr/util/CircularListTest.java b/solr/core/src/test/org/apache/solr/util/CircularListTest.java index 53c29b4d9c8..46361befd61 100644 --- a/solr/core/src/test/org/apache/solr/util/CircularListTest.java +++ b/solr/core/src/test/org/apache/solr/util/CircularListTest.java @@ -18,14 +18,14 @@ package org.apache.solr.util; import java.io.IOException; -import org.apache.lucene.util.LuceneTestCase; +import org.apache.solr.SolrTestCase; import org.apache.solr.logging.CircularList; import org.junit.Test; /** * Test circular list */ -public class CircularListTest extends LuceneTestCase { +public class CircularListTest extends SolrTestCase { @Test public void testCircularList() throws IOException { diff --git a/solr/core/src/test/org/apache/solr/util/DistanceUnitsTest.java b/solr/core/src/test/org/apache/solr/util/DistanceUnitsTest.java index 395637166a0..dc439b752e7 100644 --- a/solr/core/src/test/org/apache/solr/util/DistanceUnitsTest.java +++ b/solr/core/src/test/org/apache/solr/util/DistanceUnitsTest.java @@ -16,10 +16,10 @@ */ package org.apache.solr.util; +import org.apache.solr.SolrTestCase; import org.locationtech.spatial4j.distance.DistanceUtils; -import org.apache.lucene.util.LuceneTestCase; -public class DistanceUnitsTest extends LuceneTestCase { +public class DistanceUnitsTest extends SolrTestCase { public void testAddNewUnits() throws Exception { DistanceUnits.addUnits("lightyears", 6.73430542e-12, 9.4605284e12 * DistanceUtils.KM_TO_DEG); diff --git a/solr/core/src/test/org/apache/solr/util/FileUtilsTest.java b/solr/core/src/test/org/apache/solr/util/FileUtilsTest.java index ab0462ad3ed..95b37011a6d 100644 --- a/solr/core/src/test/org/apache/solr/util/FileUtilsTest.java +++ b/solr/core/src/test/org/apache/solr/util/FileUtilsTest.java @@ -19,9 +19,9 @@ package org.apache.solr.util; import java.io.File; import java.io.IOException; -import org.apache.lucene.util.LuceneTestCase; +import org.apache.solr.SolrTestCase; -public class FileUtilsTest extends LuceneTestCase { +public class FileUtilsTest extends SolrTestCase { public void testResolve() throws IOException { String cwd = new File(".").getAbsolutePath(); diff --git a/solr/core/src/test/org/apache/solr/util/OrderedExecutorTest.java b/solr/core/src/test/org/apache/solr/util/OrderedExecutorTest.java index 929cc7236e6..825bf1b5f55 100644 --- a/solr/core/src/test/org/apache/solr/util/OrderedExecutorTest.java +++ b/solr/core/src/test/org/apache/solr/util/OrderedExecutorTest.java @@ -31,14 +31,14 @@ import java.util.concurrent.ExecutorService; import java.util.concurrent.TimeoutException; import java.util.concurrent.TimeUnit; -import org.apache.lucene.util.LuceneTestCase; +import org.apache.solr.SolrTestCase; import org.apache.solr.common.util.ExecutorUtil; import org.junit.Test; import org.slf4j.Logger; import org.slf4j.LoggerFactory; -public class OrderedExecutorTest extends LuceneTestCase { +public class OrderedExecutorTest extends SolrTestCase { private static final Logger log = LoggerFactory.getLogger(MethodHandles.lookup().lookupClass()); @Test diff --git a/solr/core/src/test/org/apache/solr/util/PrimUtilsTest.java b/solr/core/src/test/org/apache/solr/util/PrimUtilsTest.java index 3514fb85277..87e24f9d9a1 100644 --- a/solr/core/src/test/org/apache/solr/util/PrimUtilsTest.java +++ b/solr/core/src/test/org/apache/solr/util/PrimUtilsTest.java @@ -16,11 +16,11 @@ */ package org.apache.solr.util; -import org.apache.lucene.util.LuceneTestCase; +import org.apache.solr.SolrTestCase; import java.util.Arrays; -public class PrimUtilsTest extends LuceneTestCase { +public class PrimUtilsTest extends SolrTestCase { public void testSort() { int maxSize = 100; diff --git a/solr/core/src/test/org/apache/solr/util/TestFastOutputStream.java b/solr/core/src/test/org/apache/solr/util/TestFastOutputStream.java index 9f4799938fc..f7176209732 100644 --- a/solr/core/src/test/org/apache/solr/util/TestFastOutputStream.java +++ b/solr/core/src/test/org/apache/solr/util/TestFastOutputStream.java @@ -16,12 +16,12 @@ */ package org.apache.solr.util; -import org.apache.lucene.util.LuceneTestCase; +import org.apache.solr.SolrTestCase; import org.apache.solr.update.MemOutputStream; import java.util.Random; -public class TestFastOutputStream extends LuceneTestCase { +public class TestFastOutputStream extends SolrTestCase { Random rand; byte[] arr; diff --git a/solr/core/src/test/org/apache/solr/util/TestRTimerTree.java b/solr/core/src/test/org/apache/solr/util/TestRTimerTree.java index e046ab3ae20..f668aa14a73 100644 --- a/solr/core/src/test/org/apache/solr/util/TestRTimerTree.java +++ b/solr/core/src/test/org/apache/solr/util/TestRTimerTree.java @@ -16,10 +16,10 @@ */ package org.apache.solr.util; -import org.apache.lucene.util.LuceneTestCase; +import org.apache.solr.SolrTestCase; import org.apache.solr.common.util.NamedList; -public class TestRTimerTree extends LuceneTestCase { +public class TestRTimerTree extends SolrTestCase { private static class MockTimerImpl implements RTimer.TimerImpl { static private long systemTime; diff --git a/solr/core/src/test/org/apache/solr/util/TestSafeXMLParsing.java b/solr/core/src/test/org/apache/solr/util/TestSafeXMLParsing.java index db71a8c99c6..abdd88df655 100644 --- a/solr/core/src/test/org/apache/solr/util/TestSafeXMLParsing.java +++ b/solr/core/src/test/org/apache/solr/util/TestSafeXMLParsing.java @@ -23,12 +23,12 @@ import java.lang.invoke.MethodHandles; import java.nio.charset.StandardCharsets; import org.apache.lucene.analysis.util.ResourceLoader; -import org.apache.lucene.util.LuceneTestCase; +import org.apache.solr.SolrTestCase; import org.slf4j.Logger; import org.slf4j.LoggerFactory; import org.w3c.dom.Document; -public class TestSafeXMLParsing extends LuceneTestCase { +public class TestSafeXMLParsing extends SolrTestCase { private static final Logger log = LoggerFactory.getLogger(MethodHandles.lookup().lookupClass()); public void testUntrusted() throws Exception { diff --git a/solr/core/src/test/org/apache/solr/util/TestTestInjection.java b/solr/core/src/test/org/apache/solr/util/TestTestInjection.java index c4269ccbbf2..84282cabba6 100644 --- a/solr/core/src/test/org/apache/solr/util/TestTestInjection.java +++ b/solr/core/src/test/org/apache/solr/util/TestTestInjection.java @@ -18,11 +18,11 @@ package org.apache.solr.util; import java.util.Locale; -import org.apache.lucene.util.LuceneTestCase; +import org.apache.solr.SolrTestCase; import org.junit.AfterClass; import org.junit.BeforeClass; -public class TestTestInjection extends LuceneTestCase { +public class TestTestInjection extends SolrTestCase { @BeforeClass public static void beforeClass() { diff --git a/solr/core/src/test/org/apache/solr/util/TimeZoneUtilsTest.java b/solr/core/src/test/org/apache/solr/util/TimeZoneUtilsTest.java index 9ccbac263f4..37ea1cd4e03 100644 --- a/solr/core/src/test/org/apache/solr/util/TimeZoneUtilsTest.java +++ b/solr/core/src/test/org/apache/solr/util/TimeZoneUtilsTest.java @@ -16,8 +16,8 @@ */ package org.apache.solr.util; -import org.apache.lucene.util.LuceneTestCase; import org.apache.lucene.util.TestUtil; +import org.apache.solr.SolrTestCase; import java.util.Set; import java.util.HashSet; @@ -25,7 +25,7 @@ import java.util.Random; import java.util.TimeZone; import java.util.Locale; -public class TimeZoneUtilsTest extends LuceneTestCase { +public class TimeZoneUtilsTest extends SolrTestCase { private static void assertSameRules(final String label, final TimeZone expected, diff --git a/solr/core/src/test/org/apache/solr/util/hll/BigEndianAscendingWordDeserializerTest.java b/solr/core/src/test/org/apache/solr/util/hll/BigEndianAscendingWordDeserializerTest.java index 4e294288680..5fdde31d85b 100644 --- a/solr/core/src/test/org/apache/solr/util/hll/BigEndianAscendingWordDeserializerTest.java +++ b/solr/core/src/test/org/apache/solr/util/hll/BigEndianAscendingWordDeserializerTest.java @@ -18,7 +18,8 @@ package org.apache.solr.util.hll; import java.util.Random; -import org.apache.lucene.util.LuceneTestCase; + +import org.apache.solr.SolrTestCase; import org.junit.Test; import static com.carrotsearch.randomizedtesting.RandomizedTest.*; @@ -26,7 +27,7 @@ import static com.carrotsearch.randomizedtesting.RandomizedTest.*; /** * Unit and smoke tests for {@link BigEndianAscendingWordDeserializer}. */ -public class BigEndianAscendingWordDeserializerTest extends LuceneTestCase { +public class BigEndianAscendingWordDeserializerTest extends SolrTestCase { /** * Error checking tests for constructor. */ diff --git a/solr/core/src/test/org/apache/solr/util/hll/BigEndianAscendingWordSerializerTest.java b/solr/core/src/test/org/apache/solr/util/hll/BigEndianAscendingWordSerializerTest.java index 05c104980cf..81b93fe5b45 100644 --- a/solr/core/src/test/org/apache/solr/util/hll/BigEndianAscendingWordSerializerTest.java +++ b/solr/core/src/test/org/apache/solr/util/hll/BigEndianAscendingWordSerializerTest.java @@ -18,13 +18,13 @@ package org.apache.solr.util.hll; import java.util.Arrays; -import org.apache.lucene.util.LuceneTestCase; +import org.apache.solr.SolrTestCase; import org.junit.Test; /** * Unit tests for {@link BigEndianAscendingWordSerializer}. */ -public class BigEndianAscendingWordSerializerTest extends LuceneTestCase { +public class BigEndianAscendingWordSerializerTest extends SolrTestCase { /** * Error checking tests for constructor. */ diff --git a/solr/core/src/test/org/apache/solr/util/hll/BitVectorTest.java b/solr/core/src/test/org/apache/solr/util/hll/BitVectorTest.java index c84d817f034..24d9366c3d1 100644 --- a/solr/core/src/test/org/apache/solr/util/hll/BitVectorTest.java +++ b/solr/core/src/test/org/apache/solr/util/hll/BitVectorTest.java @@ -18,14 +18,14 @@ package org.apache.solr.util.hll; import java.util.Locale; -import org.apache.lucene.util.LuceneTestCase; +import org.apache.solr.SolrTestCase; import org.apache.solr.util.LongIterator; import org.junit.Test; /** * Unit tests for {@link BitVector}. */ -public class BitVectorTest extends LuceneTestCase { +public class BitVectorTest extends SolrTestCase { /** * Tests {@link BitVector#getRegister(long)} and {@link BitVector#setRegister(long, long)}. */ diff --git a/solr/core/src/test/org/apache/solr/util/hll/ExplicitHLLTest.java b/solr/core/src/test/org/apache/solr/util/hll/ExplicitHLLTest.java index 02f9a464ad7..ac337a0e5ef 100644 --- a/solr/core/src/test/org/apache/solr/util/hll/ExplicitHLLTest.java +++ b/solr/core/src/test/org/apache/solr/util/hll/ExplicitHLLTest.java @@ -18,7 +18,7 @@ package org.apache.solr.util.hll; import java.util.HashSet; -import org.apache.lucene.util.LuceneTestCase; +import org.apache.solr.SolrTestCase; import org.junit.Test; import com.carrotsearch.hppc.LongHashSet; @@ -28,7 +28,7 @@ import static com.carrotsearch.randomizedtesting.RandomizedTest.*; /** * Tests {@link HLL} of type {@link HLLType#EXPLICIT}. */ -public class ExplicitHLLTest extends LuceneTestCase { +public class ExplicitHLLTest extends SolrTestCase { /** * Tests basic set semantics of {@link HLL#addRaw(long)}. */ diff --git a/solr/core/src/test/org/apache/solr/util/hll/FullHLLTest.java b/solr/core/src/test/org/apache/solr/util/hll/FullHLLTest.java index 6be265654a6..0d2dd8e1988 100644 --- a/solr/core/src/test/org/apache/solr/util/hll/FullHLLTest.java +++ b/solr/core/src/test/org/apache/solr/util/hll/FullHLLTest.java @@ -16,14 +16,14 @@ */ package org.apache.solr.util.hll; -import org.apache.lucene.util.LuceneTestCase; +import org.apache.solr.SolrTestCase; import org.apache.solr.util.LongIterator; import org.junit.Test; /** * Tests {@link HLL} of type {@link HLLType#FULL}. */ -public class FullHLLTest extends LuceneTestCase { +public class FullHLLTest extends SolrTestCase { // TODO union test /** * Smoke test for {@link HLL#cardinality()} and the proper use of the diff --git a/solr/core/src/test/org/apache/solr/util/hll/HLLSerializationTest.java b/solr/core/src/test/org/apache/solr/util/hll/HLLSerializationTest.java index 32b1dac924c..0b76c4f8d15 100644 --- a/solr/core/src/test/org/apache/solr/util/hll/HLLSerializationTest.java +++ b/solr/core/src/test/org/apache/solr/util/hll/HLLSerializationTest.java @@ -16,7 +16,7 @@ */ package org.apache.solr.util.hll; -import org.apache.lucene.util.LuceneTestCase; +import org.apache.solr.SolrTestCase; import org.apache.lucene.util.TestUtil; import org.junit.Test; @@ -35,7 +35,7 @@ import static org.apache.solr.util.hll.HLL.*; /** * Serialization smoke-tests. */ -public class HLLSerializationTest extends LuceneTestCase { +public class HLLSerializationTest extends SolrTestCase { /** * A smoke-test that covers serialization/deserialization of an HLL diff --git a/solr/core/src/test/org/apache/solr/util/hll/HLLUtilTest.java b/solr/core/src/test/org/apache/solr/util/hll/HLLUtilTest.java index c9301b3454c..0e849ae81d0 100644 --- a/solr/core/src/test/org/apache/solr/util/hll/HLLUtilTest.java +++ b/solr/core/src/test/org/apache/solr/util/hll/HLLUtilTest.java @@ -16,13 +16,13 @@ */ package org.apache.solr.util.hll; -import org.apache.lucene.util.LuceneTestCase; +import org.apache.solr.SolrTestCase; import org.junit.Test; /** * Tests {@link HLLUtil} static methods. */ -public class HLLUtilTest extends LuceneTestCase { +public class HLLUtilTest extends SolrTestCase { /** * Tests that {@link HLLUtil#largeEstimatorCutoff(int, int)} is the same * as a trivial implementation. diff --git a/solr/core/src/test/org/apache/solr/util/hll/SparseHLLTest.java b/solr/core/src/test/org/apache/solr/util/hll/SparseHLLTest.java index d99bda1aab2..a22038b0d09 100644 --- a/solr/core/src/test/org/apache/solr/util/hll/SparseHLLTest.java +++ b/solr/core/src/test/org/apache/solr/util/hll/SparseHLLTest.java @@ -16,7 +16,7 @@ */ package org.apache.solr.util.hll; -import org.apache.lucene.util.LuceneTestCase; +import org.apache.solr.SolrTestCase; import org.junit.Test; import com.carrotsearch.hppc.IntByteHashMap; @@ -26,7 +26,7 @@ import com.carrotsearch.randomizedtesting.RandomizedTest; /** * Tests {@link HLL} of type {@link HLLType#SPARSE}. */ -public class SparseHLLTest extends LuceneTestCase { +public class SparseHLLTest extends SolrTestCase { private static final int log2m = 11; /** diff --git a/solr/solrj/src/test/org/apache/solr/client/solrj/CollectionAdminRequestRequiredParamsTest.java b/solr/solrj/src/test/org/apache/solr/client/solrj/CollectionAdminRequestRequiredParamsTest.java index 0dbd1e6499e..1de980ebb0e 100644 --- a/solr/solrj/src/test/org/apache/solr/client/solrj/CollectionAdminRequestRequiredParamsTest.java +++ b/solr/solrj/src/test/org/apache/solr/client/solrj/CollectionAdminRequestRequiredParamsTest.java @@ -22,7 +22,7 @@ import static org.apache.solr.common.params.CollectionAdminParams.FLUSH; import java.util.Iterator; import java.util.Set; -import org.apache.lucene.util.LuceneTestCase; +import org.apache.solr.SolrTestCase; import org.apache.solr.client.solrj.request.CollectionAdminRequest; import org.apache.solr.common.cloud.Replica; import org.apache.solr.common.cloud.ZkStateReader; @@ -37,7 +37,7 @@ import com.google.common.collect.Sets; * Tests that default {@link CollectionAdminRequest#getParams()} returns only * the required parameters of this request, and none other. */ -public class CollectionAdminRequestRequiredParamsTest extends LuceneTestCase { +public class CollectionAdminRequestRequiredParamsTest extends SolrTestCase { public void testBalanceShardUnique() { CollectionAdminRequest.BalanceShardUnique request = CollectionAdminRequest.balanceReplicaProperty("foo","prop"); diff --git a/solr/solrj/src/test/org/apache/solr/client/solrj/SolrExceptionTest.java b/solr/solrj/src/test/org/apache/solr/client/solrj/SolrExceptionTest.java index 70721604bc8..c894a6a251f 100644 --- a/solr/solrj/src/test/org/apache/solr/client/solrj/SolrExceptionTest.java +++ b/solr/solrj/src/test/org/apache/solr/client/solrj/SolrExceptionTest.java @@ -19,7 +19,7 @@ package org.apache.solr.client.solrj; import static org.apache.solr.SolrTestCaseJ4.getHttpSolrClient; import org.apache.http.impl.client.CloseableHttpClient; -import org.apache.lucene.util.LuceneTestCase; +import org.apache.solr.SolrTestCase; import org.apache.solr.client.solrj.impl.HttpClientUtil; import org.apache.solr.client.solrj.impl.HttpSolrClient; import org.junit.Test; @@ -29,7 +29,7 @@ import org.junit.Test; * * @since solr 1.3 */ -public class SolrExceptionTest extends LuceneTestCase { +public class SolrExceptionTest extends SolrTestCase { @Test // commented out on: 24-Dec-2018 @BadApple(bugUrl="https://issues.apache.org/jira/browse/SOLR-12028") // added 20-Sep-2018 diff --git a/solr/solrj/src/test/org/apache/solr/client/solrj/SolrQueryTest.java b/solr/solrj/src/test/org/apache/solr/client/solrj/SolrQueryTest.java index 1c86c93db53..365f2c87e10 100644 --- a/solr/solrj/src/test/org/apache/solr/client/solrj/SolrQueryTest.java +++ b/solr/solrj/src/test/org/apache/solr/client/solrj/SolrQueryTest.java @@ -26,7 +26,7 @@ import java.util.Locale; import java.util.TimeZone; import junit.framework.Assert; -import org.apache.lucene.util.LuceneTestCase; +import org.apache.solr.SolrTestCase; import org.apache.solr.client.solrj.SolrQuery.SortClause; import org.apache.solr.common.params.CommonParams; import org.apache.solr.common.params.FacetParams; @@ -36,7 +36,7 @@ import org.apache.solr.common.params.FacetParams; * * @since solr 1.3 */ -public class SolrQueryTest extends LuceneTestCase { +public class SolrQueryTest extends SolrTestCase { public void testSolrQueryMethods() { SolrQuery q = new SolrQuery("dog"); diff --git a/solr/solrj/src/test/org/apache/solr/client/solrj/beans/TestDocumentObjectBinder.java b/solr/solrj/src/test/org/apache/solr/client/solrj/beans/TestDocumentObjectBinder.java index 94c77d25f5d..e3631b851a4 100644 --- a/solr/solrj/src/test/org/apache/solr/client/solrj/beans/TestDocumentObjectBinder.java +++ b/solr/solrj/src/test/org/apache/solr/client/solrj/beans/TestDocumentObjectBinder.java @@ -16,8 +16,7 @@ */ package org.apache.solr.client.solrj.beans; -import org.apache.lucene.util.LuceneTestCase; - +import org.apache.solr.SolrTestCase; import org.apache.solr.client.solrj.impl.XMLResponseParser; import org.apache.solr.client.solrj.response.QueryResponse; import org.apache.solr.common.SolrDocumentList; @@ -34,7 +33,7 @@ import java.util.List; import java.util.Map; -public class TestDocumentObjectBinder extends LuceneTestCase { +public class TestDocumentObjectBinder extends SolrTestCase { @Test // commented out on: 24-Dec-2018 @BadApple(bugUrl="https://issues.apache.org/jira/browse/SOLR-12028") // added 20-Sep-2018 diff --git a/solr/solrj/src/test/org/apache/solr/client/solrj/impl/CloudHttp2SolrClientBuilderTest.java b/solr/solrj/src/test/org/apache/solr/client/solrj/impl/CloudHttp2SolrClientBuilderTest.java index 72d5e8ceac6..d841333c0a3 100644 --- a/solr/solrj/src/test/org/apache/solr/client/solrj/impl/CloudHttp2SolrClientBuilderTest.java +++ b/solr/solrj/src/test/org/apache/solr/client/solrj/impl/CloudHttp2SolrClientBuilderTest.java @@ -23,10 +23,10 @@ import java.util.Collections; import java.util.List; import java.util.Optional; -import org.apache.lucene.util.LuceneTestCase; +import org.apache.solr.SolrTestCase; import org.junit.Test; -public class CloudHttp2SolrClientBuilderTest extends LuceneTestCase { +public class CloudHttp2SolrClientBuilderTest extends SolrTestCase { private static final String ANY_CHROOT = "/ANY_CHROOT"; private static final String ANY_ZK_HOST = "ANY_ZK_HOST"; private static final String ANY_OTHER_ZK_HOST = "ANY_OTHER_ZK_HOST"; diff --git a/solr/solrj/src/test/org/apache/solr/client/solrj/impl/CloudHttp2SolrClientMultiConstructorTest.java b/solr/solrj/src/test/org/apache/solr/client/solrj/impl/CloudHttp2SolrClientMultiConstructorTest.java index fa3425bfa07..5d3b839dffb 100644 --- a/solr/solrj/src/test/org/apache/solr/client/solrj/impl/CloudHttp2SolrClientMultiConstructorTest.java +++ b/solr/solrj/src/test/org/apache/solr/client/solrj/impl/CloudHttp2SolrClientMultiConstructorTest.java @@ -23,11 +23,11 @@ import java.util.LinkedHashSet; import java.util.List; import java.util.Optional; -import org.apache.lucene.util.LuceneTestCase; import org.apache.lucene.util.TestUtil; +import org.apache.solr.SolrTestCase; import org.junit.Test; -public class CloudHttp2SolrClientMultiConstructorTest extends LuceneTestCase { +public class CloudHttp2SolrClientMultiConstructorTest extends SolrTestCase { /* * NOTE: If you only include one String argument, it will NOT use the diff --git a/solr/solrj/src/test/org/apache/solr/client/solrj/impl/CloudSolrClientBuilderTest.java b/solr/solrj/src/test/org/apache/solr/client/solrj/impl/CloudSolrClientBuilderTest.java index c8729f506a5..4051b85f9c7 100644 --- a/solr/solrj/src/test/org/apache/solr/client/solrj/impl/CloudSolrClientBuilderTest.java +++ b/solr/solrj/src/test/org/apache/solr/client/solrj/impl/CloudSolrClientBuilderTest.java @@ -23,11 +23,11 @@ import java.util.Collections; import java.util.List; import java.util.Optional; -import org.apache.lucene.util.LuceneTestCase; +import org.apache.solr.SolrTestCase; import org.apache.solr.client.solrj.impl.CloudSolrClient.Builder; import org.junit.Test; -public class CloudSolrClientBuilderTest extends LuceneTestCase { +public class CloudSolrClientBuilderTest extends SolrTestCase { private static final String ANY_CHROOT = "/ANY_CHROOT"; private static final String ANY_ZK_HOST = "ANY_ZK_HOST"; private static final String ANY_OTHER_ZK_HOST = "ANY_OTHER_ZK_HOST"; diff --git a/solr/solrj/src/test/org/apache/solr/client/solrj/impl/CloudSolrClientMultiConstructorTest.java b/solr/solrj/src/test/org/apache/solr/client/solrj/impl/CloudSolrClientMultiConstructorTest.java index 3e6a22a47aa..eee514d86c4 100644 --- a/solr/solrj/src/test/org/apache/solr/client/solrj/impl/CloudSolrClientMultiConstructorTest.java +++ b/solr/solrj/src/test/org/apache/solr/client/solrj/impl/CloudSolrClientMultiConstructorTest.java @@ -23,11 +23,11 @@ import java.util.LinkedHashSet; import java.util.List; import java.util.Optional; -import org.apache.lucene.util.LuceneTestCase; +import org.apache.solr.SolrTestCase; import org.apache.lucene.util.TestUtil; import org.junit.Test; -public class CloudSolrClientMultiConstructorTest extends LuceneTestCase { +public class CloudSolrClientMultiConstructorTest extends SolrTestCase { /* * NOTE: If you only include one String argument, it will NOT use the diff --git a/solr/solrj/src/test/org/apache/solr/client/solrj/impl/ConcurrentUpdateSolrClientBuilderTest.java b/solr/solrj/src/test/org/apache/solr/client/solrj/impl/ConcurrentUpdateSolrClientBuilderTest.java index 30769da10dd..af120fc600a 100644 --- a/solr/solrj/src/test/org/apache/solr/client/solrj/impl/ConcurrentUpdateSolrClientBuilderTest.java +++ b/solr/solrj/src/test/org/apache/solr/client/solrj/impl/ConcurrentUpdateSolrClientBuilderTest.java @@ -17,14 +17,14 @@ package org.apache.solr.client.solrj.impl; -import org.apache.lucene.util.LuceneTestCase; +import org.apache.solr.SolrTestCase; import org.apache.solr.client.solrj.impl.ConcurrentUpdateSolrClient.Builder; import org.junit.Test; /** * Unit tests for {@link Builder}. */ -public class ConcurrentUpdateSolrClientBuilderTest extends LuceneTestCase { +public class ConcurrentUpdateSolrClientBuilderTest extends SolrTestCase { @Test(expected = IllegalArgumentException.class) public void testRejectsMissingBaseSolrUrl() { diff --git a/solr/solrj/src/test/org/apache/solr/client/solrj/impl/HttpClientUtilTest.java b/solr/solrj/src/test/org/apache/solr/client/solrj/impl/HttpClientUtilTest.java index 4e3ae44805f..b6dcf57aa0d 100644 --- a/solr/solrj/src/test/org/apache/solr/client/solrj/impl/HttpClientUtilTest.java +++ b/solr/solrj/src/test/org/apache/solr/client/solrj/impl/HttpClientUtilTest.java @@ -19,6 +19,7 @@ package org.apache.solr.client.solrj.impl; import javax.net.ssl.HostnameVerifier; import java.io.IOException; +import org.apache.solr.SolrTestCase; import org.apache.solr.client.solrj.impl.HttpClientUtil.SchemaRegistryProvider; import org.apache.commons.lang.reflect.FieldUtils; @@ -26,7 +27,6 @@ import org.apache.http.conn.socket.ConnectionSocketFactory; import org.apache.http.conn.ssl.DefaultHostnameVerifier; import org.apache.http.conn.ssl.NoopHostnameVerifier; import org.apache.http.conn.ssl.SSLConnectionSocketFactory; -import org.apache.lucene.util.LuceneTestCase; import org.apache.lucene.util.TestRuleRestoreSystemProperties; import org.junit.After; @@ -34,12 +34,12 @@ import org.junit.Rule; import org.junit.rules.TestRule; import org.junit.Test; -public class HttpClientUtilTest extends LuceneTestCase { +public class HttpClientUtilTest extends SolrTestCase { @Rule public TestRule syspropRestore = new TestRuleRestoreSystemProperties (HttpClientUtil.SYS_PROP_CHECK_PEER_NAME); - + @After public void resetHttpClientBuilder() { HttpClientUtil.resetHttpClientBuilder(); @@ -48,7 +48,7 @@ public class HttpClientUtilTest extends LuceneTestCase { @Test // commented out on: 24-Dec-2018 @BadApple(bugUrl="https://issues.apache.org/jira/browse/SOLR-12028") // added 20-Sep-2018 public void testSSLSystemProperties() throws IOException { - + assertNotNull("HTTPS scheme could not be created using system defaults", HttpClientUtil.getSchemaRegisteryProvider().getSchemaRegistry().lookup("https")); diff --git a/solr/solrj/src/test/org/apache/solr/client/solrj/impl/HttpSolrClientBuilderTest.java b/solr/solrj/src/test/org/apache/solr/client/solrj/impl/HttpSolrClientBuilderTest.java index a42e82083da..7b93af567da 100644 --- a/solr/solrj/src/test/org/apache/solr/client/solrj/impl/HttpSolrClientBuilderTest.java +++ b/solr/solrj/src/test/org/apache/solr/client/solrj/impl/HttpSolrClientBuilderTest.java @@ -21,7 +21,7 @@ import java.io.IOException; import org.apache.http.client.HttpClient; import org.apache.http.impl.client.HttpClientBuilder; -import org.apache.lucene.util.LuceneTestCase; +import org.apache.solr.SolrTestCase; import org.apache.solr.client.solrj.ResponseParser; import org.apache.solr.client.solrj.impl.HttpSolrClient.Builder; import org.junit.Test; @@ -29,7 +29,7 @@ import org.junit.Test; /** * Unit tests for {@link Builder}. */ -public class HttpSolrClientBuilderTest extends LuceneTestCase { +public class HttpSolrClientBuilderTest extends SolrTestCase { private static final String ANY_BASE_SOLR_URL = "ANY_BASE_SOLR_URL"; private static final HttpClient ANY_HTTP_CLIENT = HttpClientBuilder.create().build(); private static final ResponseParser ANY_RESPONSE_PARSER = new NoOpResponseParser(); diff --git a/solr/solrj/src/test/org/apache/solr/client/solrj/impl/LBHttpSolrClientBuilderTest.java b/solr/solrj/src/test/org/apache/solr/client/solrj/impl/LBHttpSolrClientBuilderTest.java index 83870d0a723..0319437c35f 100644 --- a/solr/solrj/src/test/org/apache/solr/client/solrj/impl/LBHttpSolrClientBuilderTest.java +++ b/solr/solrj/src/test/org/apache/solr/client/solrj/impl/LBHttpSolrClientBuilderTest.java @@ -19,7 +19,7 @@ package org.apache.solr.client.solrj.impl; import org.apache.http.client.HttpClient; import org.apache.http.impl.client.HttpClientBuilder; -import org.apache.lucene.util.LuceneTestCase; +import org.apache.solr.SolrTestCase; import org.apache.solr.client.solrj.impl.LBHttpSolrClient.Builder; import org.apache.solr.client.solrj.ResponseParser; import org.junit.Test; @@ -27,7 +27,7 @@ import org.junit.Test; /** * Unit tests for {@link Builder}. */ -public class LBHttpSolrClientBuilderTest extends LuceneTestCase { +public class LBHttpSolrClientBuilderTest extends SolrTestCase { private static final String ANY_BASE_SOLR_URL = "ANY_BASE_SOLR_URL"; private static final HttpClient ANY_HTTP_CLIENT = HttpClientBuilder.create().build(); private static final ResponseParser ANY_RESPONSE_PARSER = new NoOpResponseParser(); diff --git a/solr/solrj/src/test/org/apache/solr/client/solrj/io/TestLang.java b/solr/solrj/src/test/org/apache/solr/client/solrj/io/TestLang.java index 2e6fe38146c..da155fbc554 100644 --- a/solr/solrj/src/test/org/apache/solr/client/solrj/io/TestLang.java +++ b/solr/solrj/src/test/org/apache/solr/client/solrj/io/TestLang.java @@ -24,6 +24,7 @@ import java.util.Set; import org.apache.lucene.util.LuceneTestCase; import org.apache.lucene.util.LuceneTestCase.Slow; +import org.apache.solr.SolrTestCase; import org.apache.solr.client.solrj.io.eval.*; import org.apache.solr.client.solrj.io.stream.expr.Expressible; import org.apache.solr.client.solrj.io.stream.expr.StreamFactory; @@ -33,7 +34,7 @@ import org.junit.Test; @Slow @LuceneTestCase.SuppressCodecs({"Lucene3x", "Lucene40","Lucene41","Lucene42","Lucene45"}) -public class TestLang extends LuceneTestCase { +public class TestLang extends SolrTestCase { private static final String[] allFunctions = { "search", "facet", "update", "jdbc", "topic", "commit", "random", "knnSearch", "merge", diff --git a/solr/solrj/src/test/org/apache/solr/client/solrj/io/stream/StreamExpressionToExpessionTest.java b/solr/solrj/src/test/org/apache/solr/client/solrj/io/stream/StreamExpressionToExpessionTest.java index 3fb601411f3..e71c769208a 100644 --- a/solr/solrj/src/test/org/apache/solr/client/solrj/io/stream/StreamExpressionToExpessionTest.java +++ b/solr/solrj/src/test/org/apache/solr/client/solrj/io/stream/StreamExpressionToExpessionTest.java @@ -16,7 +16,7 @@ */ package org.apache.solr.client.solrj.io.stream; -import org.apache.lucene.util.LuceneTestCase; +import org.apache.solr.SolrTestCase; import org.apache.solr.client.solrj.io.ops.GroupOperation; import org.apache.solr.client.solrj.io.stream.expr.StreamExpression; import org.apache.solr.client.solrj.io.stream.expr.StreamExpressionParser; @@ -32,7 +32,7 @@ import org.junit.Test; /** **/ -public class StreamExpressionToExpessionTest extends LuceneTestCase { +public class StreamExpressionToExpessionTest extends SolrTestCase { private StreamFactory factory; diff --git a/solr/solrj/src/test/org/apache/solr/client/solrj/io/stream/StreamExpressionToExplanationTest.java b/solr/solrj/src/test/org/apache/solr/client/solrj/io/stream/StreamExpressionToExplanationTest.java index b7307e44639..48f6f32a562 100644 --- a/solr/solrj/src/test/org/apache/solr/client/solrj/io/stream/StreamExpressionToExplanationTest.java +++ b/solr/solrj/src/test/org/apache/solr/client/solrj/io/stream/StreamExpressionToExplanationTest.java @@ -17,7 +17,7 @@ package org.apache.solr.client.solrj.io.stream; import junit.framework.Assert; -import org.apache.lucene.util.LuceneTestCase; +import org.apache.solr.SolrTestCase; import org.apache.solr.client.solrj.io.ops.GroupOperation; import org.apache.solr.client.solrj.io.stream.expr.Explanation; import org.apache.solr.client.solrj.io.stream.expr.StreamExplanation; @@ -34,7 +34,7 @@ import org.junit.Test; /** **/ -public class StreamExpressionToExplanationTest extends LuceneTestCase { +public class StreamExpressionToExplanationTest extends SolrTestCase { private StreamFactory factory; diff --git a/solr/solrj/src/test/org/apache/solr/client/solrj/io/stream/eval/AbsoluteValueEvaluatorTest.java b/solr/solrj/src/test/org/apache/solr/client/solrj/io/stream/eval/AbsoluteValueEvaluatorTest.java index ff216f98d93..f98ac71a860 100644 --- a/solr/solrj/src/test/org/apache/solr/client/solrj/io/stream/eval/AbsoluteValueEvaluatorTest.java +++ b/solr/solrj/src/test/org/apache/solr/client/solrj/io/stream/eval/AbsoluteValueEvaluatorTest.java @@ -20,7 +20,7 @@ import java.io.IOException; import java.util.HashMap; import java.util.Map; -import org.apache.lucene.util.LuceneTestCase; +import org.apache.solr.SolrTestCase; import org.apache.solr.client.solrj.io.Tuple; import org.apache.solr.client.solrj.io.eval.AbsoluteValueEvaluator; import org.apache.solr.client.solrj.io.eval.AddEvaluator; @@ -31,7 +31,7 @@ import org.junit.Test; import junit.framework.Assert; -public class AbsoluteValueEvaluatorTest extends LuceneTestCase { +public class AbsoluteValueEvaluatorTest extends SolrTestCase { StreamFactory factory; Map values; diff --git a/solr/solrj/src/test/org/apache/solr/client/solrj/io/stream/eval/AddEvaluatorTest.java b/solr/solrj/src/test/org/apache/solr/client/solrj/io/stream/eval/AddEvaluatorTest.java index b49e75712b1..3b85953b9ba 100644 --- a/solr/solrj/src/test/org/apache/solr/client/solrj/io/stream/eval/AddEvaluatorTest.java +++ b/solr/solrj/src/test/org/apache/solr/client/solrj/io/stream/eval/AddEvaluatorTest.java @@ -20,7 +20,7 @@ import java.io.IOException; import java.util.HashMap; import java.util.Map; -import org.apache.lucene.util.LuceneTestCase; +import org.apache.solr.SolrTestCase; import org.apache.solr.client.solrj.io.Tuple; import org.apache.solr.client.solrj.io.eval.AddEvaluator; import org.apache.solr.client.solrj.io.eval.StreamEvaluator; @@ -29,7 +29,7 @@ import org.junit.Test; import junit.framework.Assert; -public class AddEvaluatorTest extends LuceneTestCase { +public class AddEvaluatorTest extends SolrTestCase { StreamFactory factory; Map values; diff --git a/solr/solrj/src/test/org/apache/solr/client/solrj/io/stream/eval/AndEvaluatorTest.java b/solr/solrj/src/test/org/apache/solr/client/solrj/io/stream/eval/AndEvaluatorTest.java index 4e94758cd6e..b28b4b6ed76 100644 --- a/solr/solrj/src/test/org/apache/solr/client/solrj/io/stream/eval/AndEvaluatorTest.java +++ b/solr/solrj/src/test/org/apache/solr/client/solrj/io/stream/eval/AndEvaluatorTest.java @@ -19,7 +19,7 @@ package org.apache.solr.client.solrj.io.stream.eval; import java.util.HashMap; import java.util.Map; -import org.apache.lucene.util.LuceneTestCase; +import org.apache.solr.SolrTestCase; import org.apache.solr.client.solrj.io.Tuple; import org.apache.solr.client.solrj.io.eval.AndEvaluator; import org.apache.solr.client.solrj.io.eval.StreamEvaluator; @@ -28,7 +28,7 @@ import org.junit.Test; import junit.framework.Assert; -public class AndEvaluatorTest extends LuceneTestCase { +public class AndEvaluatorTest extends SolrTestCase { StreamFactory factory; Map values; diff --git a/solr/solrj/src/test/org/apache/solr/client/solrj/io/stream/eval/AppendEvaluatorTest.java b/solr/solrj/src/test/org/apache/solr/client/solrj/io/stream/eval/AppendEvaluatorTest.java index d63a450cc6d..a34d5cca34c 100644 --- a/solr/solrj/src/test/org/apache/solr/client/solrj/io/stream/eval/AppendEvaluatorTest.java +++ b/solr/solrj/src/test/org/apache/solr/client/solrj/io/stream/eval/AppendEvaluatorTest.java @@ -21,7 +21,7 @@ import java.util.HashMap; import java.util.List; import java.util.Map; -import org.apache.lucene.util.LuceneTestCase; +import org.apache.solr.SolrTestCase; import org.apache.solr.client.solrj.io.Tuple; import org.apache.solr.client.solrj.io.eval.AppendEvaluator; import org.apache.solr.client.solrj.io.eval.StreamEvaluator; @@ -30,7 +30,7 @@ import org.junit.Test; import junit.framework.Assert; -public class AppendEvaluatorTest extends LuceneTestCase { +public class AppendEvaluatorTest extends SolrTestCase { StreamFactory factory; Map values; diff --git a/solr/solrj/src/test/org/apache/solr/client/solrj/io/stream/eval/ArcCosineEvaluatorTest.java b/solr/solrj/src/test/org/apache/solr/client/solrj/io/stream/eval/ArcCosineEvaluatorTest.java index a8b42e3f992..a0fb968d1c5 100644 --- a/solr/solrj/src/test/org/apache/solr/client/solrj/io/stream/eval/ArcCosineEvaluatorTest.java +++ b/solr/solrj/src/test/org/apache/solr/client/solrj/io/stream/eval/ArcCosineEvaluatorTest.java @@ -20,7 +20,7 @@ import java.io.IOException; import java.util.HashMap; import java.util.Map; -import org.apache.lucene.util.LuceneTestCase; +import org.apache.solr.SolrTestCase; import org.apache.solr.client.solrj.io.Tuple; import org.apache.solr.client.solrj.io.eval.ArcCosineEvaluator; import org.apache.solr.client.solrj.io.eval.StreamEvaluator; @@ -29,7 +29,7 @@ import org.junit.Test; import junit.framework.Assert; -public class ArcCosineEvaluatorTest extends LuceneTestCase { +public class ArcCosineEvaluatorTest extends SolrTestCase { StreamFactory factory; Map values; diff --git a/solr/solrj/src/test/org/apache/solr/client/solrj/io/stream/eval/ArcSineEvaluatorTest.java b/solr/solrj/src/test/org/apache/solr/client/solrj/io/stream/eval/ArcSineEvaluatorTest.java index 5b8d9ad636a..23808f2a951 100644 --- a/solr/solrj/src/test/org/apache/solr/client/solrj/io/stream/eval/ArcSineEvaluatorTest.java +++ b/solr/solrj/src/test/org/apache/solr/client/solrj/io/stream/eval/ArcSineEvaluatorTest.java @@ -20,7 +20,7 @@ import java.io.IOException; import java.util.HashMap; import java.util.Map; -import org.apache.lucene.util.LuceneTestCase; +import org.apache.solr.SolrTestCase; import org.apache.solr.client.solrj.io.Tuple; import org.apache.solr.client.solrj.io.eval.ArcSineEvaluator; import org.apache.solr.client.solrj.io.eval.StreamEvaluator; @@ -29,7 +29,7 @@ import org.junit.Test; import junit.framework.Assert; -public class ArcSineEvaluatorTest extends LuceneTestCase { +public class ArcSineEvaluatorTest extends SolrTestCase { StreamFactory factory; Map values; diff --git a/solr/solrj/src/test/org/apache/solr/client/solrj/io/stream/eval/ArcTangentEvaluatorTest.java b/solr/solrj/src/test/org/apache/solr/client/solrj/io/stream/eval/ArcTangentEvaluatorTest.java index 4fea2db1395..07c28f26a23 100644 --- a/solr/solrj/src/test/org/apache/solr/client/solrj/io/stream/eval/ArcTangentEvaluatorTest.java +++ b/solr/solrj/src/test/org/apache/solr/client/solrj/io/stream/eval/ArcTangentEvaluatorTest.java @@ -20,7 +20,7 @@ import java.io.IOException; import java.util.HashMap; import java.util.Map; -import org.apache.lucene.util.LuceneTestCase; +import org.apache.solr.SolrTestCase; import org.apache.solr.client.solrj.io.Tuple; import org.apache.solr.client.solrj.io.eval.ArcTangentEvaluator; import org.apache.solr.client.solrj.io.eval.StreamEvaluator; @@ -29,7 +29,7 @@ import org.junit.Test; import junit.framework.Assert; -public class ArcTangentEvaluatorTest extends LuceneTestCase { +public class ArcTangentEvaluatorTest extends SolrTestCase { StreamFactory factory; Map values; diff --git a/solr/solrj/src/test/org/apache/solr/client/solrj/io/stream/eval/ArrayEvaluatorTest.java b/solr/solrj/src/test/org/apache/solr/client/solrj/io/stream/eval/ArrayEvaluatorTest.java index 36e5e7829c6..8b2b35f64a9 100644 --- a/solr/solrj/src/test/org/apache/solr/client/solrj/io/stream/eval/ArrayEvaluatorTest.java +++ b/solr/solrj/src/test/org/apache/solr/client/solrj/io/stream/eval/ArrayEvaluatorTest.java @@ -21,7 +21,7 @@ import java.util.HashMap; import java.util.List; import java.util.Map; -import org.apache.lucene.util.LuceneTestCase; +import org.apache.solr.SolrTestCase; import org.apache.solr.client.solrj.io.Tuple; import org.apache.solr.client.solrj.io.eval.ArrayEvaluator; import org.apache.solr.client.solrj.io.eval.StreamEvaluator; @@ -31,7 +31,7 @@ import org.junit.Test; import junit.framework.Assert; -public class ArrayEvaluatorTest extends LuceneTestCase { +public class ArrayEvaluatorTest extends SolrTestCase { StreamFactory factory; Map values; diff --git a/solr/solrj/src/test/org/apache/solr/client/solrj/io/stream/eval/AscEvaluatorTest.java b/solr/solrj/src/test/org/apache/solr/client/solrj/io/stream/eval/AscEvaluatorTest.java index d9d44931619..bb64248ec44 100644 --- a/solr/solrj/src/test/org/apache/solr/client/solrj/io/stream/eval/AscEvaluatorTest.java +++ b/solr/solrj/src/test/org/apache/solr/client/solrj/io/stream/eval/AscEvaluatorTest.java @@ -21,7 +21,7 @@ import java.util.HashMap; import java.util.List; import java.util.Map; -import org.apache.lucene.util.LuceneTestCase; +import org.apache.solr.SolrTestCase; import org.apache.solr.client.solrj.io.Tuple; import org.apache.solr.client.solrj.io.eval.AscEvaluator; import org.apache.solr.client.solrj.io.eval.StreamEvaluator; @@ -30,7 +30,7 @@ import org.junit.Test; import junit.framework.Assert; -public class AscEvaluatorTest extends LuceneTestCase { +public class AscEvaluatorTest extends SolrTestCase { StreamFactory factory; Map values; diff --git a/solr/solrj/src/test/org/apache/solr/client/solrj/io/stream/eval/CeilingEvaluatorTest.java b/solr/solrj/src/test/org/apache/solr/client/solrj/io/stream/eval/CeilingEvaluatorTest.java index ef023564d84..38c494a99bd 100644 --- a/solr/solrj/src/test/org/apache/solr/client/solrj/io/stream/eval/CeilingEvaluatorTest.java +++ b/solr/solrj/src/test/org/apache/solr/client/solrj/io/stream/eval/CeilingEvaluatorTest.java @@ -20,7 +20,7 @@ import java.io.IOException; import java.util.HashMap; import java.util.Map; -import org.apache.lucene.util.LuceneTestCase; +import org.apache.solr.SolrTestCase; import org.apache.solr.client.solrj.io.Tuple; import org.apache.solr.client.solrj.io.eval.CeilingEvaluator; import org.apache.solr.client.solrj.io.eval.StreamEvaluator; @@ -29,7 +29,7 @@ import org.junit.Test; import junit.framework.Assert; -public class CeilingEvaluatorTest extends LuceneTestCase { +public class CeilingEvaluatorTest extends SolrTestCase { StreamFactory factory; Map values; diff --git a/solr/solrj/src/test/org/apache/solr/client/solrj/io/stream/eval/CoalesceEvaluatorTest.java b/solr/solrj/src/test/org/apache/solr/client/solrj/io/stream/eval/CoalesceEvaluatorTest.java index dc0b93bcd07..e0569d14b82 100644 --- a/solr/solrj/src/test/org/apache/solr/client/solrj/io/stream/eval/CoalesceEvaluatorTest.java +++ b/solr/solrj/src/test/org/apache/solr/client/solrj/io/stream/eval/CoalesceEvaluatorTest.java @@ -19,7 +19,7 @@ package org.apache.solr.client.solrj.io.stream.eval; import java.util.HashMap; import java.util.Map; -import org.apache.lucene.util.LuceneTestCase; +import org.apache.solr.SolrTestCase; import org.apache.solr.client.solrj.io.Tuple; import org.apache.solr.client.solrj.io.eval.CoalesceEvaluator; import org.apache.solr.client.solrj.io.eval.StreamEvaluator; @@ -28,7 +28,7 @@ import org.junit.Test; import junit.framework.Assert; -public class CoalesceEvaluatorTest extends LuceneTestCase { +public class CoalesceEvaluatorTest extends SolrTestCase { StreamFactory factory; Map values; diff --git a/solr/solrj/src/test/org/apache/solr/client/solrj/io/stream/eval/CorrelationEvaluatorTest.java b/solr/solrj/src/test/org/apache/solr/client/solrj/io/stream/eval/CorrelationEvaluatorTest.java index d915d21dffa..947b4478d07 100644 --- a/solr/solrj/src/test/org/apache/solr/client/solrj/io/stream/eval/CorrelationEvaluatorTest.java +++ b/solr/solrj/src/test/org/apache/solr/client/solrj/io/stream/eval/CorrelationEvaluatorTest.java @@ -21,7 +21,7 @@ import java.util.HashMap; import java.util.Map; import org.apache.commons.math3.stat.correlation.PearsonsCorrelation; -import org.apache.lucene.util.LuceneTestCase; +import org.apache.solr.SolrTestCase; import org.apache.solr.client.solrj.io.Tuple; import org.apache.solr.client.solrj.io.eval.CorrelationEvaluator; import org.apache.solr.client.solrj.io.stream.expr.StreamFactory; @@ -29,7 +29,7 @@ import org.junit.Test; import junit.framework.Assert; -public class CorrelationEvaluatorTest extends LuceneTestCase { +public class CorrelationEvaluatorTest extends SolrTestCase { StreamFactory factory; Map values; diff --git a/solr/solrj/src/test/org/apache/solr/client/solrj/io/stream/eval/CosineEvaluatorTest.java b/solr/solrj/src/test/org/apache/solr/client/solrj/io/stream/eval/CosineEvaluatorTest.java index 5f6ab8c283d..f5e9c6d5cb2 100644 --- a/solr/solrj/src/test/org/apache/solr/client/solrj/io/stream/eval/CosineEvaluatorTest.java +++ b/solr/solrj/src/test/org/apache/solr/client/solrj/io/stream/eval/CosineEvaluatorTest.java @@ -20,7 +20,7 @@ import java.io.IOException; import java.util.HashMap; import java.util.Map; -import org.apache.lucene.util.LuceneTestCase; +import org.apache.solr.SolrTestCase; import org.apache.solr.client.solrj.io.Tuple; import org.apache.solr.client.solrj.io.eval.CosineEvaluator; import org.apache.solr.client.solrj.io.eval.StreamEvaluator; @@ -29,7 +29,7 @@ import org.junit.Test; import junit.framework.Assert; -public class CosineEvaluatorTest extends LuceneTestCase { +public class CosineEvaluatorTest extends SolrTestCase { StreamFactory factory; Map values; diff --git a/solr/solrj/src/test/org/apache/solr/client/solrj/io/stream/eval/CubedRootEvaluatorTest.java b/solr/solrj/src/test/org/apache/solr/client/solrj/io/stream/eval/CubedRootEvaluatorTest.java index 2919d55d546..2d112ae6aa6 100644 --- a/solr/solrj/src/test/org/apache/solr/client/solrj/io/stream/eval/CubedRootEvaluatorTest.java +++ b/solr/solrj/src/test/org/apache/solr/client/solrj/io/stream/eval/CubedRootEvaluatorTest.java @@ -20,7 +20,7 @@ import java.io.IOException; import java.util.HashMap; import java.util.Map; -import org.apache.lucene.util.LuceneTestCase; +import org.apache.solr.SolrTestCase; import org.apache.solr.client.solrj.io.Tuple; import org.apache.solr.client.solrj.io.eval.CubedRootEvaluator; import org.apache.solr.client.solrj.io.eval.StreamEvaluator; @@ -29,7 +29,7 @@ import org.junit.Test; import junit.framework.Assert; -public class CubedRootEvaluatorTest extends LuceneTestCase { +public class CubedRootEvaluatorTest extends SolrTestCase { StreamFactory factory; Map values; diff --git a/solr/solrj/src/test/org/apache/solr/client/solrj/io/stream/eval/CumulativeProbabilityEvaluatorTest.java b/solr/solrj/src/test/org/apache/solr/client/solrj/io/stream/eval/CumulativeProbabilityEvaluatorTest.java index 5ad165fceea..1d9642fa892 100644 --- a/solr/solrj/src/test/org/apache/solr/client/solrj/io/stream/eval/CumulativeProbabilityEvaluatorTest.java +++ b/solr/solrj/src/test/org/apache/solr/client/solrj/io/stream/eval/CumulativeProbabilityEvaluatorTest.java @@ -21,7 +21,7 @@ import java.util.HashMap; import java.util.Map; import org.apache.commons.math3.distribution.NormalDistribution; -import org.apache.lucene.util.LuceneTestCase; +import org.apache.solr.SolrTestCase; import org.apache.solr.client.solrj.io.Tuple; import org.apache.solr.client.solrj.io.eval.CumulativeProbabilityEvaluator; import org.apache.solr.client.solrj.io.eval.NormalDistributionEvaluator; @@ -30,7 +30,7 @@ import org.junit.Test; import junit.framework.Assert; -public class CumulativeProbabilityEvaluatorTest extends LuceneTestCase { +public class CumulativeProbabilityEvaluatorTest extends SolrTestCase { StreamFactory factory; Map values; diff --git a/solr/solrj/src/test/org/apache/solr/client/solrj/io/stream/eval/DivideEvaluatorTest.java b/solr/solrj/src/test/org/apache/solr/client/solrj/io/stream/eval/DivideEvaluatorTest.java index b33c89626bf..60d93ac93b0 100644 --- a/solr/solrj/src/test/org/apache/solr/client/solrj/io/stream/eval/DivideEvaluatorTest.java +++ b/solr/solrj/src/test/org/apache/solr/client/solrj/io/stream/eval/DivideEvaluatorTest.java @@ -20,7 +20,7 @@ import java.io.IOException; import java.util.HashMap; import java.util.Map; -import org.apache.lucene.util.LuceneTestCase; +import org.apache.solr.SolrTestCase; import org.apache.solr.client.solrj.io.Tuple; import org.apache.solr.client.solrj.io.eval.DivideEvaluator; import org.apache.solr.client.solrj.io.eval.StreamEvaluator; @@ -29,7 +29,7 @@ import org.junit.Test; import junit.framework.Assert; -public class DivideEvaluatorTest extends LuceneTestCase { +public class DivideEvaluatorTest extends SolrTestCase { StreamFactory factory; Map values; diff --git a/solr/solrj/src/test/org/apache/solr/client/solrj/io/stream/eval/EmpiricalDistributionEvaluatorTest.java b/solr/solrj/src/test/org/apache/solr/client/solrj/io/stream/eval/EmpiricalDistributionEvaluatorTest.java index 5b2414edbd0..06c8413d700 100644 --- a/solr/solrj/src/test/org/apache/solr/client/solrj/io/stream/eval/EmpiricalDistributionEvaluatorTest.java +++ b/solr/solrj/src/test/org/apache/solr/client/solrj/io/stream/eval/EmpiricalDistributionEvaluatorTest.java @@ -21,7 +21,7 @@ import java.util.HashMap; import java.util.Map; import org.apache.commons.math3.random.EmpiricalDistribution; -import org.apache.lucene.util.LuceneTestCase; +import org.apache.solr.SolrTestCase; import org.apache.solr.client.solrj.io.Tuple; import org.apache.solr.client.solrj.io.eval.EmpiricalDistributionEvaluator; import org.apache.solr.client.solrj.io.stream.expr.StreamFactory; @@ -29,7 +29,7 @@ import org.junit.Test; import junit.framework.Assert; -public class EmpiricalDistributionEvaluatorTest extends LuceneTestCase { +public class EmpiricalDistributionEvaluatorTest extends SolrTestCase { StreamFactory factory; Map values; diff --git a/solr/solrj/src/test/org/apache/solr/client/solrj/io/stream/eval/EqualToEvaluatorTest.java b/solr/solrj/src/test/org/apache/solr/client/solrj/io/stream/eval/EqualToEvaluatorTest.java index 996b0e4df0a..6cdbfcfd769 100644 --- a/solr/solrj/src/test/org/apache/solr/client/solrj/io/stream/eval/EqualToEvaluatorTest.java +++ b/solr/solrj/src/test/org/apache/solr/client/solrj/io/stream/eval/EqualToEvaluatorTest.java @@ -20,7 +20,7 @@ import java.io.IOException; import java.util.HashMap; import java.util.Map; -import org.apache.lucene.util.LuceneTestCase; +import org.apache.solr.SolrTestCase; import org.apache.solr.client.solrj.io.Tuple; import org.apache.solr.client.solrj.io.eval.EqualToEvaluator; import org.apache.solr.client.solrj.io.eval.RawValueEvaluator; @@ -30,7 +30,7 @@ import org.junit.Test; import junit.framework.Assert; -public class EqualToEvaluatorTest extends LuceneTestCase { +public class EqualToEvaluatorTest extends SolrTestCase { StreamFactory factory; Map values; diff --git a/solr/solrj/src/test/org/apache/solr/client/solrj/io/stream/eval/ExclusiveOrEvaluatorTest.java b/solr/solrj/src/test/org/apache/solr/client/solrj/io/stream/eval/ExclusiveOrEvaluatorTest.java index 659bfdd85cb..d63ca6a4646 100644 --- a/solr/solrj/src/test/org/apache/solr/client/solrj/io/stream/eval/ExclusiveOrEvaluatorTest.java +++ b/solr/solrj/src/test/org/apache/solr/client/solrj/io/stream/eval/ExclusiveOrEvaluatorTest.java @@ -19,7 +19,7 @@ package org.apache.solr.client.solrj.io.stream.eval; import java.util.HashMap; import java.util.Map; -import org.apache.lucene.util.LuceneTestCase; +import org.apache.solr.SolrTestCase; import org.apache.solr.client.solrj.io.Tuple; import org.apache.solr.client.solrj.io.eval.ExclusiveOrEvaluator; import org.apache.solr.client.solrj.io.eval.StreamEvaluator; @@ -28,7 +28,7 @@ import org.junit.Test; import junit.framework.Assert; -public class ExclusiveOrEvaluatorTest extends LuceneTestCase { +public class ExclusiveOrEvaluatorTest extends SolrTestCase { StreamFactory factory; Map values; diff --git a/solr/solrj/src/test/org/apache/solr/client/solrj/io/stream/eval/FieldValueEvaluatorTest.java b/solr/solrj/src/test/org/apache/solr/client/solrj/io/stream/eval/FieldValueEvaluatorTest.java index d432ff359a1..f87c7f9b057 100644 --- a/solr/solrj/src/test/org/apache/solr/client/solrj/io/stream/eval/FieldValueEvaluatorTest.java +++ b/solr/solrj/src/test/org/apache/solr/client/solrj/io/stream/eval/FieldValueEvaluatorTest.java @@ -22,14 +22,14 @@ import java.util.HashMap; import java.util.Map; import java.util.PriorityQueue; -import org.apache.lucene.util.LuceneTestCase; +import org.apache.solr.SolrTestCase; import org.apache.solr.client.solrj.io.Tuple; import org.apache.solr.client.solrj.io.eval.FieldValueEvaluator; import org.junit.Test; import junit.framework.Assert; -public class FieldValueEvaluatorTest extends LuceneTestCase { +public class FieldValueEvaluatorTest extends SolrTestCase { Map values; diff --git a/solr/solrj/src/test/org/apache/solr/client/solrj/io/stream/eval/FloorEvaluatorTest.java b/solr/solrj/src/test/org/apache/solr/client/solrj/io/stream/eval/FloorEvaluatorTest.java index 1eabb15a5e7..43203083f4a 100644 --- a/solr/solrj/src/test/org/apache/solr/client/solrj/io/stream/eval/FloorEvaluatorTest.java +++ b/solr/solrj/src/test/org/apache/solr/client/solrj/io/stream/eval/FloorEvaluatorTest.java @@ -20,7 +20,7 @@ import java.io.IOException; import java.util.HashMap; import java.util.Map; -import org.apache.lucene.util.LuceneTestCase; +import org.apache.solr.SolrTestCase; import org.apache.solr.client.solrj.io.Tuple; import org.apache.solr.client.solrj.io.eval.FloorEvaluator; import org.apache.solr.client.solrj.io.eval.StreamEvaluator; @@ -29,7 +29,7 @@ import org.junit.Test; import junit.framework.Assert; -public class FloorEvaluatorTest extends LuceneTestCase { +public class FloorEvaluatorTest extends SolrTestCase { StreamFactory factory; Map values; diff --git a/solr/solrj/src/test/org/apache/solr/client/solrj/io/stream/eval/GreaterThanEqualToEvaluatorTest.java b/solr/solrj/src/test/org/apache/solr/client/solrj/io/stream/eval/GreaterThanEqualToEvaluatorTest.java index 26e6ac50d82..09d0c0d616f 100644 --- a/solr/solrj/src/test/org/apache/solr/client/solrj/io/stream/eval/GreaterThanEqualToEvaluatorTest.java +++ b/solr/solrj/src/test/org/apache/solr/client/solrj/io/stream/eval/GreaterThanEqualToEvaluatorTest.java @@ -20,7 +20,7 @@ import java.io.IOException; import java.util.HashMap; import java.util.Map; -import org.apache.lucene.util.LuceneTestCase; +import org.apache.solr.SolrTestCase; import org.apache.solr.client.solrj.io.Tuple; import org.apache.solr.client.solrj.io.eval.GreaterThanEqualToEvaluator; import org.apache.solr.client.solrj.io.eval.StreamEvaluator; @@ -29,7 +29,7 @@ import org.junit.Test; import junit.framework.Assert; -public class GreaterThanEqualToEvaluatorTest extends LuceneTestCase { +public class GreaterThanEqualToEvaluatorTest extends SolrTestCase { StreamFactory factory; Map values; diff --git a/solr/solrj/src/test/org/apache/solr/client/solrj/io/stream/eval/GreaterThanEvaluatorTest.java b/solr/solrj/src/test/org/apache/solr/client/solrj/io/stream/eval/GreaterThanEvaluatorTest.java index 41a97636a82..b6b6d0dd83b 100644 --- a/solr/solrj/src/test/org/apache/solr/client/solrj/io/stream/eval/GreaterThanEvaluatorTest.java +++ b/solr/solrj/src/test/org/apache/solr/client/solrj/io/stream/eval/GreaterThanEvaluatorTest.java @@ -20,7 +20,7 @@ import java.io.IOException; import java.util.HashMap; import java.util.Map; -import org.apache.lucene.util.LuceneTestCase; +import org.apache.solr.SolrTestCase; import org.apache.solr.client.solrj.io.Tuple; import org.apache.solr.client.solrj.io.eval.GreaterThanEvaluator; import org.apache.solr.client.solrj.io.eval.StreamEvaluator; @@ -29,7 +29,7 @@ import org.junit.Test; import junit.framework.Assert; -public class GreaterThanEvaluatorTest extends LuceneTestCase { +public class GreaterThanEvaluatorTest extends SolrTestCase { StreamFactory factory; Map values; diff --git a/solr/solrj/src/test/org/apache/solr/client/solrj/io/stream/eval/HyperbolicCosineEvaluatorTest.java b/solr/solrj/src/test/org/apache/solr/client/solrj/io/stream/eval/HyperbolicCosineEvaluatorTest.java index 5a903159916..92d34ae5e41 100644 --- a/solr/solrj/src/test/org/apache/solr/client/solrj/io/stream/eval/HyperbolicCosineEvaluatorTest.java +++ b/solr/solrj/src/test/org/apache/solr/client/solrj/io/stream/eval/HyperbolicCosineEvaluatorTest.java @@ -20,7 +20,7 @@ import java.io.IOException; import java.util.HashMap; import java.util.Map; -import org.apache.lucene.util.LuceneTestCase; +import org.apache.solr.SolrTestCase; import org.apache.solr.client.solrj.io.Tuple; import org.apache.solr.client.solrj.io.eval.HyperbolicCosineEvaluator; import org.apache.solr.client.solrj.io.eval.StreamEvaluator; @@ -29,7 +29,7 @@ import org.junit.Test; import junit.framework.Assert; -public class HyperbolicCosineEvaluatorTest extends LuceneTestCase { +public class HyperbolicCosineEvaluatorTest extends SolrTestCase { StreamFactory factory; Map values; diff --git a/solr/solrj/src/test/org/apache/solr/client/solrj/io/stream/eval/HyperbolicSineEvaluatorTest.java b/solr/solrj/src/test/org/apache/solr/client/solrj/io/stream/eval/HyperbolicSineEvaluatorTest.java index b4d56976b61..259a8467a4c 100644 --- a/solr/solrj/src/test/org/apache/solr/client/solrj/io/stream/eval/HyperbolicSineEvaluatorTest.java +++ b/solr/solrj/src/test/org/apache/solr/client/solrj/io/stream/eval/HyperbolicSineEvaluatorTest.java @@ -20,7 +20,7 @@ import java.io.IOException; import java.util.HashMap; import java.util.Map; -import org.apache.lucene.util.LuceneTestCase; +import org.apache.solr.SolrTestCase; import org.apache.solr.client.solrj.io.Tuple; import org.apache.solr.client.solrj.io.eval.HyperbolicSineEvaluator; import org.apache.solr.client.solrj.io.eval.StreamEvaluator; @@ -29,7 +29,7 @@ import org.junit.Test; import junit.framework.Assert; -public class HyperbolicSineEvaluatorTest extends LuceneTestCase { +public class HyperbolicSineEvaluatorTest extends SolrTestCase { StreamFactory factory; Map values; diff --git a/solr/solrj/src/test/org/apache/solr/client/solrj/io/stream/eval/HyperbolicTangentEvaluatorTest.java b/solr/solrj/src/test/org/apache/solr/client/solrj/io/stream/eval/HyperbolicTangentEvaluatorTest.java index bbb2db4569b..a5bc93fec02 100644 --- a/solr/solrj/src/test/org/apache/solr/client/solrj/io/stream/eval/HyperbolicTangentEvaluatorTest.java +++ b/solr/solrj/src/test/org/apache/solr/client/solrj/io/stream/eval/HyperbolicTangentEvaluatorTest.java @@ -20,7 +20,7 @@ import java.io.IOException; import java.util.HashMap; import java.util.Map; -import org.apache.lucene.util.LuceneTestCase; +import org.apache.solr.SolrTestCase; import org.apache.solr.client.solrj.io.Tuple; import org.apache.solr.client.solrj.io.eval.HyperbolicTangentEvaluator; import org.apache.solr.client.solrj.io.eval.StreamEvaluator; @@ -29,7 +29,7 @@ import org.junit.Test; import junit.framework.Assert; -public class HyperbolicTangentEvaluatorTest extends LuceneTestCase { +public class HyperbolicTangentEvaluatorTest extends SolrTestCase { StreamFactory factory; Map values; diff --git a/solr/solrj/src/test/org/apache/solr/client/solrj/io/stream/eval/LengthEvaluatorTest.java b/solr/solrj/src/test/org/apache/solr/client/solrj/io/stream/eval/LengthEvaluatorTest.java index 4b137b55054..aff35dfc7b0 100644 --- a/solr/solrj/src/test/org/apache/solr/client/solrj/io/stream/eval/LengthEvaluatorTest.java +++ b/solr/solrj/src/test/org/apache/solr/client/solrj/io/stream/eval/LengthEvaluatorTest.java @@ -21,7 +21,7 @@ import java.util.ArrayList; import java.util.HashMap; import java.util.Map; -import org.apache.lucene.util.LuceneTestCase; +import org.apache.solr.SolrTestCase; import org.apache.solr.client.solrj.io.Tuple; import org.apache.solr.client.solrj.io.eval.LengthEvaluator; import org.apache.solr.client.solrj.io.eval.SequenceEvaluator; @@ -31,7 +31,7 @@ import org.junit.Test; import junit.framework.Assert; -public class LengthEvaluatorTest extends LuceneTestCase { +public class LengthEvaluatorTest extends SolrTestCase { StreamFactory factory; Map values; diff --git a/solr/solrj/src/test/org/apache/solr/client/solrj/io/stream/eval/LessThanEqualToEvaluatorTest.java b/solr/solrj/src/test/org/apache/solr/client/solrj/io/stream/eval/LessThanEqualToEvaluatorTest.java index e62a3e9a3ce..1c080d17bcd 100644 --- a/solr/solrj/src/test/org/apache/solr/client/solrj/io/stream/eval/LessThanEqualToEvaluatorTest.java +++ b/solr/solrj/src/test/org/apache/solr/client/solrj/io/stream/eval/LessThanEqualToEvaluatorTest.java @@ -20,7 +20,7 @@ import java.io.IOException; import java.util.HashMap; import java.util.Map; -import org.apache.lucene.util.LuceneTestCase; +import org.apache.solr.SolrTestCase; import org.apache.solr.client.solrj.io.Tuple; import org.apache.solr.client.solrj.io.eval.LessThanEqualToEvaluator; import org.apache.solr.client.solrj.io.eval.StreamEvaluator; @@ -29,7 +29,7 @@ import org.junit.Test; import junit.framework.Assert; -public class LessThanEqualToEvaluatorTest extends LuceneTestCase { +public class LessThanEqualToEvaluatorTest extends SolrTestCase { StreamFactory factory; Map values; diff --git a/solr/solrj/src/test/org/apache/solr/client/solrj/io/stream/eval/LessThanEvaluatorTest.java b/solr/solrj/src/test/org/apache/solr/client/solrj/io/stream/eval/LessThanEvaluatorTest.java index da8c46a3772..ee16694d25d 100644 --- a/solr/solrj/src/test/org/apache/solr/client/solrj/io/stream/eval/LessThanEvaluatorTest.java +++ b/solr/solrj/src/test/org/apache/solr/client/solrj/io/stream/eval/LessThanEvaluatorTest.java @@ -20,7 +20,7 @@ import java.io.IOException; import java.util.HashMap; import java.util.Map; -import org.apache.lucene.util.LuceneTestCase; +import org.apache.solr.SolrTestCase; import org.apache.solr.client.solrj.io.Tuple; import org.apache.solr.client.solrj.io.eval.LessThanEvaluator; import org.apache.solr.client.solrj.io.eval.StreamEvaluator; @@ -29,7 +29,7 @@ import org.junit.Test; import junit.framework.Assert; -public class LessThanEvaluatorTest extends LuceneTestCase { +public class LessThanEvaluatorTest extends SolrTestCase { StreamFactory factory; Map values; diff --git a/solr/solrj/src/test/org/apache/solr/client/solrj/io/stream/eval/ModuloEvaluatorTest.java b/solr/solrj/src/test/org/apache/solr/client/solrj/io/stream/eval/ModuloEvaluatorTest.java index 436763b931d..d72b55f66c7 100644 --- a/solr/solrj/src/test/org/apache/solr/client/solrj/io/stream/eval/ModuloEvaluatorTest.java +++ b/solr/solrj/src/test/org/apache/solr/client/solrj/io/stream/eval/ModuloEvaluatorTest.java @@ -20,7 +20,7 @@ import java.io.IOException; import java.util.HashMap; import java.util.Map; -import org.apache.lucene.util.LuceneTestCase; +import org.apache.solr.SolrTestCase; import org.apache.solr.client.solrj.io.Tuple; import org.apache.solr.client.solrj.io.eval.ModuloEvaluator; import org.apache.solr.client.solrj.io.eval.StreamEvaluator; @@ -29,7 +29,7 @@ import org.junit.Test; import junit.framework.Assert; -public class ModuloEvaluatorTest extends LuceneTestCase { +public class ModuloEvaluatorTest extends SolrTestCase { StreamFactory factory; Map values; diff --git a/solr/solrj/src/test/org/apache/solr/client/solrj/io/stream/eval/MultiplyEvaluatorTest.java b/solr/solrj/src/test/org/apache/solr/client/solrj/io/stream/eval/MultiplyEvaluatorTest.java index a0aa3b16edf..49d0cfef87d 100644 --- a/solr/solrj/src/test/org/apache/solr/client/solrj/io/stream/eval/MultiplyEvaluatorTest.java +++ b/solr/solrj/src/test/org/apache/solr/client/solrj/io/stream/eval/MultiplyEvaluatorTest.java @@ -20,7 +20,7 @@ import java.io.IOException; import java.util.HashMap; import java.util.Map; -import org.apache.lucene.util.LuceneTestCase; +import org.apache.solr.SolrTestCase; import org.apache.solr.client.solrj.io.Tuple; import org.apache.solr.client.solrj.io.eval.MultiplyEvaluator; import org.apache.solr.client.solrj.io.eval.StreamEvaluator; @@ -29,7 +29,7 @@ import org.junit.Test; import junit.framework.Assert; -public class MultiplyEvaluatorTest extends LuceneTestCase { +public class MultiplyEvaluatorTest extends SolrTestCase { StreamFactory factory; Map values; diff --git a/solr/solrj/src/test/org/apache/solr/client/solrj/io/stream/eval/NaturalLogEvaluatorTest.java b/solr/solrj/src/test/org/apache/solr/client/solrj/io/stream/eval/NaturalLogEvaluatorTest.java index ec00b7569d3..5c15a5d7dfc 100644 --- a/solr/solrj/src/test/org/apache/solr/client/solrj/io/stream/eval/NaturalLogEvaluatorTest.java +++ b/solr/solrj/src/test/org/apache/solr/client/solrj/io/stream/eval/NaturalLogEvaluatorTest.java @@ -20,7 +20,7 @@ import java.io.IOException; import java.util.HashMap; import java.util.Map; -import org.apache.lucene.util.LuceneTestCase; +import org.apache.solr.SolrTestCase; import org.apache.solr.client.solrj.io.Tuple; import org.apache.solr.client.solrj.io.eval.AddEvaluator; import org.apache.solr.client.solrj.io.eval.NaturalLogEvaluator; @@ -30,7 +30,7 @@ import org.junit.Test; import junit.framework.Assert; -public class NaturalLogEvaluatorTest extends LuceneTestCase { +public class NaturalLogEvaluatorTest extends SolrTestCase { StreamFactory factory; Map values; diff --git a/solr/solrj/src/test/org/apache/solr/client/solrj/io/stream/eval/NormalDistributionEvaluatorTest.java b/solr/solrj/src/test/org/apache/solr/client/solrj/io/stream/eval/NormalDistributionEvaluatorTest.java index b72f9628957..d8d78f5f6bc 100644 --- a/solr/solrj/src/test/org/apache/solr/client/solrj/io/stream/eval/NormalDistributionEvaluatorTest.java +++ b/solr/solrj/src/test/org/apache/solr/client/solrj/io/stream/eval/NormalDistributionEvaluatorTest.java @@ -21,7 +21,7 @@ import java.util.HashMap; import java.util.Map; import org.apache.commons.math3.distribution.NormalDistribution; -import org.apache.lucene.util.LuceneTestCase; +import org.apache.solr.SolrTestCase; import org.apache.solr.client.solrj.io.Tuple; import org.apache.solr.client.solrj.io.eval.NormalDistributionEvaluator; import org.apache.solr.client.solrj.io.stream.expr.StreamFactory; @@ -29,7 +29,7 @@ import org.junit.Test; import junit.framework.Assert; -public class NormalDistributionEvaluatorTest extends LuceneTestCase { +public class NormalDistributionEvaluatorTest extends SolrTestCase { StreamFactory factory; Map values; diff --git a/solr/solrj/src/test/org/apache/solr/client/solrj/io/stream/eval/NormalizeEvaluatorTest.java b/solr/solrj/src/test/org/apache/solr/client/solrj/io/stream/eval/NormalizeEvaluatorTest.java index 078cd2324bd..19e362219b6 100644 --- a/solr/solrj/src/test/org/apache/solr/client/solrj/io/stream/eval/NormalizeEvaluatorTest.java +++ b/solr/solrj/src/test/org/apache/solr/client/solrj/io/stream/eval/NormalizeEvaluatorTest.java @@ -23,7 +23,7 @@ import java.util.List; import java.util.Map; import org.apache.commons.math3.stat.StatUtils; -import org.apache.lucene.util.LuceneTestCase; +import org.apache.solr.SolrTestCase; import org.apache.solr.client.solrj.io.Tuple; import org.apache.solr.client.solrj.io.eval.NormalizeEvaluator; import org.apache.solr.client.solrj.io.stream.expr.StreamFactory; @@ -31,7 +31,7 @@ import org.junit.Test; import junit.framework.Assert; -public class NormalizeEvaluatorTest extends LuceneTestCase { +public class NormalizeEvaluatorTest extends SolrTestCase { StreamFactory factory; Map values; diff --git a/solr/solrj/src/test/org/apache/solr/client/solrj/io/stream/eval/NotEvaluatorTest.java b/solr/solrj/src/test/org/apache/solr/client/solrj/io/stream/eval/NotEvaluatorTest.java index 56cb4fd5d43..1faa2a1115c 100644 --- a/solr/solrj/src/test/org/apache/solr/client/solrj/io/stream/eval/NotEvaluatorTest.java +++ b/solr/solrj/src/test/org/apache/solr/client/solrj/io/stream/eval/NotEvaluatorTest.java @@ -19,7 +19,7 @@ package org.apache.solr.client.solrj.io.stream.eval; import java.util.HashMap; import java.util.Map; -import org.apache.lucene.util.LuceneTestCase; +import org.apache.solr.SolrTestCase; import org.apache.solr.client.solrj.io.Tuple; import org.apache.solr.client.solrj.io.eval.NotEvaluator; import org.apache.solr.client.solrj.io.eval.StreamEvaluator; @@ -28,7 +28,7 @@ import org.junit.Test; import junit.framework.Assert; -public class NotEvaluatorTest extends LuceneTestCase { +public class NotEvaluatorTest extends SolrTestCase { StreamFactory factory; Map values; diff --git a/solr/solrj/src/test/org/apache/solr/client/solrj/io/stream/eval/OrEvaluatorTest.java b/solr/solrj/src/test/org/apache/solr/client/solrj/io/stream/eval/OrEvaluatorTest.java index 09206af77fc..0824809f25f 100644 --- a/solr/solrj/src/test/org/apache/solr/client/solrj/io/stream/eval/OrEvaluatorTest.java +++ b/solr/solrj/src/test/org/apache/solr/client/solrj/io/stream/eval/OrEvaluatorTest.java @@ -19,7 +19,7 @@ package org.apache.solr.client.solrj.io.stream.eval; import java.util.HashMap; import java.util.Map; -import org.apache.lucene.util.LuceneTestCase; +import org.apache.solr.SolrTestCase; import org.apache.solr.client.solrj.io.Tuple; import org.apache.solr.client.solrj.io.eval.OrEvaluator; import org.apache.solr.client.solrj.io.eval.StreamEvaluator; @@ -28,7 +28,7 @@ import org.junit.Test; import junit.framework.Assert; -public class OrEvaluatorTest extends LuceneTestCase { +public class OrEvaluatorTest extends SolrTestCase { StreamFactory factory; Map values; diff --git a/solr/solrj/src/test/org/apache/solr/client/solrj/io/stream/eval/PowerEvaluatorTest.java b/solr/solrj/src/test/org/apache/solr/client/solrj/io/stream/eval/PowerEvaluatorTest.java index 62bc6307320..2de054d8dd1 100644 --- a/solr/solrj/src/test/org/apache/solr/client/solrj/io/stream/eval/PowerEvaluatorTest.java +++ b/solr/solrj/src/test/org/apache/solr/client/solrj/io/stream/eval/PowerEvaluatorTest.java @@ -21,7 +21,7 @@ import java.math.BigDecimal; import java.util.HashMap; import java.util.Map; -import org.apache.lucene.util.LuceneTestCase; +import org.apache.solr.SolrTestCase; import org.apache.solr.client.solrj.io.Tuple; import org.apache.solr.client.solrj.io.eval.PowerEvaluator; import org.apache.solr.client.solrj.io.eval.StreamEvaluator; @@ -30,7 +30,7 @@ import org.junit.Test; import junit.framework.Assert; -public class PowerEvaluatorTest extends LuceneTestCase { +public class PowerEvaluatorTest extends SolrTestCase { StreamFactory factory; Map values; diff --git a/solr/solrj/src/test/org/apache/solr/client/solrj/io/stream/eval/RawValueEvaluatorTest.java b/solr/solrj/src/test/org/apache/solr/client/solrj/io/stream/eval/RawValueEvaluatorTest.java index 1419ec2b905..93df803d4c7 100644 --- a/solr/solrj/src/test/org/apache/solr/client/solrj/io/stream/eval/RawValueEvaluatorTest.java +++ b/solr/solrj/src/test/org/apache/solr/client/solrj/io/stream/eval/RawValueEvaluatorTest.java @@ -19,7 +19,7 @@ package org.apache.solr.client.solrj.io.stream.eval; import java.util.HashMap; import java.util.Map; -import org.apache.lucene.util.LuceneTestCase; +import org.apache.solr.SolrTestCase; import org.apache.solr.client.solrj.io.Tuple; import org.apache.solr.client.solrj.io.eval.AddEvaluator; import org.apache.solr.client.solrj.io.eval.AndEvaluator; @@ -29,7 +29,7 @@ import org.junit.Test; import junit.framework.Assert; -public class RawValueEvaluatorTest extends LuceneTestCase { +public class RawValueEvaluatorTest extends SolrTestCase { StreamFactory factory; Map values; diff --git a/solr/solrj/src/test/org/apache/solr/client/solrj/io/stream/eval/RecursiveEvaluatorTest.java b/solr/solrj/src/test/org/apache/solr/client/solrj/io/stream/eval/RecursiveEvaluatorTest.java index 8e4bbdbbc39..7cc0ebc01b9 100644 --- a/solr/solrj/src/test/org/apache/solr/client/solrj/io/stream/eval/RecursiveEvaluatorTest.java +++ b/solr/solrj/src/test/org/apache/solr/client/solrj/io/stream/eval/RecursiveEvaluatorTest.java @@ -19,7 +19,7 @@ package org.apache.solr.client.solrj.io.stream.eval; import java.util.HashMap; import java.util.Map; -import org.apache.lucene.util.LuceneTestCase; +import org.apache.solr.SolrTestCase; import org.apache.solr.client.solrj.io.Tuple; import org.apache.solr.client.solrj.io.eval.AddEvaluator; import org.apache.solr.client.solrj.io.eval.AndEvaluator; @@ -34,7 +34,7 @@ import org.junit.Test; import junit.framework.Assert; -public class RecursiveEvaluatorTest extends LuceneTestCase { +public class RecursiveEvaluatorTest extends SolrTestCase { StreamFactory factory; Map values; diff --git a/solr/solrj/src/test/org/apache/solr/client/solrj/io/stream/eval/RegressionEvaluatorTest.java b/solr/solrj/src/test/org/apache/solr/client/solrj/io/stream/eval/RegressionEvaluatorTest.java index 25924eea204..c7b17857d33 100644 --- a/solr/solrj/src/test/org/apache/solr/client/solrj/io/stream/eval/RegressionEvaluatorTest.java +++ b/solr/solrj/src/test/org/apache/solr/client/solrj/io/stream/eval/RegressionEvaluatorTest.java @@ -21,7 +21,7 @@ import java.util.HashMap; import java.util.Map; import org.apache.commons.math3.stat.regression.SimpleRegression; -import org.apache.lucene.util.LuceneTestCase; +import org.apache.solr.SolrTestCase; import org.apache.solr.client.solrj.io.Tuple; import org.apache.solr.client.solrj.io.eval.RegressionEvaluator; import org.apache.solr.client.solrj.io.stream.expr.StreamFactory; @@ -29,7 +29,7 @@ import org.junit.Test; import junit.framework.Assert; -public class RegressionEvaluatorTest extends LuceneTestCase { +public class RegressionEvaluatorTest extends SolrTestCase { StreamFactory factory; Map values; diff --git a/solr/solrj/src/test/org/apache/solr/client/solrj/io/stream/eval/ReverseEvaluatorTest.java b/solr/solrj/src/test/org/apache/solr/client/solrj/io/stream/eval/ReverseEvaluatorTest.java index 3daf16ff54d..66f45a78f21 100644 --- a/solr/solrj/src/test/org/apache/solr/client/solrj/io/stream/eval/ReverseEvaluatorTest.java +++ b/solr/solrj/src/test/org/apache/solr/client/solrj/io/stream/eval/ReverseEvaluatorTest.java @@ -21,7 +21,7 @@ import java.util.HashMap; import java.util.List; import java.util.Map; -import org.apache.lucene.util.LuceneTestCase; +import org.apache.solr.SolrTestCase; import org.apache.solr.client.solrj.io.Tuple; import org.apache.solr.client.solrj.io.eval.ReverseEvaluator; import org.apache.solr.client.solrj.io.stream.expr.StreamFactory; @@ -29,7 +29,7 @@ import org.junit.Test; import junit.framework.Assert; -public class ReverseEvaluatorTest extends LuceneTestCase { +public class ReverseEvaluatorTest extends SolrTestCase { StreamFactory factory; Map values; diff --git a/solr/solrj/src/test/org/apache/solr/client/solrj/io/stream/eval/RoundEvaluatorTest.java b/solr/solrj/src/test/org/apache/solr/client/solrj/io/stream/eval/RoundEvaluatorTest.java index 453a6beaea5..19809db73ef 100644 --- a/solr/solrj/src/test/org/apache/solr/client/solrj/io/stream/eval/RoundEvaluatorTest.java +++ b/solr/solrj/src/test/org/apache/solr/client/solrj/io/stream/eval/RoundEvaluatorTest.java @@ -20,7 +20,7 @@ import java.io.IOException; import java.util.HashMap; import java.util.Map; -import org.apache.lucene.util.LuceneTestCase; +import org.apache.solr.SolrTestCase; import org.apache.solr.client.solrj.io.Tuple; import org.apache.solr.client.solrj.io.eval.RoundEvaluator; import org.apache.solr.client.solrj.io.eval.StreamEvaluator; @@ -29,7 +29,7 @@ import org.junit.Test; import junit.framework.Assert; -public class RoundEvaluatorTest extends LuceneTestCase { +public class RoundEvaluatorTest extends SolrTestCase { StreamFactory factory; Map values; diff --git a/solr/solrj/src/test/org/apache/solr/client/solrj/io/stream/eval/SineEvaluatorTest.java b/solr/solrj/src/test/org/apache/solr/client/solrj/io/stream/eval/SineEvaluatorTest.java index b767d9f3fd4..b8b29b96996 100644 --- a/solr/solrj/src/test/org/apache/solr/client/solrj/io/stream/eval/SineEvaluatorTest.java +++ b/solr/solrj/src/test/org/apache/solr/client/solrj/io/stream/eval/SineEvaluatorTest.java @@ -20,7 +20,7 @@ import java.io.IOException; import java.util.HashMap; import java.util.Map; -import org.apache.lucene.util.LuceneTestCase; +import org.apache.solr.SolrTestCase; import org.apache.solr.client.solrj.io.Tuple; import org.apache.solr.client.solrj.io.eval.SineEvaluator; import org.apache.solr.client.solrj.io.eval.StreamEvaluator; @@ -29,7 +29,7 @@ import org.junit.Test; import junit.framework.Assert; -public class SineEvaluatorTest extends LuceneTestCase { +public class SineEvaluatorTest extends SolrTestCase { StreamFactory factory; Map values; diff --git a/solr/solrj/src/test/org/apache/solr/client/solrj/io/stream/eval/SquareRootEvaluatorTest.java b/solr/solrj/src/test/org/apache/solr/client/solrj/io/stream/eval/SquareRootEvaluatorTest.java index d26e15f422f..5608763b212 100644 --- a/solr/solrj/src/test/org/apache/solr/client/solrj/io/stream/eval/SquareRootEvaluatorTest.java +++ b/solr/solrj/src/test/org/apache/solr/client/solrj/io/stream/eval/SquareRootEvaluatorTest.java @@ -20,7 +20,7 @@ import java.io.IOException; import java.util.HashMap; import java.util.Map; -import org.apache.lucene.util.LuceneTestCase; +import org.apache.solr.SolrTestCase; import org.apache.solr.client.solrj.io.Tuple; import org.apache.solr.client.solrj.io.eval.SquareRootEvaluator; import org.apache.solr.client.solrj.io.eval.StreamEvaluator; @@ -29,7 +29,7 @@ import org.junit.Test; import junit.framework.Assert; -public class SquareRootEvaluatorTest extends LuceneTestCase { +public class SquareRootEvaluatorTest extends SolrTestCase { StreamFactory factory; Map values; diff --git a/solr/solrj/src/test/org/apache/solr/client/solrj/io/stream/eval/SubtractEvaluatorTest.java b/solr/solrj/src/test/org/apache/solr/client/solrj/io/stream/eval/SubtractEvaluatorTest.java index a0efbaeee32..4d56b8d562b 100644 --- a/solr/solrj/src/test/org/apache/solr/client/solrj/io/stream/eval/SubtractEvaluatorTest.java +++ b/solr/solrj/src/test/org/apache/solr/client/solrj/io/stream/eval/SubtractEvaluatorTest.java @@ -20,7 +20,7 @@ import java.io.IOException; import java.util.HashMap; import java.util.Map; -import org.apache.lucene.util.LuceneTestCase; +import org.apache.solr.SolrTestCase; import org.apache.solr.client.solrj.io.Tuple; import org.apache.solr.client.solrj.io.eval.StreamEvaluator; import org.apache.solr.client.solrj.io.eval.SubtractEvaluator; @@ -29,7 +29,7 @@ import org.junit.Test; import junit.framework.Assert; -public class SubtractEvaluatorTest extends LuceneTestCase { +public class SubtractEvaluatorTest extends SolrTestCase { StreamFactory factory; Map values; diff --git a/solr/solrj/src/test/org/apache/solr/client/solrj/io/stream/eval/TangentEvaluatorTest.java b/solr/solrj/src/test/org/apache/solr/client/solrj/io/stream/eval/TangentEvaluatorTest.java index 3a688e6ed64..8ad81dc3167 100644 --- a/solr/solrj/src/test/org/apache/solr/client/solrj/io/stream/eval/TangentEvaluatorTest.java +++ b/solr/solrj/src/test/org/apache/solr/client/solrj/io/stream/eval/TangentEvaluatorTest.java @@ -20,7 +20,7 @@ import java.io.IOException; import java.util.HashMap; import java.util.Map; -import org.apache.lucene.util.LuceneTestCase; +import org.apache.solr.SolrTestCase; import org.apache.solr.client.solrj.io.Tuple; import org.apache.solr.client.solrj.io.eval.StreamEvaluator; import org.apache.solr.client.solrj.io.eval.TangentEvaluator; @@ -29,7 +29,7 @@ import org.junit.Test; import junit.framework.Assert; -public class TangentEvaluatorTest extends LuceneTestCase { +public class TangentEvaluatorTest extends SolrTestCase { StreamFactory factory; Map values; diff --git a/solr/solrj/src/test/org/apache/solr/client/solrj/io/stream/eval/UniformDistributionEvaluatorTest.java b/solr/solrj/src/test/org/apache/solr/client/solrj/io/stream/eval/UniformDistributionEvaluatorTest.java index f7c474ebf15..22fe487a5b4 100644 --- a/solr/solrj/src/test/org/apache/solr/client/solrj/io/stream/eval/UniformDistributionEvaluatorTest.java +++ b/solr/solrj/src/test/org/apache/solr/client/solrj/io/stream/eval/UniformDistributionEvaluatorTest.java @@ -21,7 +21,7 @@ import java.util.HashMap; import java.util.Map; import org.apache.commons.math3.distribution.UniformRealDistribution; -import org.apache.lucene.util.LuceneTestCase; +import org.apache.solr.SolrTestCase; import org.apache.solr.client.solrj.io.Tuple; import org.apache.solr.client.solrj.io.eval.UniformDistributionEvaluator; import org.apache.solr.client.solrj.io.stream.expr.StreamFactory; @@ -29,7 +29,7 @@ import org.junit.Test; import junit.framework.Assert; -public class UniformDistributionEvaluatorTest extends LuceneTestCase { +public class UniformDistributionEvaluatorTest extends SolrTestCase { StreamFactory factory; Map values; diff --git a/solr/solrj/src/test/org/apache/solr/client/solrj/io/stream/eval/UuidEvaluatorTest.java b/solr/solrj/src/test/org/apache/solr/client/solrj/io/stream/eval/UuidEvaluatorTest.java index 682b600493c..8bf5b5776f8 100644 --- a/solr/solrj/src/test/org/apache/solr/client/solrj/io/stream/eval/UuidEvaluatorTest.java +++ b/solr/solrj/src/test/org/apache/solr/client/solrj/io/stream/eval/UuidEvaluatorTest.java @@ -20,7 +20,7 @@ import java.util.HashMap; import java.util.Map; import java.util.UUID; -import org.apache.lucene.util.LuceneTestCase; +import org.apache.solr.SolrTestCase; import org.apache.solr.client.solrj.io.Tuple; import org.apache.solr.client.solrj.io.eval.StreamEvaluator; import org.apache.solr.client.solrj.io.eval.UuidEvaluator; @@ -29,7 +29,7 @@ import org.junit.Test; import junit.framework.Assert; -public class UuidEvaluatorTest extends LuceneTestCase { +public class UuidEvaluatorTest extends SolrTestCase { StreamFactory factory; Map values; diff --git a/solr/solrj/src/test/org/apache/solr/client/solrj/io/stream/expr/StreamExpressionParserTest.java b/solr/solrj/src/test/org/apache/solr/client/solrj/io/stream/expr/StreamExpressionParserTest.java index ca811c961b5..e5236b56d7e 100644 --- a/solr/solrj/src/test/org/apache/solr/client/solrj/io/stream/expr/StreamExpressionParserTest.java +++ b/solr/solrj/src/test/org/apache/solr/client/solrj/io/stream/expr/StreamExpressionParserTest.java @@ -16,13 +16,14 @@ */ package org.apache.solr.client.solrj.io.stream.expr; -import org.apache.lucene.util.LuceneTestCase; +import org.apache.solr.SolrTestCase; + import org.junit.Test; /** **/ -public class StreamExpressionParserTest extends LuceneTestCase { +public class StreamExpressionParserTest extends SolrTestCase { public StreamExpressionParserTest() { super(); diff --git a/solr/solrj/src/test/org/apache/solr/client/solrj/io/stream/ops/ConcatOperationTest.java b/solr/solrj/src/test/org/apache/solr/client/solrj/io/stream/ops/ConcatOperationTest.java index 77c5b1f6835..bbc6755ccaa 100644 --- a/solr/solrj/src/test/org/apache/solr/client/solrj/io/stream/ops/ConcatOperationTest.java +++ b/solr/solrj/src/test/org/apache/solr/client/solrj/io/stream/ops/ConcatOperationTest.java @@ -21,7 +21,7 @@ import java.util.Map; import junit.framework.Assert; import org.apache.commons.collections.map.HashedMap; -import org.apache.lucene.util.LuceneTestCase; +import org.apache.solr.SolrTestCase; import org.apache.solr.client.solrj.io.Tuple; import org.apache.solr.client.solrj.io.ops.ConcatOperation; import org.apache.solr.client.solrj.io.ops.StreamOperation; @@ -32,7 +32,7 @@ import org.junit.Test; /** **/ -public class ConcatOperationTest extends LuceneTestCase { +public class ConcatOperationTest extends SolrTestCase { StreamFactory factory; Map values; diff --git a/solr/solrj/src/test/org/apache/solr/client/solrj/io/stream/ops/OperationsTest.java b/solr/solrj/src/test/org/apache/solr/client/solrj/io/stream/ops/OperationsTest.java index 60adfce9463..91129b7019e 100644 --- a/solr/solrj/src/test/org/apache/solr/client/solrj/io/stream/ops/OperationsTest.java +++ b/solr/solrj/src/test/org/apache/solr/client/solrj/io/stream/ops/OperationsTest.java @@ -21,7 +21,7 @@ import java.util.Map; import junit.framework.Assert; import org.apache.commons.collections.map.HashedMap; -import org.apache.lucene.util.LuceneTestCase; +import org.apache.solr.SolrTestCase; import org.apache.solr.client.solrj.io.Tuple; import org.apache.solr.client.solrj.io.ops.ReplaceOperation; import org.apache.solr.client.solrj.io.ops.StreamOperation; @@ -32,7 +32,7 @@ import org.junit.Test; /** **/ -public class OperationsTest extends LuceneTestCase { +public class OperationsTest extends SolrTestCase { StreamFactory factory; Map values; diff --git a/solr/solrj/src/test/org/apache/solr/client/solrj/request/TestCollectionAdminRequest.java b/solr/solrj/src/test/org/apache/solr/client/solrj/request/TestCollectionAdminRequest.java index a554aea75ff..2024d9bd3b8 100644 --- a/solr/solrj/src/test/org/apache/solr/client/solrj/request/TestCollectionAdminRequest.java +++ b/solr/solrj/src/test/org/apache/solr/client/solrj/request/TestCollectionAdminRequest.java @@ -16,7 +16,7 @@ */ package org.apache.solr.client.solrj.request; -import org.apache.lucene.util.LuceneTestCase; +import org.apache.solr.SolrTestCase; import org.apache.solr.client.solrj.request.CollectionAdminRequest.CreateAlias; import org.apache.solr.client.solrj.request.CollectionAdminRequest.CreateShard; import org.apache.solr.common.SolrException; @@ -25,7 +25,7 @@ import org.junit.Test; /** * Unit tests for {@link CollectionAdminRequest}. */ -public class TestCollectionAdminRequest extends LuceneTestCase { +public class TestCollectionAdminRequest extends SolrTestCase { @Test // commented out on: 24-Dec-2018 @BadApple(bugUrl="https://issues.apache.org/jira/browse/SOLR-12028") // added 20-Sep-2018 diff --git a/solr/solrj/src/test/org/apache/solr/client/solrj/request/TestDelegationTokenRequest.java b/solr/solrj/src/test/org/apache/solr/client/solrj/request/TestDelegationTokenRequest.java index 47b8385cf06..19e901ea3e2 100644 --- a/solr/solrj/src/test/org/apache/solr/client/solrj/request/TestDelegationTokenRequest.java +++ b/solr/solrj/src/test/org/apache/solr/client/solrj/request/TestDelegationTokenRequest.java @@ -16,14 +16,13 @@ */ package org.apache.solr.client.solrj.request; -import org.apache.lucene.util.LuceneTestCase; - +import org.apache.solr.SolrTestCase; import org.junit.Test; /** * Test for DelegationTokenRequests */ -public class TestDelegationTokenRequest extends LuceneTestCase { +public class TestDelegationTokenRequest extends SolrTestCase { @Test public void testGetRequest() throws Exception { diff --git a/solr/solrj/src/test/org/apache/solr/client/solrj/request/TestUpdateRequestCodec.java b/solr/solrj/src/test/org/apache/solr/client/solrj/request/TestUpdateRequestCodec.java index 3aa3d12455e..71466d6aa0e 100644 --- a/solr/solrj/src/test/org/apache/solr/client/solrj/request/TestUpdateRequestCodec.java +++ b/solr/solrj/src/test/org/apache/solr/client/solrj/request/TestUpdateRequestCodec.java @@ -29,7 +29,7 @@ import java.util.Set; import junit.framework.Assert; -import org.apache.lucene.util.LuceneTestCase; +import org.apache.solr.SolrTestCase; import org.apache.solr.common.SolrInputDocument; import org.apache.solr.common.SolrInputField; import org.junit.Test; @@ -41,7 +41,7 @@ import org.junit.Test; * * @see org.apache.solr.client.solrj.request.UpdateRequest */ -public class TestUpdateRequestCodec extends LuceneTestCase { +public class TestUpdateRequestCodec extends SolrTestCase { @Test // commented out on: 24-Dec-2018 @BadApple(bugUrl="https://issues.apache.org/jira/browse/SOLR-12028") // added 20-Sep-2018 diff --git a/solr/solrj/src/test/org/apache/solr/client/solrj/request/TestV1toV2ApiMapper.java b/solr/solrj/src/test/org/apache/solr/client/solrj/request/TestV1toV2ApiMapper.java index 398f262b4c2..b144e404c7d 100644 --- a/solr/solrj/src/test/org/apache/solr/client/solrj/request/TestV1toV2ApiMapper.java +++ b/solr/solrj/src/test/org/apache/solr/client/solrj/request/TestV1toV2ApiMapper.java @@ -21,14 +21,14 @@ import java.io.IOException; import java.util.Map; import com.google.common.collect.ImmutableMap; -import org.apache.lucene.util.LuceneTestCase; +import org.apache.solr.SolrTestCase; import org.apache.solr.client.solrj.impl.BinaryRequestWriter; import org.apache.solr.client.solrj.request.CollectionAdminRequest.Create; import org.apache.solr.common.util.ContentStreamBase; import org.apache.solr.common.util.Utils; import org.junit.Test; -public class TestV1toV2ApiMapper extends LuceneTestCase { +public class TestV1toV2ApiMapper extends SolrTestCase { @Test // commented out on: 24-Dec-2018 @BadApple(bugUrl="https://issues.apache.org/jira/browse/SOLR-12028") // added 20-Sep-2018 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.java index 51a0aa5bd84..e1b642f4c43 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 @@ -23,7 +23,7 @@ import java.nio.charset.StandardCharsets; import java.util.HashMap; import java.util.Map; -import org.apache.lucene.util.LuceneTestCase; +import org.apache.solr.SolrTestCase; import org.apache.solr.client.solrj.request.RequestWriter; import org.apache.solr.client.solrj.util.ClientUtils; import org.apache.solr.common.MapWriter; @@ -33,7 +33,7 @@ import static org.hamcrest.core.StringContains.containsString; /** * Unit tests for {@link JsonQueryRequest} */ -public class JsonQueryRequestUnitTest extends LuceneTestCase { +public class JsonQueryRequestUnitTest extends SolrTestCase { private static final boolean LEAVE_WHITESPACE = false; diff --git a/solr/solrj/src/test/org/apache/solr/client/solrj/response/AnlysisResponseBaseTest.java b/solr/solrj/src/test/org/apache/solr/client/solrj/response/AnlysisResponseBaseTest.java index c1686663977..da7f7ed506c 100644 --- a/solr/solrj/src/test/org/apache/solr/client/solrj/response/AnlysisResponseBaseTest.java +++ b/solr/solrj/src/test/org/apache/solr/client/solrj/response/AnlysisResponseBaseTest.java @@ -16,7 +16,7 @@ */ package org.apache.solr.client.solrj.response; -import org.apache.lucene.util.LuceneTestCase; +import org.apache.solr.SolrTestCase; import org.apache.solr.common.util.NamedList; import org.junit.Test; @@ -30,7 +30,7 @@ import java.util.List; * @since solr 1.4 */ @SuppressWarnings("unchecked") -public class AnlysisResponseBaseTest extends LuceneTestCase { +public class AnlysisResponseBaseTest extends SolrTestCase { /** * Tests the {@link AnalysisResponseBase#buildTokenInfo(org.apache.solr.common.util.NamedList)} method. diff --git a/solr/solrj/src/test/org/apache/solr/client/solrj/response/DocumentAnalysisResponseTest.java b/solr/solrj/src/test/org/apache/solr/client/solrj/response/DocumentAnalysisResponseTest.java index 6e4b785033e..1c970a24902 100644 --- a/solr/solrj/src/test/org/apache/solr/client/solrj/response/DocumentAnalysisResponseTest.java +++ b/solr/solrj/src/test/org/apache/solr/client/solrj/response/DocumentAnalysisResponseTest.java @@ -16,7 +16,7 @@ */ package org.apache.solr.client.solrj.response; -import org.apache.lucene.util.LuceneTestCase; +import org.apache.solr.SolrTestCase; import org.apache.solr.common.util.NamedList; import org.junit.Test; @@ -29,7 +29,7 @@ import java.util.List; * * @since solr 1.4 */ -public class DocumentAnalysisResponseTest extends LuceneTestCase { +public class DocumentAnalysisResponseTest extends SolrTestCase { /** * Tests the {@link DocumentAnalysisResponse#setResponse(org.apache.solr.common.util.NamedList)} method diff --git a/solr/solrj/src/test/org/apache/solr/client/solrj/response/FacetFieldTest.java b/solr/solrj/src/test/org/apache/solr/client/solrj/response/FacetFieldTest.java index 9207772698a..d0c8d46b9b8 100644 --- a/solr/solrj/src/test/org/apache/solr/client/solrj/response/FacetFieldTest.java +++ b/solr/solrj/src/test/org/apache/solr/client/solrj/response/FacetFieldTest.java @@ -16,9 +16,9 @@ */ package org.apache.solr.client.solrj.response; -import org.apache.lucene.util.LuceneTestCase; +import org.apache.solr.SolrTestCase; -public class FacetFieldTest extends LuceneTestCase { +public class FacetFieldTest extends SolrTestCase { public void testGetValues() { FacetField facetField = new FacetField("field"); diff --git a/solr/solrj/src/test/org/apache/solr/client/solrj/response/FieldAnalysisResponseTest.java b/solr/solrj/src/test/org/apache/solr/client/solrj/response/FieldAnalysisResponseTest.java index 866aad1ec62..6ce7e4b2401 100644 --- a/solr/solrj/src/test/org/apache/solr/client/solrj/response/FieldAnalysisResponseTest.java +++ b/solr/solrj/src/test/org/apache/solr/client/solrj/response/FieldAnalysisResponseTest.java @@ -16,7 +16,7 @@ */ package org.apache.solr.client.solrj.response; -import org.apache.lucene.util.LuceneTestCase; +import org.apache.solr.SolrTestCase; import org.apache.solr.common.util.NamedList; import org.junit.Test; @@ -31,7 +31,7 @@ import java.util.List; * @since solr 1.4 */ @SuppressWarnings("unchecked") -public class FieldAnalysisResponseTest extends LuceneTestCase { +public class FieldAnalysisResponseTest extends SolrTestCase { /** * Tests the {@link FieldAnalysisResponse#setResponse(org.apache.solr.common.util.NamedList)} method. diff --git a/solr/solrj/src/test/org/apache/solr/client/solrj/response/QueryResponseTest.java b/solr/solrj/src/test/org/apache/solr/client/solrj/response/QueryResponseTest.java index 94b17366fdb..cbdc73f5e96 100644 --- a/solr/solrj/src/test/org/apache/solr/client/solrj/response/QueryResponseTest.java +++ b/solr/solrj/src/test/org/apache/solr/client/solrj/response/QueryResponseTest.java @@ -25,8 +25,8 @@ import java.util.Date; import java.util.List; import junit.framework.Assert; -import org.apache.lucene.util.LuceneTestCase; import org.apache.lucene.util.TestRuleLimitSysouts.Limit; +import org.apache.solr.SolrTestCase; import org.apache.solr.client.solrj.impl.XMLResponseParser; import org.apache.solr.common.SolrDocumentList; import org.apache.solr.common.util.NamedList; @@ -39,7 +39,7 @@ import org.junit.Test; * @since solr 1.3 */ @Limit(bytes=20000) -public class QueryResponseTest extends LuceneTestCase { +public class QueryResponseTest extends SolrTestCase { @Test // commented out on: 24-Dec-2018 @BadApple(bugUrl="https://issues.apache.org/jira/browse/SOLR-12028") // added 20-Sep-2018 public void testRangeFacets() throws Exception { diff --git a/solr/solrj/src/test/org/apache/solr/client/solrj/response/TestDelegationTokenResponse.java b/solr/solrj/src/test/org/apache/solr/client/solrj/response/TestDelegationTokenResponse.java index c1f99481bec..d14c0a8b2ad 100644 --- a/solr/solrj/src/test/org/apache/solr/client/solrj/response/TestDelegationTokenResponse.java +++ b/solr/solrj/src/test/org/apache/solr/client/solrj/response/TestDelegationTokenResponse.java @@ -22,7 +22,7 @@ import java.util.Map; import org.apache.commons.io.IOUtils; -import org.apache.lucene.util.LuceneTestCase; +import org.apache.solr.SolrTestCase; import org.apache.solr.client.solrj.ResponseParser; import org.apache.solr.client.solrj.request.DelegationTokenRequest; import org.apache.solr.common.SolrException; @@ -32,7 +32,7 @@ import org.junit.Test; import org.noggit.CharArr; import org.noggit.JSONWriter; -public class TestDelegationTokenResponse extends LuceneTestCase { +public class TestDelegationTokenResponse extends SolrTestCase { private void delegationTokenResponse(DelegationTokenRequest request, DelegationTokenResponse response, String responseBody) throws Exception { diff --git a/solr/solrj/src/test/org/apache/solr/client/solrj/util/ClientUtilsTest.java b/solr/solrj/src/test/org/apache/solr/client/solrj/util/ClientUtilsTest.java index 6a2ca2627a2..7f822547258 100644 --- a/solr/solrj/src/test/org/apache/solr/client/solrj/util/ClientUtilsTest.java +++ b/solr/solrj/src/test/org/apache/solr/client/solrj/util/ClientUtilsTest.java @@ -16,14 +16,14 @@ */ package org.apache.solr.client.solrj.util; -import org.apache.lucene.util.LuceneTestCase; +import org.apache.solr.SolrTestCase; /** * * * @since solr 1.3 */ -public class ClientUtilsTest extends LuceneTestCase { +public class ClientUtilsTest extends SolrTestCase { public void testEscapeQuery() { diff --git a/solr/solrj/src/test/org/apache/solr/common/SolrDocumentTest.java b/solr/solrj/src/test/org/apache/solr/common/SolrDocumentTest.java index f81fc137a57..d6a2b2e2a57 100644 --- a/solr/solrj/src/test/org/apache/solr/common/SolrDocumentTest.java +++ b/solr/solrj/src/test/org/apache/solr/common/SolrDocumentTest.java @@ -23,11 +23,11 @@ import java.util.Iterator; import java.util.List; import java.util.Map; -import org.apache.lucene.util.LuceneTestCase; +import org.apache.solr.SolrTestCase; /** */ -public class SolrDocumentTest extends LuceneTestCase +public class SolrDocumentTest extends SolrTestCase { public void testSimple() { diff --git a/solr/solrj/src/test/org/apache/solr/common/TestToleratedUpdateError.java b/solr/solrj/src/test/org/apache/solr/common/TestToleratedUpdateError.java index 031b608d651..c5cbb4a9988 100644 --- a/solr/solrj/src/test/org/apache/solr/common/TestToleratedUpdateError.java +++ b/solr/solrj/src/test/org/apache/solr/common/TestToleratedUpdateError.java @@ -18,15 +18,15 @@ package org.apache.solr.common; import java.util.EnumSet; +import org.apache.solr.SolrTestCase; import org.apache.solr.common.ToleratedUpdateError.CmdType; import org.apache.solr.common.util.SimpleOrderedMap; -import org.apache.lucene.util.LuceneTestCase; import org.apache.lucene.util.TestUtil; import org.junit.Test; /** Basic testing of the serialization/encapsulation code in ToleratedUpdateError */ -public class TestToleratedUpdateError extends LuceneTestCase { +public class TestToleratedUpdateError extends SolrTestCase { private final static CmdType[] ALL_TYPES = EnumSet.allOf(CmdType.class).toArray(new CmdType[0]); diff --git a/solr/solrj/src/test/org/apache/solr/common/params/CommonAdminParamsTest.java b/solr/solrj/src/test/org/apache/solr/common/params/CommonAdminParamsTest.java index 3fc663776d2..355bbec1dc9 100644 --- a/solr/solrj/src/test/org/apache/solr/common/params/CommonAdminParamsTest.java +++ b/solr/solrj/src/test/org/apache/solr/common/params/CommonAdminParamsTest.java @@ -16,7 +16,7 @@ */ package org.apache.solr.common.params; -import org.apache.lucene.util.LuceneTestCase; +import org.apache.solr.SolrTestCase; /** * Unit test for {@link CommonAdminParams CommonAdminParams} @@ -24,7 +24,7 @@ import org.apache.lucene.util.LuceneTestCase; * This class tests backwards compatibility of CommonAdminParams parameter constants. * If someone accidentally changes those constants then this test will flag that up. */ -public class CommonAdminParamsTest extends LuceneTestCase +public class CommonAdminParamsTest extends SolrTestCase { public void testAsync() { assertEquals(CommonAdminParams.ASYNC, "async"); } } diff --git a/solr/solrj/src/test/org/apache/solr/common/params/CommonParamsTest.java b/solr/solrj/src/test/org/apache/solr/common/params/CommonParamsTest.java index 65f555b16ea..98e23682cd5 100755 --- a/solr/solrj/src/test/org/apache/solr/common/params/CommonParamsTest.java +++ b/solr/solrj/src/test/org/apache/solr/common/params/CommonParamsTest.java @@ -16,7 +16,7 @@ */ package org.apache.solr.common.params; -import org.apache.lucene.util.LuceneTestCase; +import org.apache.solr.SolrTestCase; /** * Unit test for {@link CommonParams} @@ -24,7 +24,7 @@ import org.apache.lucene.util.LuceneTestCase; * This class tests backwards compatibility of CommonParams parameter constants. * If someone accidentally changes those constants then this test will flag that up. */ -public class CommonParamsTest extends LuceneTestCase +public class CommonParamsTest extends SolrTestCase { public void testStart() { assertEquals("start", CommonParams.START); } public void testStartDefault() { assertEquals(0, CommonParams.START_DEFAULT); } diff --git a/solr/solrj/src/test/org/apache/solr/common/params/ModifiableSolrParamsTest.java b/solr/solrj/src/test/org/apache/solr/common/params/ModifiableSolrParamsTest.java index c315b088eca..496686a603b 100644 --- a/solr/solrj/src/test/org/apache/solr/common/params/ModifiableSolrParamsTest.java +++ b/solr/solrj/src/test/org/apache/solr/common/params/ModifiableSolrParamsTest.java @@ -16,7 +16,7 @@ */ package org.apache.solr.common.params; -import org.apache.lucene.util.LuceneTestCase; +import org.apache.solr.SolrTestCase; import java.util.HashMap; import java.util.Map; @@ -25,7 +25,7 @@ import java.util.Map; * Unit Test Case for {@link org.apache.solr.common.params.ModifiableSolrParams * ModifiableSolrParams} */ -public class ModifiableSolrParamsTest extends LuceneTestCase { +public class ModifiableSolrParamsTest extends SolrTestCase { @Override public void setUp() throws Exception diff --git a/solr/solrj/src/test/org/apache/solr/common/params/ShardParamsTest.java b/solr/solrj/src/test/org/apache/solr/common/params/ShardParamsTest.java index b300a0fd55b..306dbde3ee9 100644 --- a/solr/solrj/src/test/org/apache/solr/common/params/ShardParamsTest.java +++ b/solr/solrj/src/test/org/apache/solr/common/params/ShardParamsTest.java @@ -16,7 +16,7 @@ */ package org.apache.solr.common.params; -import org.apache.lucene.util.LuceneTestCase; +import org.apache.solr.SolrTestCase; import org.apache.solr.common.SolrException; import org.junit.Test; @@ -24,7 +24,7 @@ import org.junit.Test; * This class tests backwards compatibility of {@link ShardParams} parameter constants. * If someone accidentally changes those constants then this test will flag that up. */ -public class ShardParamsTest extends LuceneTestCase +public class ShardParamsTest extends SolrTestCase { public void testShards() { assertEquals(ShardParams.SHARDS, "shards"); } diff --git a/solr/solrj/src/test/org/apache/solr/common/params/SolrParamTest.java b/solr/solrj/src/test/org/apache/solr/common/params/SolrParamTest.java index e67415328eb..fb8d5ec5219 100644 --- a/solr/solrj/src/test/org/apache/solr/common/params/SolrParamTest.java +++ b/solr/solrj/src/test/org/apache/solr/common/params/SolrParamTest.java @@ -22,12 +22,12 @@ import java.util.Iterator; import java.util.List; import java.util.Map; -import org.apache.lucene.util.LuceneTestCase; +import org.apache.solr.SolrTestCase; import org.apache.solr.common.SolrException; /** */ -public class SolrParamTest extends LuceneTestCase { +public class SolrParamTest extends SolrTestCase { public void testParamIterators() { diff --git a/solr/solrj/src/test/org/apache/solr/common/util/NamedListTest.java b/solr/solrj/src/test/org/apache/solr/common/util/NamedListTest.java index 9e103206d65..af642a03472 100644 --- a/solr/solrj/src/test/org/apache/solr/common/util/NamedListTest.java +++ b/solr/solrj/src/test/org/apache/solr/common/util/NamedListTest.java @@ -20,11 +20,11 @@ import java.util.ArrayList; import java.util.List; import java.util.Map; -import org.apache.lucene.util.LuceneTestCase; +import org.apache.solr.SolrTestCase; import org.apache.solr.common.SolrException; import org.junit.Test; -public class NamedListTest extends LuceneTestCase { +public class NamedListTest extends SolrTestCase { public void testRemove() { NamedList nl = new NamedList<>(); nl.add("key1", "value1"); diff --git a/solr/solrj/src/test/org/apache/solr/common/util/TestFastInputStream.java b/solr/solrj/src/test/org/apache/solr/common/util/TestFastInputStream.java index 42697ac2f94..3110fc4385f 100644 --- a/solr/solrj/src/test/org/apache/solr/common/util/TestFastInputStream.java +++ b/solr/solrj/src/test/org/apache/solr/common/util/TestFastInputStream.java @@ -16,7 +16,7 @@ */ package org.apache.solr.common.util; -import org.apache.lucene.util.LuceneTestCase; +import org.apache.solr.SolrTestCase; import org.junit.Test; import java.io.*; @@ -29,7 +29,7 @@ import java.util.zip.GZIPOutputStream; * * @see org.apache.solr.common.util.FastInputStream */ -public class TestFastInputStream extends LuceneTestCase { +public class TestFastInputStream extends SolrTestCase { @Test // commented out on: 24-Dec-2018 @BadApple(bugUrl="https://issues.apache.org/jira/browse/SOLR-12028") // added 20-Sep-2018 public void testgzip() throws Exception { diff --git a/solr/solrj/src/test/org/apache/solr/common/util/TestFastWriter.java b/solr/solrj/src/test/org/apache/solr/common/util/TestFastWriter.java index 5b240fef853..ae9d9adaa2c 100644 --- a/solr/solrj/src/test/org/apache/solr/common/util/TestFastWriter.java +++ b/solr/solrj/src/test/org/apache/solr/common/util/TestFastWriter.java @@ -21,7 +21,7 @@ import java.util.LinkedList; import java.util.List; import java.util.Random; -import org.apache.lucene.util.LuceneTestCase; +import org.apache.solr.SolrTestCase; class MemWriter extends FastWriter { @@ -54,7 +54,7 @@ class MemWriter extends FastWriter { -public class TestFastWriter extends LuceneTestCase { +public class TestFastWriter extends SolrTestCase { Random rand; char[] arr; diff --git a/solr/solrj/src/test/org/apache/solr/common/util/TestHash.java b/solr/solrj/src/test/org/apache/solr/common/util/TestHash.java index 15d1660ff33..b58371a17f0 100644 --- a/solr/solrj/src/test/org/apache/solr/common/util/TestHash.java +++ b/solr/solrj/src/test/org/apache/solr/common/util/TestHash.java @@ -16,13 +16,13 @@ */ package org.apache.solr.common.util; -import org.apache.lucene.util.LuceneTestCase; +import org.apache.solr.SolrTestCase; import java.util.Random; /** Tests for lookup3ycs hash functions */ -public class TestHash extends LuceneTestCase { +public class TestHash extends SolrTestCase { // Test that the java version produces the same output as the C version public void testEqualsLOOKUP3() { diff --git a/solr/solrj/src/test/org/apache/solr/common/util/TestNamedListCodec.java b/solr/solrj/src/test/org/apache/solr/common/util/TestNamedListCodec.java index d53889e7ce7..b68b7895a5c 100644 --- a/solr/solrj/src/test/org/apache/solr/common/util/TestNamedListCodec.java +++ b/solr/solrj/src/test/org/apache/solr/common/util/TestNamedListCodec.java @@ -16,8 +16,8 @@ */ package org.apache.solr.common.util; -import org.apache.lucene.util.LuceneTestCase; import org.apache.solr.BaseDistributedSearchTestCase; +import org.apache.solr.SolrTestCase; import org.apache.solr.common.SolrDocument; import org.apache.solr.common.SolrDocumentList; import org.junit.Test; @@ -30,7 +30,7 @@ import java.util.ArrayList; import java.util.Map; import java.util.HashMap; -public class TestNamedListCodec extends LuceneTestCase { +public class TestNamedListCodec extends SolrTestCase { @Test // commented out on: 24-Dec-2018 @BadApple(bugUrl="https://issues.apache.org/jira/browse/SOLR-12028") // added 20-Sep-2018 public void testSimple() throws Exception{ diff --git a/solr/solrj/src/test/org/apache/solr/common/util/TestXMLEscaping.java b/solr/solrj/src/test/org/apache/solr/common/util/TestXMLEscaping.java index 8d5da1597b6..79bff0fd4f2 100644 --- a/solr/solrj/src/test/org/apache/solr/common/util/TestXMLEscaping.java +++ b/solr/solrj/src/test/org/apache/solr/common/util/TestXMLEscaping.java @@ -18,12 +18,12 @@ package org.apache.solr.common.util; import java.io.IOException; import java.io.StringWriter; -import org.apache.lucene.util.LuceneTestCase; +import org.apache.solr.SolrTestCase; /** Test (some of the) character escaping functions of the XML class */ -public class TestXMLEscaping extends LuceneTestCase { +public class TestXMLEscaping extends SolrTestCase { private void doSimpleTest(String input,String expectedOutput) throws IOException { final StringWriter sw = new StringWriter(); XML.escapeCharData(input, sw); diff --git a/solr/test-framework/src/java/org/apache/solr/SolrTestCase.java b/solr/test-framework/src/java/org/apache/solr/SolrTestCase.java new file mode 100644 index 00000000000..4b50a1a7d4e --- /dev/null +++ b/solr/test-framework/src/java/org/apache/solr/SolrTestCase.java @@ -0,0 +1,48 @@ +/* + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright ownership. + * The ASF licenses this file to You under the Apache License, Version 2.0 + * (the "License"); you may not use this file except in compliance with + * the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.apache.solr; + +import java.lang.invoke.MethodHandles; + +import org.apache.lucene.util.LuceneTestCase; +import org.apache.solr.util.StartupLoggingUtils; +import org.junit.AfterClass; +import org.slf4j.Logger; +import org.slf4j.LoggerFactory; + +/** + * All Solr test cases should derive from this class eventually. This is originally a result of async logging, see: + * SOLR-12055 and associated. To enable async logging, we must gracefully shut down logging. Many Solr tests subclass + * LuceneTestCase. + * + * Rather than add the cruft from SolrTestCaseJ4 to all the Solr tests that currently subclass LuceneTestCase, + * we'll add the shutdown to this class and subclass it. + * + * Other changes that should affect every Solr test case may go here if they don't require the added capabilities in + * SolrTestCaseJ4. + */ + +public class SolrTestCase extends LuceneTestCase { + + private static final Logger log = LoggerFactory.getLogger(MethodHandles.lookup().lookupClass()); + + @AfterClass + public static void shutdownLogger() throws Exception { + StartupLoggingUtils.shutdown(); + } +} diff --git a/solr/test-framework/src/java/org/apache/solr/SolrTestCaseJ4.java b/solr/test-framework/src/java/org/apache/solr/SolrTestCaseJ4.java index 07cde2f4fc4..18b6ec17ea1 100644 --- a/solr/test-framework/src/java/org/apache/solr/SolrTestCaseJ4.java +++ b/solr/test-framework/src/java/org/apache/solr/SolrTestCaseJ4.java @@ -78,7 +78,6 @@ import org.apache.lucene.analysis.MockAnalyzer; import org.apache.lucene.analysis.MockTokenizer; import org.apache.lucene.index.IndexWriterConfig; import org.apache.lucene.util.Constants; -import org.apache.lucene.util.LuceneTestCase; import org.apache.lucene.util.LuceneTestCase.SuppressFileSystems; import org.apache.lucene.util.LuceneTestCase.SuppressSysoutChecks; import org.apache.lucene.util.QuickPatchThreadsFilter; @@ -162,7 +161,7 @@ import static org.apache.solr.update.processor.DistributedUpdateProcessor.Distri import static org.apache.solr.update.processor.DistributingUpdateProcessorFactory.DISTRIB_UPDATE_PARAM; /** - * A junit4 Solr test harness that extends LuceneTestCaseJ4. + * A junit4 Solr test harness that extends SolrTestCase and, by extension, LuceneTestCase. * To change which core is used when loading the schema and solrconfig.xml, simply * invoke the {@link #initCore(String, String, String, String)} method. */ @@ -174,7 +173,7 @@ import static org.apache.solr.update.processor.DistributingUpdateProcessorFactor @SuppressFileSystems("ExtrasFS") // might be ok, the failures with e.g. nightly runs might be "normal" @RandomizeSSL() @ThreadLeakLingering(linger = 10000) -public abstract class SolrTestCaseJ4 extends LuceneTestCase { +public abstract class SolrTestCaseJ4 extends SolrTestCase { private static final Logger log = LoggerFactory.getLogger(MethodHandles.lookup().lookupClass()); @@ -279,8 +278,8 @@ public abstract class SolrTestCaseJ4 extends LuceneTestCase { System.setProperty("solr.httpclient.retries", "1"); System.setProperty("solr.retries.on.forward", "1"); - System.setProperty("solr.retries.to.followers", "1"); - + System.setProperty("solr.retries.to.followers", "1"); + System.setProperty("solr.v2RealPath", "true"); System.setProperty("zookeeper.forceSync", "no"); System.setProperty("jetty.testMode", "true"); @@ -349,8 +348,6 @@ public abstract class SolrTestCaseJ4 extends LuceneTestCase { sslConfig = null; testSolrHome = null; - StartupLoggingUtils.shutdown(); - IpTables.unblockAllPorts(); LogLevel.Configurer.restoreLogLevels(savedClassLogLevels); diff --git a/solr/test-framework/src/java/org/apache/solr/util/DOMUtilTestBase.java b/solr/test-framework/src/java/org/apache/solr/util/DOMUtilTestBase.java index 61a30072230..9858fed9aed 100644 --- a/solr/test-framework/src/java/org/apache/solr/util/DOMUtilTestBase.java +++ b/solr/test-framework/src/java/org/apache/solr/util/DOMUtilTestBase.java @@ -24,12 +24,12 @@ import javax.xml.xpath.XPath; import javax.xml.xpath.XPathConstants; import javax.xml.xpath.XPathFactory; -import org.apache.lucene.util.LuceneTestCase; +import org.apache.solr.SolrTestCase; import org.w3c.dom.Document; import org.w3c.dom.Node; import org.xml.sax.InputSource; -public abstract class DOMUtilTestBase extends LuceneTestCase { +public abstract class DOMUtilTestBase extends SolrTestCase { private DocumentBuilder builder; private static final XPathFactory xpathFactory = XPathFactory.newInstance(); diff --git a/solr/test-framework/src/test/org/apache/solr/cloud/MiniSolrCloudClusterTest.java b/solr/test-framework/src/test/org/apache/solr/cloud/MiniSolrCloudClusterTest.java index ac1c5e17a79..d7dbcc76b5c 100644 --- a/solr/test-framework/src/test/org/apache/solr/cloud/MiniSolrCloudClusterTest.java +++ b/solr/test-framework/src/test/org/apache/solr/cloud/MiniSolrCloudClusterTest.java @@ -22,6 +22,7 @@ import java.util.concurrent.atomic.AtomicInteger; import com.carrotsearch.randomizedtesting.rules.SystemPropertiesRestoreRule; import org.apache.lucene.util.LuceneTestCase; +import org.apache.solr.SolrTestCase; import org.apache.solr.client.solrj.embedded.JettyConfig; import org.apache.solr.client.solrj.embedded.JettySolrRunner; import org.apache.solr.util.RevertDefaultThreadHandlerRule; @@ -31,7 +32,7 @@ import org.junit.rules.RuleChain; import org.junit.rules.TestRule; @LuceneTestCase.SuppressSysoutChecks(bugUrl = "Solr logs to JUL") -public class MiniSolrCloudClusterTest extends LuceneTestCase { +public class MiniSolrCloudClusterTest extends SolrTestCase { @ClassRule public static TestRule solrClassRules = RuleChain.outerRule(