Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
22 changes: 4 additions & 18 deletions gradle/testing/randomization.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -90,7 +90,7 @@ allprojects {
// asserts, debug output.
[propName: 'tests.asserts', value: "true", description: "Enables or disables assertions mode."],
[propName: 'tests.infostream', value: false, description: "Enables or disables infostream logs."],
[propName: 'tests.leaveTemporary', value: false, description: "Leave temporary directories after tests complete."],
[propName: 'tests.leavetmpdir.enabled', value: false, description: "Leave temporary directories after tests complete."],
[propName: 'tests.useSecurityManager',
value: {->
rootProject.ext.runtimeJavaVersion <= JavaVersion.VERSION_23 ? 'true' : 'false'},
Expand Down Expand Up @@ -130,7 +130,7 @@ configure(allprojects.findAll {project -> project.path.startsWith(":solr")}) {
project.ext {
testOptions += [
[propName: 'tests.src.home', value: null, description: "See SOLR-14023."],
[propName: 'solr.tests.use.numeric.points', value: null, description: "Point implementation to use (true=numerics, false=trie)."],
[propName: 'tests.solr.use.numeric.points', value: null, description: "Point implementation to use (true=numerics, false=trie)."],
[propName: 'tests.ssl', value: null, description: "Control SSL: true=force on, false=force off, unset=randomize (all respect @SuppressSSL)."],
[propName: 'tests.selenium', value: false, description: "Enables or disables @SeleniumTest tests (browser-based, need a local Chrome)."],
]
Expand Down Expand Up @@ -161,22 +161,8 @@ allprojects {
Commandline.quoteArgument("-P" + opt.propName + "=" + testOptionsResolved[opt.propName])
}.join(" ")

// leaving temporary folder option has multiple aliases...
if ([
"tests.leaveTemporary",
"tests.leavetemporary",
"tests.leavetmpdir",
"solr.test.leavetmpdir",
].find {prop ->
def v = Boolean.parseBoolean(propertyOrDefault(prop, "false"))
if (v) {
logger
.lifecycle("Update your code to use the official 'tests.leaveTemporary' option (you used '${prop}').")
}
return v
}) {
testOptionsResolved['tests.leaveTemporary'] = "true"
}

testOptionsResolved['tests.leavetmpdir.enabled'] = "true"

// Append resolved test properties to the test task.
tasks.withType(Test) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@
<dataDir>${solr.data.dir:}</dataDir>

<directoryFactory name="DirectoryFactory"
class="${solr.directoryFactory:solr.NRTCachingDirectoryFactory}"/>
class="${tests.solr.directory.factory:solr.NRTCachingDirectoryFactory}"/>
<schemaFactory class="ClassicIndexSchemaFactory"/>

<luceneMatchVersion>${tests.luceneMatchVersion:LATEST}</luceneMatchVersion>
Expand All @@ -44,4 +44,3 @@

</requestHandler>
</config>

2 changes: 1 addition & 1 deletion solr/benchmark/src/resources/solr.xml
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@
<str name="configSetBaseDir">${configSetBaseDir:configsets}</str>
<str name="coreRootDirectory">${coreRootDirectory:.}</str>
<str name="allowPaths">${solr.security.allow.paths:}</str>
<str name="allowUrls">${solr.tests.security.allow.urls:}</str>
<str name="allowUrls">${tests.solr.security.allow.urls:}</str>

<shardHandlerFactory name="shardHandlerFactory" class="HttpShardHandlerFactory">
<int name="socketTimeout">${socketTimeout:15000}</int>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@
-->

<schema name="test" version="1.7">
<fieldType name="long" class="${solr.tests.LongFieldType}" docValues="${solr.tests.numeric.dv}" stored="true" indexed="true"/>
<fieldType name="long" class="${tests.solr.LongFieldType}" docValues="${tests.solr.numeric.dv.enabled}" stored="true" indexed="true"/>
<fieldType name="string" class="solr.StrField" />
<fieldType name="text" class="solr.TextField">
<analyzer>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@

<config>

<directoryFactory name="DirectoryFactory" class="${solr.directoryFactory:solr.MockDirectoryFactory}"/>
<directoryFactory name="DirectoryFactory" class="${tests.solr.directory.factory:solr.MockDirectoryFactory}"/>

<luceneMatchVersion>${tests.luceneMatchVersion:LATEST}</luceneMatchVersion>

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@

<config>

<directoryFactory name="DirectoryFactory" class="${solr.directoryFactory:solr.MockDirectoryFactory}"/>
<directoryFactory name="DirectoryFactory" class="${tests.solr.directory.factory:solr.MockDirectoryFactory}"/>

<luceneMatchVersion>${tests.luceneMatchVersion:LATEST}</luceneMatchVersion>

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@

<!-- Test EnumFieldType -->
<!-- Begin bad stuff: EnumFieldType requires docValues -->
<field name="severity" type="severityType" indexed="${solr.tests.EnumFieldTest.indexed}" stored="true" multiValued="false" docValues="false"/>
<field name="severity" type="severityType" indexed="${tests.solr.EnumFieldTest.indexed.enabled}" stored="true" multiValued="false" docValues="false"/>
<!-- End bad stuff -->

<uniqueKey>id</uniqueKey>
Expand All @@ -30,5 +30,5 @@
but you can always add new values to the end. -->
<fieldType name="severityType" class="solr.EnumFieldType" enumsConfig="enumsConfig.xml" enumName="severity"/>
<fieldType name="string" class="solr.StrField"/>
<fieldType name="long" class="${solr.tests.LongFieldType}" docValues="${solr.tests.numeric.dv}" precisionStep="0" omitNorms="true" positionIncrementGap="0"/>
<fieldType name="long" class="${tests.solr.LongFieldType}" docValues="${tests.solr.numeric.dv.enabled}" precisionStep="0" omitNorms="true" positionIncrementGap="0"/>
</schema>
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@
<dataDir>${solr.data.dir:}</dataDir>

<directoryFactory name="DirectoryFactory"
class="${solr.directoryFactory:solr.NRTCachingDirectoryFactory}"/>
class="${tests.solr.directory.factory:solr.NRTCachingDirectoryFactory}"/>
<schemaFactory class="ClassicIndexSchemaFactory"/>

<luceneMatchVersion>${tests.luceneMatchVersion:LATEST}</luceneMatchVersion>
Expand All @@ -49,4 +49,3 @@

</requestHandler>
</config>

Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@

<config>
<luceneMatchVersion>${tests.luceneMatchVersion:LATEST}</luceneMatchVersion>
<directoryFactory name="DirectoryFactory" class="${solr.directoryFactory:solr.MockDirectoryFactory}"/>
<directoryFactory name="DirectoryFactory" class="${tests.solr.directory.factory:solr.MockDirectoryFactory}"/>
<schemaFactory class="ClassicIndexSchemaFactory"/>
<indexConfig>
<useCompoundFile>${unset.sys.property}</useCompoundFile>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ Test for HighlighterMaxOffsetTest which requires the use of ReversedWildcardFilt


<fieldType name="string" class="solr.StrField" sortMissingLast="true"/>
<fieldType name="long" class="${solr.tests.LongFieldType}" docValues="${solr.tests.numeric.dv}" precisionStep="0" positionIncrementGap="0"/>
<fieldType name="long" class="${tests.solr.LongFieldType}" docValues="${tests.solr.numeric.dv.enabled}" precisionStep="0" positionIncrementGap="0"/>


<!-- Just like text_general except it reverses the characters of
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,14 +18,14 @@

<schema name="add-schema-fields-update-processor" version="1.7">

<fieldType name="tint" class="${solr.tests.IntegerFieldType}" docValues="${solr.tests.numeric.dv}" precisionStep="8" multiValued="true" positionIncrementGap="0"/>
<fieldType name="tfloat" class="${solr.tests.FloatFieldType}" docValues="${solr.tests.numeric.dv}" precisionStep="8" multiValued="true" positionIncrementGap="0"/>
<fieldType name="tlong" class="${solr.tests.LongFieldType}" docValues="${solr.tests.numeric.dv}" precisionStep="8" multiValued="true" positionIncrementGap="0"/>
<fieldType name="tdouble" class="${solr.tests.DoubleFieldType}" docValues="${solr.tests.numeric.dv}" precisionStep="8" multiValued="true" positionIncrementGap="0"/>
<fieldType name="tdate" class="${solr.tests.DateFieldType}" docValues="${solr.tests.numeric.dv}" precisionStep="6" multiValued="true" positionIncrementGap="0"/>
<fieldType name="tint" class="${tests.solr.IntegerFieldType}" docValues="${tests.solr.numeric.dv.enabled}" precisionStep="8" multiValued="true" positionIncrementGap="0"/>
<fieldType name="tfloat" class="${tests.solr.FloatFieldType}" docValues="${tests.solr.numeric.dv.enabled}" precisionStep="8" multiValued="true" positionIncrementGap="0"/>
<fieldType name="tlong" class="${tests.solr.LongFieldType}" docValues="${tests.solr.numeric.dv.enabled}" precisionStep="8" multiValued="true" positionIncrementGap="0"/>
<fieldType name="tdouble" class="${tests.solr.DoubleFieldType}" docValues="${tests.solr.numeric.dv.enabled}" precisionStep="8" multiValued="true" positionIncrementGap="0"/>
<fieldType name="tdate" class="${tests.solr.DateFieldType}" docValues="${tests.solr.numeric.dv.enabled}" precisionStep="6" multiValued="true" positionIncrementGap="0"/>
<fieldType name="boolean" class="solr.BoolField" sortMissingLast="true" multiValued="true"/>
<fieldType name="string" class="solr.StrField" sortMissingLast="true"/>
<fieldType name="long" class="${solr.tests.LongFieldType}" docValues="${solr.tests.numeric.dv}" precisionStep="0" positionIncrementGap="0"/>
<fieldType name="long" class="${tests.solr.LongFieldType}" docValues="${tests.solr.numeric.dv.enabled}" precisionStep="0" positionIncrementGap="0"/>
<fieldType name="text" class="solr.TextField" multiValued="true" positionIncrementGap="100">
<analyzer>
<tokenizer class="solr.StandardTokenizerFactory"/>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@
<fieldType name="text" class="solr.TextField"/>
<fieldType name="bool" class="solr.BoolField"/>
<fieldType name="str" class="solr.StrField"/>
<fieldType name="int" class="${solr.tests.IntegerFieldType}"/>
<fieldType name="int" class="${tests.solr.IntegerFieldType}"/>

<!-- explicit props on type -->
<fieldType name="multi_f" class="solr.StrField" multiValued="false"/>
Expand All @@ -47,8 +47,8 @@
<fieldType name="txt_phrase_t" class="solr.TextField"
autoGeneratePhraseQueries="true"/>

<fieldType name="int_dvas_t" class="${solr.tests.IntegerFieldType}" docValues="${solr.tests.numeric.dv}" useDocValuesAsStored="true"/>
<fieldType name="int_dvas_f" class="${solr.tests.IntegerFieldType}" docValues="${solr.tests.numeric.dv}" useDocValuesAsStored="false"/>
<fieldType name="int_dvas_t" class="${tests.solr.IntegerFieldType}" docValues="${tests.solr.numeric.dv.enabled}" useDocValuesAsStored="true"/>
<fieldType name="int_dvas_f" class="${tests.solr.IntegerFieldType}" docValues="${tests.solr.numeric.dv.enabled}" useDocValuesAsStored="false"/>

<fieldType name="str_uninvert_f" class="solr.StrField" uninvertible="false"/>
<fieldType name="str_uninvert_t" class="solr.StrField" uninvertible="true"/>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -27,10 +27,10 @@

<schema name="test" version="1.0">

<fieldType name="int" class="${solr.tests.IntegerFieldType}" docValues="${solr.tests.numeric.dv}" precisionStep="0" positionIncrementGap="0"/>
<fieldType name="float" class="${solr.tests.FloatFieldType}" docValues="${solr.tests.numeric.dv}" precisionStep="0" positionIncrementGap="0"/>
<fieldType name="long" class="${solr.tests.LongFieldType}" docValues="${solr.tests.numeric.dv}" precisionStep="0" positionIncrementGap="0"/>
<fieldType name="double" class="${solr.tests.DoubleFieldType}" docValues="${solr.tests.numeric.dv}" precisionStep="0" positionIncrementGap="0"/>
<fieldType name="int" class="${tests.solr.IntegerFieldType}" docValues="${tests.solr.numeric.dv.enabled}" precisionStep="0" positionIncrementGap="0"/>
<fieldType name="float" class="${tests.solr.FloatFieldType}" docValues="${tests.solr.numeric.dv.enabled}" precisionStep="0" positionIncrementGap="0"/>
<fieldType name="long" class="${tests.solr.LongFieldType}" docValues="${tests.solr.numeric.dv.enabled}" precisionStep="0" positionIncrementGap="0"/>
<fieldType name="double" class="${tests.solr.DoubleFieldType}" docValues="${tests.solr.numeric.dv.enabled}" precisionStep="0" positionIncrementGap="0"/>

<!-- Field type demonstrating an Analyzer failure -->
<fieldType name="failtype1" class="solr.TextField">
Expand Down Expand Up @@ -70,7 +70,7 @@
<!-- format for date is 1995-12-31T23:59:59.999Z and only the fractional
seconds part (.999) is optional.
-->
<fieldType name="date" class="${solr.tests.DateFieldType}" docValues="${solr.tests.numeric.dv}" sortMissingLast="true"/>
<fieldType name="date" class="${tests.solr.DateFieldType}" docValues="${tests.solr.numeric.dv.enabled}" sortMissingLast="true"/>

<!-- solr.TextField allows the specification of custom
text analyzers specified as a tokenizer and a list
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,8 +17,8 @@
-->

<schema name="test-custom-field-sort" version="1.7">
<fieldType name="int" class="${solr.tests.IntegerFieldType}" docValues="${solr.tests.numeric.dv}" precisionStep="0" omitNorms="true" positionIncrementGap="0" uninvertible="true"/>
<fieldType name="long" class="${solr.tests.LongFieldType}" docValues="${solr.tests.numeric.dv}" precisionStep="0" omitNorms="true" positionIncrementGap="0" uninvertible="true"/>
<fieldType name="int" class="${tests.solr.IntegerFieldType}" docValues="${tests.solr.numeric.dv.enabled}" precisionStep="0" omitNorms="true" positionIncrementGap="0" uninvertible="true"/>
<fieldType name="long" class="${tests.solr.LongFieldType}" docValues="${tests.solr.numeric.dv.enabled}" precisionStep="0" omitNorms="true" positionIncrementGap="0" uninvertible="true"/>
<fieldType name="string" class="solr.StrField" sortMissingLast="true"/>
<fieldType name="text" class="solr.TextField">
<analyzer>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -29,8 +29,8 @@

<fieldType name="string" class="solr.StrField"/>

<fieldType name="int" class="${solr.tests.IntegerFieldType}" docValues="${solr.tests.numeric.dv}" precisionStep="0" positionIncrementGap="0"/>
<fieldType name="long" class="${solr.tests.LongFieldType}" docValues="${solr.tests.numeric.dv}" precisionStep="0" positionIncrementGap="0"/>
<fieldType name="int" class="${tests.solr.IntegerFieldType}" docValues="${tests.solr.numeric.dv.enabled}" precisionStep="0" positionIncrementGap="0"/>
<fieldType name="long" class="${tests.solr.LongFieldType}" docValues="${tests.solr.numeric.dv.enabled}" precisionStep="0" positionIncrementGap="0"/>

<fieldType name="customfield" class="org.apache.solr.schema.MyCrazyCustomField" multiValued="true"
positionIncrementGap="100">
Expand All @@ -39,7 +39,7 @@
</analyzer>
</fieldType>

<fieldType name="customintfield" class="${solr.tests.CustomIntFieldType}" docValues="${solr.tests.numeric.dv}" />
<fieldType name="customintfield" class="${tests.solr.CustomIntFieldType}" docValues="${tests.solr.numeric.dv.enabled}" />

<field name="id" type="string" indexed="true" stored="true" multiValued="false" required="true"/>
<field name="intfield" type="int" indexed="true" stored="true"/>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@

<types>
<fieldType name="string" class="solr.StrField"/>
<fieldType name="long" class="${solr.tests.LongFieldType}"/>
<fieldType name="long" class="${tests.solr.LongFieldType}"/>
</types>

<fields>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,11 +17,11 @@
-->

<schema name="test" version="1.7">
<fieldType name="int" class="${solr.tests.IntegerFieldType}" precisionStep="0" omitNorms="true" positionIncrementGap="0"/>
<fieldType name="float" class="${solr.tests.FloatFieldType}" precisionStep="0" omitNorms="true" positionIncrementGap="0"/>
<fieldType name="long" class="${solr.tests.LongFieldType}" precisionStep="0" omitNorms="true" positionIncrementGap="0"/>
<fieldType name="double" class="${solr.tests.DoubleFieldType}" precisionStep="0" omitNorms="true" positionIncrementGap="0"/>
<fieldType name="date" class="${solr.tests.DateFieldType}" precisionStep="0" omitNorms="true" positionIncrementGap="0"/>
<fieldType name="int" class="${tests.solr.IntegerFieldType}" precisionStep="0" omitNorms="true" positionIncrementGap="0"/>
<fieldType name="float" class="${tests.solr.FloatFieldType}" precisionStep="0" omitNorms="true" positionIncrementGap="0"/>
<fieldType name="long" class="${tests.solr.LongFieldType}" precisionStep="0" omitNorms="true" positionIncrementGap="0"/>
<fieldType name="double" class="${tests.solr.DoubleFieldType}" precisionStep="0" omitNorms="true" positionIncrementGap="0"/>
<fieldType name="date" class="${tests.solr.DateFieldType}" precisionStep="0" omitNorms="true" positionIncrementGap="0"/>
<fieldType name="string" class="solr.StrField" sortMissingLast="true"/>
<fieldType name="boolean" class="solr.BoolField" sortMissingLast="true"/>

Expand Down
Loading
Loading