SOLR-13268: Clean up any test failures resulting from defaulting to async logging

This commit is contained in:
erick 2019-03-10 11:05:00 -07:00
parent 27df824a4b
commit 9272c29539
166 changed files with 387 additions and 372 deletions

View File

@ -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, '<tag>', xmlTagPattern, xmlCommentPattern, text, ratDocument);

View File

@ -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.

View File

@ -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());

View File

@ -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();

View File

@ -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() {

View File

@ -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 {

View File

@ -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;

View File

@ -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();

View File

@ -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));

View File

@ -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());

View File

@ -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 {

View File

@ -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 {

View File

@ -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());

View File

@ -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());

View File

@ -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[] {

View File

@ -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

View File

@ -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));

View File

@ -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

View File

@ -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:

View File

@ -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:

View File

@ -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() {

View File

@ -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() {

View File

@ -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;

View File

@ -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() {

View File

@ -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 {

View File

@ -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;

View File

@ -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);

View File

@ -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() {

View File

@ -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 <code>org.apache.solr.search.LRUCache</code>
*/
public class TestLRUCache extends LuceneTestCase {
public class TestLRUCache extends SolrTestCase {
SolrMetricManager metricManager = new SolrMetricManager();
String registry = TestUtil.randomSimpleString(random(), 2, 10);

View File

@ -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();

View File

@ -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;

View File

@ -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.
*/

View File

@ -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, ?);
//}
}

View File

@ -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;
* <p>
* 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 {

View File

@ -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};

View File

@ -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 {

View File

@ -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;

View File

@ -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;

View File

@ -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();

View File

@ -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.
*

View File

@ -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;

View File

@ -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()

View File

@ -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);

View File

@ -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);

View File

@ -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 {

View File

@ -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();

View File

@ -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;

View File

@ -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:

View File

@ -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:

View File

@ -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();

View File

@ -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() {

View File

@ -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 {

View File

@ -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;

View File

@ -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 {

View File

@ -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);

View File

@ -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();

View File

@ -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

View File

@ -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;

View File

@ -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;

View File

@ -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;

View File

@ -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 {

View File

@ -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() {

View File

@ -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,

View File

@ -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.
*/

View File

@ -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.
*/

View File

@ -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)}.
*/

View File

@ -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)}.
*/

View File

@ -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

View File

@ -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

View File

@ -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.

View File

@ -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;
/**

View File

@ -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");

View File

@ -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

View File

@ -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");

View File

@ -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

View File

@ -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";

View File

@ -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

View File

@ -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";

View File

@ -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

View File

@ -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() {

View File

@ -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"));

View File

@ -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();

View File

@ -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();

View File

@ -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",

View File

@ -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;

View File

@ -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;

View File

@ -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<String, Object> values;

View File

@ -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<String, Object> values;

View File

@ -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<String, Object> values;

View File

@ -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<String, Object> values;

View File

@ -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<String, Object> values;

View File

@ -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<String, Object> values;

View File

@ -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<String, Object> values;

View File

@ -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<String, Object> values;

View File

@ -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<String, Object> values;

View File

@ -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<String, Object> values;

View File

@ -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<String, Object> values;

View File

@ -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<String, Object> values;

View File

@ -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<String, Object> values;

View File

@ -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<String, Object> values;

Some files were not shown because too many files have changed in this diff Show More