Attempting to clean up some remaining Solr references (#12939)

* Attempting to clean up some remaining Solr references

* Update gradle/help.gradle

Co-authored-by: Dawid Weiss <dawid.weiss@gmail.com>

---------

Co-authored-by: Dawid Weiss <dawid.weiss@gmail.com>
This commit is contained in:
Jakub Slowinski 2023-12-14 11:02:16 +00:00 committed by GitHub
parent da69346257
commit 3965319441
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
18 changed files with 31 additions and 50 deletions

View File

@ -5,8 +5,8 @@ as to the usefulness of the tools.
Description of dev-tools/ contents:
./size-estimator-lucene-solr.xls -- Spreadsheet for estimating memory and disk usage in Lucene/Solr
./aws-jmh/ -- Scripts for running microbenchmarks across different ec2 instance types.
./doap/ -- Lucene project descriptors in DOAP RDF format.
./missing-doclet -- JavaDoc validation doclet subproject
./doap/ -- Lucene and Solr project descriptors in DOAP RDF format.
./scripts/ -- Odds and ends for building releases, etc.
./test-patch/ -- Scripts for automatically validating patches
./scripts/ -- Odds and ends for building releases, etc.
./test-patch/ -- Scripts for automatically validating patches

View File

@ -46,7 +46,7 @@ configure(rootProject) {
help {
doLast {
println ""
println "This is an experimental Lucene/Solr gradle build. See some"
println "This is Lucene's gradle build. See some"
println "guidelines, ant-equivalent commands etc. under help/*; or type:"
println ""
helpFiles.each { section, path, sectionInfo ->

View File

@ -144,7 +144,6 @@ allprojects {
"tests.leaveTemporary",
"tests.leavetemporary",
"tests.leavetmpdir",
"solr.test.leavetmpdir",
].find { prop ->
def v = Boolean.parseBoolean(propertyOrDefault(prop, "false"))
if (v) {

View File

@ -80,11 +80,6 @@ grant {
// used by nested tests? (e.g. TestLeaveFilesIfTestFails). TODO: look into this
permission java.util.PropertyPermission "tests.runnested", "write";
// solr properties. TODO: move these out to SolrTestCase
permission java.util.PropertyPermission "solr.data.dir", "write";
permission java.util.PropertyPermission "solr.solr.home", "write";
permission java.util.PropertyPermission "solr.directoryFactory", "write";
// allows LuceneTestCase#runWithRestrictedPermissions to execute with lower (or no) permission
permission java.security.SecurityPermission "createAccessControlContext";

View File

@ -213,6 +213,8 @@ Other
* GITHUB#11023: Removing @lucene.experimental tags in testXXX methods in CheckIndex. (Jakub Slowinski)
* GITHUB#12934: Cleaning up old references to Lucene/Solr. (Jakub Slowinski)
======================== Lucene 9.9.1 =======================
Bug Fixes

View File

@ -78,8 +78,8 @@ import org.apache.lucene.util.bkd.BKDWriter;
* test focuses on geospatial (distance queries, polygon queries, etc) indexing and search, not any
* underlying storage format or encoding: it merely supplies two hooks for the encoding so that
* tests can be exact. The [stretch] goal is for this test to be so thorough in testing a new geo
* impl that if this test passes, then all Lucene/Solr tests should also pass. Ie, if there is some
* bug in a given geo impl that this test fails to catch then this test needs to be improved!
* impl that if this test passes, then all Lucene tests should also pass. Ie, if there is some bug
* in a given geo impl that this test fails to catch then this test needs to be improved!
*/
public abstract class BaseGeoPointTestCase extends LuceneTestCase {

View File

@ -51,9 +51,9 @@ import org.apache.lucene.util.Version;
/**
* Abstract class to do basic tests for a compound format. NOTE: This test focuses on the compound
* impl, nothing else. The [stretch] goal is for this test to be so thorough in testing a new
* CompoundFormat that if this test passes, then all Lucene/Solr tests should also pass. Ie, if
* there is some bug in a given CompoundFormat that this test fails to catch then this test needs to
* be improved!
* CompoundFormat that if this test passes, then all Lucene tests should also pass. Ie, if there is
* some bug in a given CompoundFormat that this test fails to catch then this test needs to be
* improved!
*/
public abstract class BaseCompoundFormatTestCase extends BaseIndexFileFormatTestCase {

View File

@ -94,9 +94,9 @@ import org.apache.lucene.util.automaton.RegExp;
/**
* Abstract class to do basic tests for a docvalues format. NOTE: This test focuses on the docvalues
* impl, nothing else. The [stretch] goal is for this test to be so thorough in testing a new
* DocValuesFormat that if this test passes, then all Lucene/Solr tests should also pass. Ie, if
* there is some bug in a given DocValuesFormat that this test fails to catch then this test needs
* to be improved!
* DocValuesFormat that if this test passes, then all Lucene tests should also pass. Ie, if there is
* some bug in a given DocValuesFormat that this test fails to catch then this test needs to be
* improved!
*/
public abstract class BaseDocValuesFormatTestCase extends BaseIndexFileFormatTestCase {

View File

@ -52,8 +52,8 @@ import org.apache.lucene.util.Version;
/**
* Abstract class to do basic tests for fis format. NOTE: This test focuses on the fis impl, nothing
* else. The [stretch] goal is for this test to be so thorough in testing a new fis format that if
* this test passes, then all Lucene/Solr tests should also pass. Ie, if there is some bug in a
* given fis Format that this test fails to catch then this test needs to be improved!
* this test passes, then all Lucene tests should also pass. Ie, if there is some bug in a given fis
* Format that this test fails to catch then this test needs to be improved!
*/
public abstract class BaseFieldInfoFormatTestCase extends BaseIndexFileFormatTestCase {

View File

@ -54,8 +54,8 @@ import org.apache.lucene.util.IOUtils;
/**
* Abstract class to do basic tests for a norms format. NOTE: This test focuses on the norms impl,
* nothing else. The [stretch] goal is for this test to be so thorough in testing a new NormsFormat
* that if this test passes, then all Lucene/Solr tests should also pass. Ie, if there is some bug
* in a given NormsFormat that this test fails to catch then this test needs to be improved!
* that if this test passes, then all Lucene tests should also pass. Ie, if there is some bug in a
* given NormsFormat that this test fails to catch then this test needs to be improved!
*/
public abstract class BaseNormsFormatTestCase extends BaseIndexFileFormatTestCase {

View File

@ -63,8 +63,8 @@ import org.apache.lucene.util.NumericUtils;
/**
* Abstract class to do basic tests for a points format. NOTE: This test focuses on the points impl,
* nothing else. The [stretch] goal is for this test to be so thorough in testing a new PointsFormat
* that if this test passes, then all Lucene/Solr tests should also pass. Ie, if there is some bug
* in a given PointsFormat that this test fails to catch then this test needs to be improved!
* that if this test passes, then all Lucene tests should also pass. Ie, if there is some bug in a
* given PointsFormat that this test fails to catch then this test needs to be improved!
*/
public abstract class BasePointsFormatTestCase extends BaseIndexFileFormatTestCase {

View File

@ -77,9 +77,9 @@ import org.junit.BeforeClass;
/**
* Abstract class to do basic tests for a postings format. NOTE: This test focuses on the postings
* (docs/freqs/positions/payloads/offsets) impl, not the terms dict. The [stretch] goal is for this
* test to be so thorough in testing a new PostingsFormat that if this test passes, then all
* Lucene/Solr tests should also pass. Ie, if there is some bug in a given PostingsFormat that this
* test fails to catch then this test needs to be improved!
* test to be so thorough in testing a new PostingsFormat that if this test passes, then all Lucene
* tests should also pass. Ie, if there is some bug in a given PostingsFormat that this test fails
* to catch then this test needs to be improved!
*/
// TODO can we make it easy for testing to pair up a "random terms dict impl" with your postings

View File

@ -44,8 +44,8 @@ import org.apache.lucene.util.Version;
/**
* Abstract class to do basic tests for si format. NOTE: This test focuses on the si impl, nothing
* else. The [stretch] goal is for this test to be so thorough in testing a new si format that if
* this test passes, then all Lucene/Solr tests should also pass. Ie, if there is some bug in a
* given si Format that this test fails to catch then this test needs to be improved!
* this test passes, then all Lucene tests should also pass. Ie, if there is some bug in a given si
* Format that this test fails to catch then this test needs to be improved!
*/
public abstract class BaseSegmentInfoFormatTestCase extends BaseIndexFileFormatTestCase {

View File

@ -42,8 +42,8 @@ import org.junit.BeforeClass;
/**
* Abstract class to do basic tests for a similarity. NOTE: This test focuses on the similarity
* impl, nothing else. The [stretch] goal is for this test to be so thorough in testing a new
* Similarity that if this test passes, then all Lucene/Solr tests should also pass. Ie, if there is
* some bug in a given Similarity that this test fails to catch then this test needs to be improved!
* Similarity that if this test passes, then all Lucene tests should also pass. Ie, if there is some
* bug in a given Similarity that this test fails to catch then this test needs to be improved!
*/
public abstract class BaseSimilarityTestCase extends LuceneTestCase {

View File

@ -494,8 +494,7 @@ public abstract class LuceneTestCase extends Assert {
Arrays.asList(
"tests.leaveTemporary" /* ANT tasks's (junit4) flag. */,
"tests.leavetemporary" /* lowercase */,
"tests.leavetmpdir" /* default */,
"solr.test.leavetmpdir" /* Solr's legacy */)) {
"tests.leavetmpdir" /* default */)) {
defaultValue |= systemPropertyAsBoolean(property, false);
}
LEAVE_TEMPORARY = defaultValue;
@ -659,13 +658,7 @@ public abstract class LuceneTestCase extends Assert {
// We reset the default locale and timezone; these properties change as a
// side-effect
"user.language",
"user.timezone",
// TODO: these should, ideally, be moved to Solr's base class.
"solr.directoryFactory",
"solr.solr.home",
"solr.data.dir"))
"user.language", "user.timezone"))
.around(classEnvRule = new TestRuleSetupAndRestoreClassEnv());
}

View File

@ -20,7 +20,7 @@ import org.junit.rules.TestRule;
import org.junit.runner.Description;
import org.junit.runners.model.Statement;
/** Require assertions for Lucene/Solr packages. */
/** Require assertions for Lucene packages. */
public class TestRuleAssertionsRequired implements TestRule {
@Override
public Statement apply(final Statement base, final Description description) {

View File

@ -105,13 +105,6 @@ final class TestRuleSetupAndRestoreClassEnv extends AbstractBeforeAfterRule {
@Override
protected void before() throws Exception {
// enable this by default, for IDE consistency with ant tests (as it's the default from ant)
// TODO: really should be in solr base classes, but some extend LTC directly.
// we do this in beforeClass, because some tests currently disable it
if (System.getProperty("solr.directoryFactory") == null) {
System.setProperty("solr.directoryFactory", "org.apache.solr.core.MockDirectoryFactory");
}
// if verbose: print some debugging stuff about which codecs are loaded.
if (VERBOSE) {
System.out.println("Loaded codecs: " + Codec.availableCodecs());

View File

@ -235,7 +235,6 @@ final class TestRuleTemporaryFilesCleanup extends TestRuleAdapter {
Class<?> clazz = ctx.getTargetClass();
String prefix = clazz.getName();
prefix = prefix.replaceFirst("^org.apache.lucene.", "lucene.");
prefix = prefix.replaceFirst("^org.apache.solr.", "solr.");
int attempt = 0;
Path f;