From be9bf006c25e3137878ecc0047e0bc704d661251 Mon Sep 17 00:00:00 2001 From: "Chris M. Hostetter" Date: Sat, 22 Jun 2013 06:00:18 +0000 Subject: [PATCH] SOLR-4942: test improvements to randomize use of compound files git-svn-id: https://svn.apache.org/repos/asf/lucene/dev/trunk@1495668 13f79535-47bb-0310-9956-ffa450edef68 --- solr/CHANGES.txt | 2 + .../conf/solrconfig-icucollate.xml | 3 ++ .../solr/collection1/conf/solrconfig.xml | 1 + .../conf/dataimport-solrconfig.xml | 5 ++- .../conf/contentstream-solrconfig.xml | 5 ++- .../dataimport-nodatasource-solrconfig.xml | 1 + .../conf/dataimport-solrconfig.xml | 5 ++- .../solr/collection1/conf/solrconfig.xml | 5 ++- .../conf/solrconfig-languageidentifier.xml | 3 ++ .../uima/solr/collection1/conf/solrconfig.xml | 4 +- .../uima/uima-tokenizers-solrconfig.xml | 5 ++- .../solr/collection1/conf/solrconfig.xml | 6 +-- .../collection1/conf/solrconfig-SOLR-749.xml | 1 + .../conf/solrconfig-altdirectory.xml | 1 + .../collection1/conf/solrconfig-basic.xml | 1 + .../collection1/conf/solrconfig-caching.xml | 3 +- .../conf/solrconfig-components-name.xml | 13 +----- .../collection1/conf/solrconfig-defaults.xml | 43 +++++++++++++++++++ .../conf/solrconfig-delpolicy1.xml | 2 +- .../conf/solrconfig-delpolicy2.xml | 1 + .../collection1/conf/solrconfig-elevate.xml | 7 +-- .../conf/solrconfig-enableplugin.xml | 2 +- .../conf/solrconfig-functionquery.xml | 3 +- .../collection1/conf/solrconfig-highlight.xml | 2 + .../conf/solrconfig-indexconfig.xml | 1 + .../conf/solrconfig-lazywriter.xml | 1 + .../conf/solrconfig-managed-schema.xml | 2 + .../collection1/conf/solrconfig-master.xml | 1 + .../conf/solrconfig-master1-keepOneBackup.xml | 1 + .../collection1/conf/solrconfig-master1.xml | 1 + .../collection1/conf/solrconfig-master2.xml | 1 + .../collection1/conf/solrconfig-master3.xml | 1 + .../conf/solrconfig-mergepolicy-legacy.xml | 2 +- .../conf/solrconfig-mergepolicy.xml | 2 +- .../collection1/conf/solrconfig-minimal.xml | 3 +- .../solrconfig-mutable-managed-schema.xml | 2 + .../conf/solrconfig-nativelock.xml | 1 + .../collection1/conf/solrconfig-nocache.xml | 1 + .../conf/solrconfig-phrasesuggest.xml | 1 + .../conf/solrconfig-postingshighlight.xml | 1 + .../solrconfig-propinject-indexdefault.xml | 16 +------ .../conf/solrconfig-propinject.xml | 17 +------- .../conf/solrconfig-querysender-noquery.xml | 2 +- .../conf/solrconfig-querysender.xml | 2 +- .../collection1/conf/solrconfig-repeater.xml | 2 +- .../solrconfig-response-log-component.xml | 1 + .../solrconfig-script-updateprocessor.xml | 2 +- .../conf/solrconfig-simplelock.xml | 1 + .../collection1/conf/solrconfig-slave.xml | 2 +- .../collection1/conf/solrconfig-slave1.xml | 2 +- .../conf/solrconfig-solcoreproperties.xml | 1 + .../conf/solrconfig-spellcheckcomponent.xml | 1 + .../conf/solrconfig-spellchecker.xml | 2 +- .../collection1/conf/solrconfig-termindex.xml | 1 + .../conf/solrconfig-tlog-managed-schema.xml | 1 + ...solrconfig-tlog-mutable-managed-schema.xml | 1 + .../solr/collection1/conf/solrconfig-tlog.xml | 1 + .../conf/solrconfig-transformers.xml | 2 +- .../solrconfig-update-processor-chains.xml | 3 +- .../collection1/conf/solrconfig-warmer.xml | 1 + .../collection1/conf/solrconfig-xinclude.xml | 2 + .../solrconfig.snippet.randomindexconfig.xml | 26 +++++++++++ .../solr/collection1/conf/solrconfig.xml | 11 +---- .../collection1/conf/solrconfig_codec.xml | 1 + .../solr/collection1/conf/solrconfig_perf.xml | 3 +- .../test-files/solr/crazy-path-to-config.xml | 5 +-- .../org/apache/solr/SolrTestCaseJ4Test.java | 1 + .../CoreContainerCoreInitFailuresTest.java | 6 +-- .../test/org/apache/solr/core/TestConfig.java | 21 +++++++-- .../apache/solr/core/TestCoreDiscovery.java | 1 + .../solr/core/TestMergePolicyConfig.java | 18 +++++--- .../solr/schema/TestCollationField.java | 1 + .../apache/solr/schema/TestManagedSchema.java | 1 + .../collection1/conf/solrconfig-slave1.xml | 5 ++- .../solr/collection1/conf/solrconfig.xml | 3 ++ .../solrj/solr/shared/conf/solrconfig.xml | 3 ++ .../java/org/apache/solr/SolrTestCaseJ4.java | 4 ++ 77 files changed, 210 insertions(+), 109 deletions(-) create mode 100644 solr/core/src/test-files/solr/collection1/conf/solrconfig-defaults.xml create mode 100644 solr/core/src/test-files/solr/collection1/conf/solrconfig.snippet.randomindexconfig.xml diff --git a/solr/CHANGES.txt b/solr/CHANGES.txt index 330fdafa9d4..c3465d2d44a 100644 --- a/solr/CHANGES.txt +++ b/solr/CHANGES.txt @@ -235,6 +235,8 @@ Other Changes * SOLR-4931: SolrDeletionPolicy onInit and onCommit methods changed to override exact signatures (with generics) from IndexDeletionPolicy (shalin) +* SOLR-4942: test improvements to randomize use of compound files (hosman) + ================== 4.3.1 ================== Versions of Major Components diff --git a/solr/contrib/analysis-extras/src/test-files/analysis-extras/solr/collection1/conf/solrconfig-icucollate.xml b/solr/contrib/analysis-extras/src/test-files/analysis-extras/solr/collection1/conf/solrconfig-icucollate.xml index 2ae6c7f3a2b..73004d75ed2 100644 --- a/solr/contrib/analysis-extras/src/test-files/analysis-extras/solr/collection1/conf/solrconfig-icucollate.xml +++ b/solr/contrib/analysis-extras/src/test-files/analysis-extras/solr/collection1/conf/solrconfig-icucollate.xml @@ -19,6 +19,9 @@ ${tests.luceneMatchVersion:LUCENE_CURRENT} + + ${useCompoundFile:false} + diff --git a/solr/contrib/clustering/src/test-files/clustering/solr/collection1/conf/solrconfig.xml b/solr/contrib/clustering/src/test-files/clustering/solr/collection1/conf/solrconfig.xml index 76cd7d4756c..04d591c8463 100644 --- a/solr/contrib/clustering/src/test-files/clustering/solr/collection1/conf/solrconfig.xml +++ b/solr/contrib/clustering/src/test-files/clustering/solr/collection1/conf/solrconfig.xml @@ -28,6 +28,7 @@ single + ${useCompoundFile:false} - diff --git a/solr/contrib/dataimporthandler/src/test-files/dih/solr/collection1/conf/contentstream-solrconfig.xml b/solr/contrib/dataimporthandler/src/test-files/dih/solr/collection1/conf/contentstream-solrconfig.xml index 3a8b15dd208..4e8a96b117c 100644 --- a/solr/contrib/dataimporthandler/src/test-files/dih/solr/collection1/conf/contentstream-solrconfig.xml +++ b/solr/contrib/dataimporthandler/src/test-files/dih/solr/collection1/conf/contentstream-solrconfig.xml @@ -18,6 +18,9 @@ ${tests.luceneMatchVersion:LUCENE_CURRENT} + + ${useCompoundFile:false} + - diff --git a/solr/contrib/dataimporthandler/src/test-files/dih/solr/collection1/conf/dataimport-nodatasource-solrconfig.xml b/solr/contrib/dataimporthandler/src/test-files/dih/solr/collection1/conf/dataimport-nodatasource-solrconfig.xml index 796f83185e1..9fa30736eb3 100644 --- a/solr/contrib/dataimporthandler/src/test-files/dih/solr/collection1/conf/dataimport-nodatasource-solrconfig.xml +++ b/solr/contrib/dataimporthandler/src/test-files/dih/solr/collection1/conf/dataimport-nodatasource-solrconfig.xml @@ -28,6 +28,7 @@ single + ${useCompoundFile:false} diff --git a/solr/contrib/dataimporthandler/src/test-files/dih/solr/collection1/conf/dataimport-solrconfig.xml b/solr/contrib/dataimporthandler/src/test-files/dih/solr/collection1/conf/dataimport-solrconfig.xml index db0a57cc2f9..c7d208a8bd3 100644 --- a/solr/contrib/dataimporthandler/src/test-files/dih/solr/collection1/conf/dataimport-solrconfig.xml +++ b/solr/contrib/dataimporthandler/src/test-files/dih/solr/collection1/conf/dataimport-solrconfig.xml @@ -18,6 +18,9 @@ ${tests.luceneMatchVersion:LUCENE_CURRENT} + + ${useCompoundFile:false} + - diff --git a/solr/contrib/extraction/src/test-files/extraction/solr/collection1/conf/solrconfig.xml b/solr/contrib/extraction/src/test-files/extraction/solr/collection1/conf/solrconfig.xml index 9700dcd93cb..1a7f2bb65c9 100644 --- a/solr/contrib/extraction/src/test-files/extraction/solr/collection1/conf/solrconfig.xml +++ b/solr/contrib/extraction/src/test-files/extraction/solr/collection1/conf/solrconfig.xml @@ -20,6 +20,9 @@ ${tests.luceneMatchVersion:LUCENE_CURRENT} + + ${useCompoundFile:false} + - ${tests.luceneMatchVersion:LUCENE_CURRENT} + + ${useCompoundFile:false} + ${solr.data.dir:} - ${tests.luceneMatchVersion:LUCENE_CURRENT} + + ${useCompoundFile:false} + ${solr.data.dir:} - - ${tests.luceneMatchVersion:LUCENE_CURRENT} + + ${useCompoundFile:false} + @@ -31,9 +34,6 @@ - - - diff --git a/solr/core/src/test-files/solr/collection1/conf/solrconfig-SOLR-749.xml b/solr/core/src/test-files/solr/collection1/conf/solrconfig-SOLR-749.xml index 7785b50e0d2..1fabd5c202f 100644 --- a/solr/core/src/test-files/solr/collection1/conf/solrconfig-SOLR-749.xml +++ b/solr/core/src/test-files/solr/collection1/conf/solrconfig-SOLR-749.xml @@ -19,6 +19,7 @@ ${tests.luceneMatchVersion:LUCENE_CURRENT} + diff --git a/solr/core/src/test-files/solr/collection1/conf/solrconfig-altdirectory.xml b/solr/core/src/test-files/solr/collection1/conf/solrconfig-altdirectory.xml index 96cfd2d1592..3105baf5157 100755 --- a/solr/core/src/test-files/solr/collection1/conf/solrconfig-altdirectory.xml +++ b/solr/core/src/test-files/solr/collection1/conf/solrconfig-altdirectory.xml @@ -19,6 +19,7 @@ ${tests.luceneMatchVersion:LUCENE_CURRENT} + diff --git a/solr/core/src/test-files/solr/collection1/conf/solrconfig-basic.xml b/solr/core/src/test-files/solr/collection1/conf/solrconfig-basic.xml index b23c6125248..abfb42d88e1 100644 --- a/solr/core/src/test-files/solr/collection1/conf/solrconfig-basic.xml +++ b/solr/core/src/test-files/solr/collection1/conf/solrconfig-basic.xml @@ -22,6 +22,7 @@ ${tests.luceneMatchVersion:LUCENE_CURRENT} ${solr.data.dir:} + diff --git a/solr/core/src/test-files/solr/collection1/conf/solrconfig-caching.xml b/solr/core/src/test-files/solr/collection1/conf/solrconfig-caching.xml index c6f7cbfda64..0de6f9412f7 100644 --- a/solr/core/src/test-files/solr/collection1/conf/solrconfig-caching.xml +++ b/solr/core/src/test-files/solr/collection1/conf/solrconfig-caching.xml @@ -16,6 +16,7 @@ --> ${tests.luceneMatchVersion:LUCENE_CURRENT} + - \ No newline at end of file + diff --git a/solr/core/src/test-files/solr/collection1/conf/solrconfig-components-name.xml b/solr/core/src/test-files/solr/collection1/conf/solrconfig-components-name.xml index 40a945139f4..b5501d85508 100644 --- a/solr/core/src/test-files/solr/collection1/conf/solrconfig-components-name.xml +++ b/solr/core/src/test-files/solr/collection1/conf/solrconfig-components-name.xml @@ -17,21 +17,12 @@ limitations under the License. --> - - + + diff --git a/solr/core/src/test-files/solr/collection1/conf/solrconfig-defaults.xml b/solr/core/src/test-files/solr/collection1/conf/solrconfig-defaults.xml new file mode 100644 index 00000000000..fe39eef6a3e --- /dev/null +++ b/solr/core/src/test-files/solr/collection1/conf/solrconfig-defaults.xml @@ -0,0 +1,43 @@ + + + + + + + ${tests.luceneMatchVersion:LUCENE_CURRENT} diff --git a/solr/core/src/test-files/solr/collection1/conf/solrconfig-delpolicy1.xml b/solr/core/src/test-files/solr/collection1/conf/solrconfig-delpolicy1.xml index 09e9c6533e2..80a11363b8f 100644 --- a/solr/core/src/test-files/solr/collection1/conf/solrconfig-delpolicy1.xml +++ b/solr/core/src/test-files/solr/collection1/conf/solrconfig-delpolicy1.xml @@ -17,7 +17,6 @@ limitations under the License. --> - ${tests.luceneMatchVersion:LUCENE_CURRENT} @@ -26,6 +25,7 @@ + ${useCompoundFile:false} true 3 diff --git a/solr/core/src/test-files/solr/collection1/conf/solrconfig-delpolicy2.xml b/solr/core/src/test-files/solr/collection1/conf/solrconfig-delpolicy2.xml index 585a1cde2d6..6710892c6d5 100644 --- a/solr/core/src/test-files/solr/collection1/conf/solrconfig-delpolicy2.xml +++ b/solr/core/src/test-files/solr/collection1/conf/solrconfig-delpolicy2.xml @@ -21,6 +21,7 @@ ${tests.luceneMatchVersion:LUCENE_CURRENT} + ${useCompoundFile:false} value1 value2 diff --git a/solr/core/src/test-files/solr/collection1/conf/solrconfig-elevate.xml b/solr/core/src/test-files/solr/collection1/conf/solrconfig-elevate.xml index 9d0732f3780..d218cb94ad9 100644 --- a/solr/core/src/test-files/solr/collection1/conf/solrconfig-elevate.xml +++ b/solr/core/src/test-files/solr/collection1/conf/solrconfig-elevate.xml @@ -32,6 +32,7 @@ + ${useCompoundFile:false} single @@ -66,10 +67,8 @@ --> - - 1024 - @@ -108,19 +106,16 @@ - - - string diff --git a/solr/core/src/test-files/solr/collection1/conf/solrconfig-enableplugin.xml b/solr/core/src/test-files/solr/collection1/conf/solrconfig-enableplugin.xml index d385f910800..2d563d6266a 100644 --- a/solr/core/src/test-files/solr/collection1/conf/solrconfig-enableplugin.xml +++ b/solr/core/src/test-files/solr/collection1/conf/solrconfig-enableplugin.xml @@ -28,6 +28,7 @@ single + ${useCompoundFile:false} @@ -45,7 +46,6 @@ - diff --git a/solr/core/src/test-files/solr/collection1/conf/solrconfig-functionquery.xml b/solr/core/src/test-files/solr/collection1/conf/solrconfig-functionquery.xml index 12bf3a24c10..1a1a4ffca62 100755 --- a/solr/core/src/test-files/solr/collection1/conf/solrconfig-functionquery.xml +++ b/solr/core/src/test-files/solr/collection1/conf/solrconfig-functionquery.xml @@ -20,6 +20,8 @@ ${tests.luceneMatchVersion:LUCENE_CURRENT} + + @@ -38,5 +40,4 @@ 0.0 - diff --git a/solr/core/src/test-files/solr/collection1/conf/solrconfig-highlight.xml b/solr/core/src/test-files/solr/collection1/conf/solrconfig-highlight.xml index 9da32455cd2..7d55cc2adef 100644 --- a/solr/core/src/test-files/solr/collection1/conf/solrconfig-highlight.xml +++ b/solr/core/src/test-files/solr/collection1/conf/solrconfig-highlight.xml @@ -20,6 +20,8 @@ ${tests.luceneMatchVersion:LUCENE_CURRENT} + + diff --git a/solr/core/src/test-files/solr/collection1/conf/solrconfig-indexconfig.xml b/solr/core/src/test-files/solr/collection1/conf/solrconfig-indexconfig.xml index 74c8268c6d6..3ee859af3dd 100644 --- a/solr/core/src/test-files/solr/collection1/conf/solrconfig-indexconfig.xml +++ b/solr/core/src/test-files/solr/collection1/conf/solrconfig-indexconfig.xml @@ -22,6 +22,7 @@ ${tests.luceneMatchVersion:LUCENE_CURRENT} + ${useCompoundFile:false} 123 diff --git a/solr/core/src/test-files/solr/collection1/conf/solrconfig-lazywriter.xml b/solr/core/src/test-files/solr/collection1/conf/solrconfig-lazywriter.xml index 1e2939f6fb8..0636a1dcfac 100644 --- a/solr/core/src/test-files/solr/collection1/conf/solrconfig-lazywriter.xml +++ b/solr/core/src/test-files/solr/collection1/conf/solrconfig-lazywriter.xml @@ -21,6 +21,7 @@ DO NOT ADD THINGS TO THIS CONFIG! --> ${tests.luceneMatchVersion:LUCENE_CURRENT} + diff --git a/solr/core/src/test-files/solr/collection1/conf/solrconfig-managed-schema.xml b/solr/core/src/test-files/solr/collection1/conf/solrconfig-managed-schema.xml index 13da8cfc669..383f858328a 100644 --- a/solr/core/src/test-files/solr/collection1/conf/solrconfig-managed-schema.xml +++ b/solr/core/src/test-files/solr/collection1/conf/solrconfig-managed-schema.xml @@ -20,6 +20,8 @@ ${tests.luceneMatchVersion:LUCENE_CURRENT} + + false managed-schema diff --git a/solr/core/src/test-files/solr/collection1/conf/solrconfig-master.xml b/solr/core/src/test-files/solr/collection1/conf/solrconfig-master.xml index 7de4b30d3a6..996b87ab92a 100644 --- a/solr/core/src/test-files/solr/collection1/conf/solrconfig-master.xml +++ b/solr/core/src/test-files/solr/collection1/conf/solrconfig-master.xml @@ -24,6 +24,7 @@ single + ${useCompoundFile:false} diff --git a/solr/core/src/test-files/solr/collection1/conf/solrconfig-master1-keepOneBackup.xml b/solr/core/src/test-files/solr/collection1/conf/solrconfig-master1-keepOneBackup.xml index 5347975debc..313efc70d5d 100644 --- a/solr/core/src/test-files/solr/collection1/conf/solrconfig-master1-keepOneBackup.xml +++ b/solr/core/src/test-files/solr/collection1/conf/solrconfig-master1-keepOneBackup.xml @@ -23,6 +23,7 @@ single + ${useCompoundFile:false} diff --git a/solr/core/src/test-files/solr/collection1/conf/solrconfig-master1.xml b/solr/core/src/test-files/solr/collection1/conf/solrconfig-master1.xml index 3ceaa73b816..b451b77a8e9 100644 --- a/solr/core/src/test-files/solr/collection1/conf/solrconfig-master1.xml +++ b/solr/core/src/test-files/solr/collection1/conf/solrconfig-master1.xml @@ -24,6 +24,7 @@ single + ${useCompoundFile:false} diff --git a/solr/core/src/test-files/solr/collection1/conf/solrconfig-master2.xml b/solr/core/src/test-files/solr/collection1/conf/solrconfig-master2.xml index 02480160968..16d23826eb3 100644 --- a/solr/core/src/test-files/solr/collection1/conf/solrconfig-master2.xml +++ b/solr/core/src/test-files/solr/collection1/conf/solrconfig-master2.xml @@ -24,6 +24,7 @@ single + ${useCompoundFile:false} diff --git a/solr/core/src/test-files/solr/collection1/conf/solrconfig-master3.xml b/solr/core/src/test-files/solr/collection1/conf/solrconfig-master3.xml index 3e486db34f1..9a1bafb63f0 100644 --- a/solr/core/src/test-files/solr/collection1/conf/solrconfig-master3.xml +++ b/solr/core/src/test-files/solr/collection1/conf/solrconfig-master3.xml @@ -24,6 +24,7 @@ single + ${useCompoundFile:false} diff --git a/solr/core/src/test-files/solr/collection1/conf/solrconfig-mergepolicy-legacy.xml b/solr/core/src/test-files/solr/collection1/conf/solrconfig-mergepolicy-legacy.xml index d25541e4743..00c77ae5e78 100644 --- a/solr/core/src/test-files/solr/collection1/conf/solrconfig-mergepolicy-legacy.xml +++ b/solr/core/src/test-files/solr/collection1/conf/solrconfig-mergepolicy-legacy.xml @@ -23,7 +23,7 @@ 7 - true + ${useCompoundFile:false} diff --git a/solr/core/src/test-files/solr/collection1/conf/solrconfig-mergepolicy.xml b/solr/core/src/test-files/solr/collection1/conf/solrconfig-mergepolicy.xml index 207ffd027ed..cd37e605acd 100644 --- a/solr/core/src/test-files/solr/collection1/conf/solrconfig-mergepolicy.xml +++ b/solr/core/src/test-files/solr/collection1/conf/solrconfig-mergepolicy.xml @@ -33,7 +33,7 @@ setting and log a warning (instead of failing because the setter is gone). --> - true + ${useCompoundFile:false} diff --git a/solr/core/src/test-files/solr/collection1/conf/solrconfig-minimal.xml b/solr/core/src/test-files/solr/collection1/conf/solrconfig-minimal.xml index 5fb39bb6f71..6bfd967c73d 100644 --- a/solr/core/src/test-files/solr/collection1/conf/solrconfig-minimal.xml +++ b/solr/core/src/test-files/solr/collection1/conf/solrconfig-minimal.xml @@ -28,8 +28,7 @@ - - + diff --git a/solr/core/src/test-files/solr/collection1/conf/solrconfig-mutable-managed-schema.xml b/solr/core/src/test-files/solr/collection1/conf/solrconfig-mutable-managed-schema.xml index 8daacbfdfc4..21571e11bb5 100644 --- a/solr/core/src/test-files/solr/collection1/conf/solrconfig-mutable-managed-schema.xml +++ b/solr/core/src/test-files/solr/collection1/conf/solrconfig-mutable-managed-schema.xml @@ -19,6 +19,8 @@ ${tests.luceneMatchVersion:LUCENE_CURRENT} + + true managed-schema diff --git a/solr/core/src/test-files/solr/collection1/conf/solrconfig-nativelock.xml b/solr/core/src/test-files/solr/collection1/conf/solrconfig-nativelock.xml index ac0f70dbbe4..7b5b6f7de93 100644 --- a/solr/core/src/test-files/solr/collection1/conf/solrconfig-nativelock.xml +++ b/solr/core/src/test-files/solr/collection1/conf/solrconfig-nativelock.xml @@ -28,6 +28,7 @@ ${tests.luceneMatchVersion:LUCENE_CURRENT} + ${useCompoundFile:false} native diff --git a/solr/core/src/test-files/solr/collection1/conf/solrconfig-nocache.xml b/solr/core/src/test-files/solr/collection1/conf/solrconfig-nocache.xml index e89f7f9df97..ee27d0c49de 100644 --- a/solr/core/src/test-files/solr/collection1/conf/solrconfig-nocache.xml +++ b/solr/core/src/test-files/solr/collection1/conf/solrconfig-nocache.xml @@ -20,6 +20,7 @@ ${tests.luceneMatchVersion:LUCENE_CURRENT} + diff --git a/solr/core/src/test-files/solr/collection1/conf/solrconfig-phrasesuggest.xml b/solr/core/src/test-files/solr/collection1/conf/solrconfig-phrasesuggest.xml index ca1d87d00d9..96b4f7b52f4 100644 --- a/solr/core/src/test-files/solr/collection1/conf/solrconfig-phrasesuggest.xml +++ b/solr/core/src/test-files/solr/collection1/conf/solrconfig-phrasesuggest.xml @@ -20,6 +20,7 @@ ${tests.luceneMatchVersion:LUCENE_CURRENT} + ${solr.data.dir:} diff --git a/solr/core/src/test-files/solr/collection1/conf/solrconfig-postingshighlight.xml b/solr/core/src/test-files/solr/collection1/conf/solrconfig-postingshighlight.xml index 8eb9b6bc4a8..c3d9d544e1f 100644 --- a/solr/core/src/test-files/solr/collection1/conf/solrconfig-postingshighlight.xml +++ b/solr/core/src/test-files/solr/collection1/conf/solrconfig-postingshighlight.xml @@ -21,6 +21,7 @@ ${tests.luceneMatchVersion:LUCENE_CURRENT} ${solr.data.dir:} + diff --git a/solr/core/src/test-files/solr/collection1/conf/solrconfig-propinject-indexdefault.xml b/solr/core/src/test-files/solr/collection1/conf/solrconfig-propinject-indexdefault.xml index 7e862ea0ff3..a56a71e02c1 100644 --- a/solr/core/src/test-files/solr/collection1/conf/solrconfig-propinject-indexdefault.xml +++ b/solr/core/src/test-files/solr/collection1/conf/solrconfig-propinject-indexdefault.xml @@ -17,21 +17,6 @@ limitations under the License. --> - - ${tests.luceneMatchVersion:LUCENE_CURRENT} @@ -41,6 +26,7 @@ + ${useCompoundFile:false} 32.0 diff --git a/solr/core/src/test-files/solr/collection1/conf/solrconfig-propinject.xml b/solr/core/src/test-files/solr/collection1/conf/solrconfig-propinject.xml index 8669ea62f8b..0ba21a5fdc5 100644 --- a/solr/core/src/test-files/solr/collection1/conf/solrconfig-propinject.xml +++ b/solr/core/src/test-files/solr/collection1/conf/solrconfig-propinject.xml @@ -17,22 +17,6 @@ limitations under the License. --> - - ${tests.luceneMatchVersion:LUCENE_CURRENT} @@ -43,6 +27,7 @@ + ${useCompoundFile:false} 64.0 diff --git a/solr/core/src/test-files/solr/collection1/conf/solrconfig-querysender-noquery.xml b/solr/core/src/test-files/solr/collection1/conf/solrconfig-querysender-noquery.xml index b123db969d3..af6cc75112d 100644 --- a/solr/core/src/test-files/solr/collection1/conf/solrconfig-querysender-noquery.xml +++ b/solr/core/src/test-files/solr/collection1/conf/solrconfig-querysender-noquery.xml @@ -19,6 +19,7 @@ ${tests.luceneMatchVersion:LUCENE_CURRENT} + @@ -49,7 +50,6 @@ - diff --git a/solr/core/src/test-files/solr/collection1/conf/solrconfig-querysender.xml b/solr/core/src/test-files/solr/collection1/conf/solrconfig-querysender.xml index a158d8d6867..12252c06b6f 100644 --- a/solr/core/src/test-files/solr/collection1/conf/solrconfig-querysender.xml +++ b/solr/core/src/test-files/solr/collection1/conf/solrconfig-querysender.xml @@ -19,6 +19,7 @@ ${tests.luceneMatchVersion:LUCENE_CURRENT} + @@ -47,7 +48,6 @@ - diff --git a/solr/core/src/test-files/solr/collection1/conf/solrconfig-repeater.xml b/solr/core/src/test-files/solr/collection1/conf/solrconfig-repeater.xml index f5c900e4210..fb79427d437 100644 --- a/solr/core/src/test-files/solr/collection1/conf/solrconfig-repeater.xml +++ b/solr/core/src/test-files/solr/collection1/conf/solrconfig-repeater.xml @@ -24,6 +24,7 @@ single + ${useCompoundFile:false} @@ -54,7 +55,6 @@ - diff --git a/solr/core/src/test-files/solr/collection1/conf/solrconfig-response-log-component.xml b/solr/core/src/test-files/solr/collection1/conf/solrconfig-response-log-component.xml index cac524d7386..859883d52f0 100644 --- a/solr/core/src/test-files/solr/collection1/conf/solrconfig-response-log-component.xml +++ b/solr/core/src/test-files/solr/collection1/conf/solrconfig-response-log-component.xml @@ -19,6 +19,7 @@ ${tests.luceneMatchVersion:LUCENE_CURRENT} + diff --git a/solr/core/src/test-files/solr/collection1/conf/solrconfig-script-updateprocessor.xml b/solr/core/src/test-files/solr/collection1/conf/solrconfig-script-updateprocessor.xml index bf0d93c0c4e..43fbc2873da 100644 --- a/solr/core/src/test-files/solr/collection1/conf/solrconfig-script-updateprocessor.xml +++ b/solr/core/src/test-files/solr/collection1/conf/solrconfig-script-updateprocessor.xml @@ -23,6 +23,7 @@ --> ${tests.luceneMatchVersion:LUCENE_CURRENT} + @@ -34,7 +35,6 @@ - diff --git a/solr/core/src/test-files/solr/collection1/conf/solrconfig-simplelock.xml b/solr/core/src/test-files/solr/collection1/conf/solrconfig-simplelock.xml index 17602671e62..7981b846850 100644 --- a/solr/core/src/test-files/solr/collection1/conf/solrconfig-simplelock.xml +++ b/solr/core/src/test-files/solr/collection1/conf/solrconfig-simplelock.xml @@ -28,6 +28,7 @@ ${tests.luceneMatchVersion:LUCENE_CURRENT} + ${useCompoundFile:false} simple diff --git a/solr/core/src/test-files/solr/collection1/conf/solrconfig-slave.xml b/solr/core/src/test-files/solr/collection1/conf/solrconfig-slave.xml index b00206ffa88..1ff32ae1b17 100644 --- a/solr/core/src/test-files/solr/collection1/conf/solrconfig-slave.xml +++ b/solr/core/src/test-files/solr/collection1/conf/solrconfig-slave.xml @@ -24,6 +24,7 @@ single + ${useCompoundFile:false} @@ -52,7 +53,6 @@ - diff --git a/solr/core/src/test-files/solr/collection1/conf/solrconfig-slave1.xml b/solr/core/src/test-files/solr/collection1/conf/solrconfig-slave1.xml index 4eecf11789b..6e907a45f66 100644 --- a/solr/core/src/test-files/solr/collection1/conf/solrconfig-slave1.xml +++ b/solr/core/src/test-files/solr/collection1/conf/solrconfig-slave1.xml @@ -24,6 +24,7 @@ single + ${useCompoundFile:false} @@ -48,7 +49,6 @@ - diff --git a/solr/core/src/test-files/solr/collection1/conf/solrconfig-solcoreproperties.xml b/solr/core/src/test-files/solr/collection1/conf/solrconfig-solcoreproperties.xml index db9968c2e94..722a3924e2b 100644 --- a/solr/core/src/test-files/solr/collection1/conf/solrconfig-solcoreproperties.xml +++ b/solr/core/src/test-files/solr/collection1/conf/solrconfig-solcoreproperties.xml @@ -28,6 +28,7 @@ single + ${useCompoundFile:false} diff --git a/solr/core/src/test-files/solr/collection1/conf/solrconfig-spellcheckcomponent.xml b/solr/core/src/test-files/solr/collection1/conf/solrconfig-spellcheckcomponent.xml index 8a01c177933..9092a5875a8 100644 --- a/solr/core/src/test-files/solr/collection1/conf/solrconfig-spellcheckcomponent.xml +++ b/solr/core/src/test-files/solr/collection1/conf/solrconfig-spellcheckcomponent.xml @@ -19,6 +19,7 @@ ${tests.luceneMatchVersion:LUCENE_CURRENT} + diff --git a/solr/core/src/test-files/solr/collection1/conf/solrconfig-spellchecker.xml b/solr/core/src/test-files/solr/collection1/conf/solrconfig-spellchecker.xml index 72fc0f61685..e6744cb3944 100644 --- a/solr/core/src/test-files/solr/collection1/conf/solrconfig-spellchecker.xml +++ b/solr/core/src/test-files/solr/collection1/conf/solrconfig-spellchecker.xml @@ -17,6 +17,7 @@ --> + @@ -24,7 +25,6 @@ ${tests.luceneMatchVersion:LUCENE_CURRENT} - diff --git a/solr/core/src/test-files/solr/collection1/conf/solrconfig-termindex.xml b/solr/core/src/test-files/solr/collection1/conf/solrconfig-termindex.xml index a5e497a3cf9..2afd813f29d 100644 --- a/solr/core/src/test-files/solr/collection1/conf/solrconfig-termindex.xml +++ b/solr/core/src/test-files/solr/collection1/conf/solrconfig-termindex.xml @@ -31,6 +31,7 @@ + ${useCompoundFile:false} 256 diff --git a/solr/core/src/test-files/solr/collection1/conf/solrconfig-tlog-managed-schema.xml b/solr/core/src/test-files/solr/collection1/conf/solrconfig-tlog-managed-schema.xml index 2da4f23c3a5..2ae9b356150 100644 --- a/solr/core/src/test-files/solr/collection1/conf/solrconfig-tlog-managed-schema.xml +++ b/solr/core/src/test-files/solr/collection1/conf/solrconfig-tlog-managed-schema.xml @@ -35,6 +35,7 @@ ${solr.lock.type:native} + ${useCompoundFile:false} - diff --git a/solr/core/src/test-files/solr/collection1/conf/solrconfig-update-processor-chains.xml b/solr/core/src/test-files/solr/collection1/conf/solrconfig-update-processor-chains.xml index bff4d161886..7f526881e85 100644 --- a/solr/core/src/test-files/solr/collection1/conf/solrconfig-update-processor-chains.xml +++ b/solr/core/src/test-files/solr/collection1/conf/solrconfig-update-processor-chains.xml @@ -24,6 +24,7 @@ --> ${tests.luceneMatchVersion:LUCENE_CURRENT} + @@ -53,7 +54,6 @@ - @@ -66,7 +66,6 @@ - diff --git a/solr/core/src/test-files/solr/collection1/conf/solrconfig-warmer.xml b/solr/core/src/test-files/solr/collection1/conf/solrconfig-warmer.xml index 3e1a46545be..69a0f8a990d 100644 --- a/solr/core/src/test-files/solr/collection1/conf/solrconfig-warmer.xml +++ b/solr/core/src/test-files/solr/collection1/conf/solrconfig-warmer.xml @@ -26,6 +26,7 @@ + ${useCompoundFile:false} diff --git a/solr/core/src/test-files/solr/collection1/conf/solrconfig-xinclude.xml b/solr/core/src/test-files/solr/collection1/conf/solrconfig-xinclude.xml index 4162e4fefb3..230a1ebf2f6 100644 --- a/solr/core/src/test-files/solr/collection1/conf/solrconfig-xinclude.xml +++ b/solr/core/src/test-files/solr/collection1/conf/solrconfig-xinclude.xml @@ -19,6 +19,8 @@ ${tests.luceneMatchVersion:LUCENE_CURRENT} + + diff --git a/solr/core/src/test-files/solr/collection1/conf/solrconfig.snippet.randomindexconfig.xml b/solr/core/src/test-files/solr/collection1/conf/solrconfig.snippet.randomindexconfig.xml new file mode 100644 index 00000000000..ce21fdf242b --- /dev/null +++ b/solr/core/src/test-files/solr/collection1/conf/solrconfig.snippet.randomindexconfig.xml @@ -0,0 +1,26 @@ + + + + + + ${useCompoundFile:false} + diff --git a/solr/core/src/test-files/solr/collection1/conf/solrconfig.xml b/solr/core/src/test-files/solr/collection1/conf/solrconfig.xml index a95a0037620..991594cd415 100644 --- a/solr/core/src/test-files/solr/collection1/conf/solrconfig.xml +++ b/solr/core/src/test-files/solr/collection1/conf/solrconfig.xml @@ -53,7 +53,7 @@ 1000 8 - + ${useCompoundFile:false} @@ -104,7 +104,6 @@ - 1024 - @@ -149,7 +147,6 @@ /> --> - @@ -159,14 +156,12 @@ - - - - dismax @@ -265,7 +258,6 @@ - lowerpunctfilt @@ -471,7 +463,6 @@ - diff --git a/solr/core/src/test-files/solr/collection1/conf/solrconfig_codec.xml b/solr/core/src/test-files/solr/collection1/conf/solrconfig_codec.xml index 738bb335726..c5cc04cfe9d 100644 --- a/solr/core/src/test-files/solr/collection1/conf/solrconfig_codec.xml +++ b/solr/core/src/test-files/solr/collection1/conf/solrconfig_codec.xml @@ -18,6 +18,7 @@ ${tests.luceneMatchVersion:LUCENE_CURRENT} + diff --git a/solr/core/src/test-files/solr/collection1/conf/solrconfig_perf.xml b/solr/core/src/test-files/solr/collection1/conf/solrconfig_perf.xml index 0c5e2054bc2..172fc953f37 100755 --- a/solr/core/src/test-files/solr/collection1/conf/solrconfig_perf.xml +++ b/solr/core/src/test-files/solr/collection1/conf/solrconfig_perf.xml @@ -23,6 +23,8 @@ If replication is in use, this should match the replication configuration. --> ${solr.data.dir:} + + @@ -66,7 +68,6 @@ - diff --git a/solr/core/src/test-files/solr/crazy-path-to-config.xml b/solr/core/src/test-files/solr/crazy-path-to-config.xml index 43baf9d4b55..b4bd5e5e12e 100644 --- a/solr/core/src/test-files/solr/crazy-path-to-config.xml +++ b/solr/core/src/test-files/solr/crazy-path-to-config.xml @@ -25,6 +25,7 @@ ${tests.luceneMatchVersion:LUCENE_CURRENT} + ${useCompoundFile:false} single @@ -32,7 +33,6 @@ 0 - 1024 true @@ -54,12 +54,9 @@ - solr solrconfig.xml schema.xml - - diff --git a/solr/core/src/test/org/apache/solr/SolrTestCaseJ4Test.java b/solr/core/src/test/org/apache/solr/SolrTestCaseJ4Test.java index 60f8abf96fe..d713547490f 100644 --- a/solr/core/src/test/org/apache/solr/SolrTestCaseJ4Test.java +++ b/solr/core/src/test/org/apache/solr/SolrTestCaseJ4Test.java @@ -42,6 +42,7 @@ public class SolrTestCaseJ4Test extends SolrTestCaseJ4 { String top = SolrTestCaseJ4.TEST_HOME() + "/collection1/conf"; FileUtils.copyFile(new File(top, "schema-tiny.xml"), new File(subHome, "schema-tiny.xml")); FileUtils.copyFile(new File(top, "solrconfig-minimal.xml"), new File(subHome, "solrconfig-minimal.xml")); + FileUtils.copyFile(new File(top, "solrconfig.snippet.randomindexconfig.xml"), new File(subHome, "solrconfig.snippet.randomindexconfig.xml")); FileUtils.copyDirectory(new File(tmpSolrHome, "core0"), new File(tmpSolrHome, "core1")); diff --git a/solr/core/src/test/org/apache/solr/core/CoreContainerCoreInitFailuresTest.java b/solr/core/src/test/org/apache/solr/core/CoreContainerCoreInitFailuresTest.java index 1a5a55bdbdc..3b7ebf0b121 100644 --- a/solr/core/src/test/org/apache/solr/core/CoreContainerCoreInitFailuresTest.java +++ b/solr/core/src/test/org/apache/solr/core/CoreContainerCoreInitFailuresTest.java @@ -150,7 +150,7 @@ public class CoreContainerCoreInitFailuresTest extends SolrTestCaseJ4 { FileUtils.write(solrXml, BAD_SOLR_XML, IOUtils.CHARSET_UTF_8.toString()); // our "ok" collection - FileUtils.copyFile(getFile("solr/collection1/conf/solrconfig-basic.xml"), + FileUtils.copyFile(getFile("solr/collection1/conf/solrconfig-defaults.xml"), FileUtils.getFile(solrHome, "col_ok", "conf", "solrconfig.xml")); FileUtils.copyFile(getFile("solr/collection1/conf/schema-minimal.xml"), FileUtils.getFile(solrHome, "col_ok", "conf", "schema.xml")); @@ -198,7 +198,7 @@ public class CoreContainerCoreInitFailuresTest extends SolrTestCaseJ4 { // ----- // "fix" the bad collection - FileUtils.copyFile(getFile("solr/collection1/conf/solrconfig-basic.xml"), + FileUtils.copyFile(getFile("solr/collection1/conf/solrconfig-defaults.xml"), FileUtils.getFile(solrHome, "col_bad", "conf", "solrconfig.xml")); final CoreDescriptor fixed = new CoreDescriptor(cc, "col_bad", "col_bad"); cc.register("col_bad", cc.create(fixed), false); @@ -324,7 +324,7 @@ public class CoreContainerCoreInitFailuresTest extends SolrTestCaseJ4 { // ---- // fix col_bad's config (again) and RELOAD to fix failure - FileUtils.copyFile(getFile("solr/collection1/conf/solrconfig-basic.xml"), + FileUtils.copyFile(getFile("solr/collection1/conf/solrconfig-defaults.xml"), FileUtils.getFile(solrHome, "col_bad", "conf", "solrconfig.xml")); cc.reload("col_bad"); diff --git a/solr/core/src/test/org/apache/solr/core/TestConfig.java b/solr/core/src/test/org/apache/solr/core/TestConfig.java index 6debff63c04..1e2398ea8dc 100644 --- a/solr/core/src/test/org/apache/solr/core/TestConfig.java +++ b/solr/core/src/test/org/apache/solr/core/TestConfig.java @@ -138,11 +138,26 @@ public class TestConfig extends SolrTestCaseJ4 { // If defaults change, add test methods to cover each version @Test public void testDefaults() throws Exception { + + SolrConfig sc = new SolrConfig(new SolrResourceLoader("solr/collection1"), "solrconfig-defaults.xml", null); + SolrIndexConfig sic = sc.indexConfig; + assertEquals("default ramBufferSizeMB", 100.0D, sic.ramBufferSizeMB, 0.0D); + assertEquals("default LockType", SolrIndexConfig.LOCK_TYPE_NATIVE, sic.lockType); + assertEquals("default useCompoundFile", false, sic.useCompoundFile); + + } + + + // sanity check that sys propertis are working as expected + public void testSanityCheckTestSysPropsAreUsed() throws Exception { + final boolean expectCFS + = Boolean.parseBoolean(System.getProperty("useCompoundFile")); + SolrConfig sc = new SolrConfig(new SolrResourceLoader("solr/collection1"), "solrconfig-basic.xml", null); SolrIndexConfig sic = sc.indexConfig; - assertTrue("default ramBufferSizeMB should be 100", sic.ramBufferSizeMB == 100); - assertTrue("default useCompoundFile should be false", sic.useCompoundFile == false); - assertTrue("default LockType should be native", sic.lockType.equals(SolrIndexConfig.LOCK_TYPE_NATIVE)); + assertEquals("default ramBufferSizeMB", 100.0D, sic.ramBufferSizeMB, 0.0D); + assertEquals("default LockType", SolrIndexConfig.LOCK_TYPE_NATIVE, sic.lockType); + assertEquals("useCompoundFile sysprop", expectCFS, sic.useCompoundFile); } } diff --git a/solr/core/src/test/org/apache/solr/core/TestCoreDiscovery.java b/solr/core/src/test/org/apache/solr/core/TestCoreDiscovery.java index dd4973aefd6..6e9a67651d7 100644 --- a/solr/core/src/test/org/apache/solr/core/TestCoreDiscovery.java +++ b/solr/core/src/test/org/apache/solr/core/TestCoreDiscovery.java @@ -102,6 +102,7 @@ public class TestCoreDiscovery extends SolrTestCaseJ4 { assertTrue("Failed to mkdirs for " + confDir.getAbsolutePath(), confDir.mkdirs()); FileUtils.copyFile(new File(top, "schema-tiny.xml"), new File(confDir, "schema-tiny.xml")); FileUtils.copyFile(new File(top, "solrconfig-minimal.xml"), new File(confDir, "solrconfig-minimal.xml")); + FileUtils.copyFile(new File(top, "solrconfig.snippet.randomindexconfig.xml"), new File(confDir, "solrconfig.snippet.randomindexconfig.xml")); } private CoreContainer init() throws Exception { diff --git a/solr/core/src/test/org/apache/solr/core/TestMergePolicyConfig.java b/solr/core/src/test/org/apache/solr/core/TestMergePolicyConfig.java index cb97443c9fe..b47eef5a474 100644 --- a/solr/core/src/test/org/apache/solr/core/TestMergePolicyConfig.java +++ b/solr/core/src/test/org/apache/solr/core/TestMergePolicyConfig.java @@ -55,9 +55,12 @@ public class TestMergePolicyConfig extends SolrTestCaseJ4 { } public void testLegacyMergePolicyConfig() throws Exception { + final boolean expectCFS + = Boolean.parseBoolean(System.getProperty("useCompoundFile")); + initCore("solrconfig-mergepolicy-legacy.xml","schema-minimal.xml"); IndexWriterConfig iwc = solrConfig.indexConfig.toIndexWriterConfig(h.getCore().getLatestSchema()); - assertEquals(true, iwc.getUseCompoundFile()); + assertEquals(expectCFS, iwc.getUseCompoundFile()); TieredMergePolicy tieredMP = assertAndCast(TieredMergePolicy.class, @@ -65,16 +68,19 @@ public class TestMergePolicyConfig extends SolrTestCaseJ4 { assertEquals(7, tieredMP.getMaxMergeAtOnce()); assertEquals(7.0D, tieredMP.getSegmentsPerTier(), 0.0D); - assertEquals(1.0D, tieredMP.getNoCFSRatio(), 0.0D); + assertEquals(expectCFS ? 1.0D : 0.0D, tieredMP.getNoCFSRatio(), 0.0D); assertCommitSomeNewDocs(); - assertCompoundSegments(h.getCore(), true); + assertCompoundSegments(h.getCore(), expectCFS); } public void testTieredMergePolicyConfig() throws Exception { + final boolean expectCFS + = Boolean.parseBoolean(System.getProperty("useCompoundFile")); + initCore("solrconfig-mergepolicy.xml","schema-minimal.xml"); IndexWriterConfig iwc = solrConfig.indexConfig.toIndexWriterConfig(h.getCore().getLatestSchema()); - assertEquals(true, iwc.getUseCompoundFile()); + assertEquals(expectCFS, iwc.getUseCompoundFile()); TieredMergePolicy tieredMP = assertAndCast(TieredMergePolicy.class, @@ -94,11 +100,11 @@ public class TestMergePolicyConfig extends SolrTestCaseJ4 { // even though we have a single segment (which is 100% of the size of // the index which is higher then our 0.6D threashold) the // compound ratio doesn't matter because the segment was never merged - assertCompoundSegments(h.getCore(), true); + assertCompoundSegments(h.getCore(), expectCFS); assertCommitSomeNewDocs(); assertNumSegments(h.getCore(), 2); - assertCompoundSegments(h.getCore(), true); + assertCompoundSegments(h.getCore(), expectCFS); assertU(optimize()); assertNumSegments(h.getCore(), 1); diff --git a/solr/core/src/test/org/apache/solr/schema/TestCollationField.java b/solr/core/src/test/org/apache/solr/schema/TestCollationField.java index 09c6dd748b0..08ea28abec6 100644 --- a/solr/core/src/test/org/apache/solr/schema/TestCollationField.java +++ b/solr/core/src/test/org/apache/solr/schema/TestCollationField.java @@ -74,6 +74,7 @@ public class TestCollationField extends SolrTestCaseJ4 { // copy over configuration files FileUtils.copyFile(getFile("solr/collection1/conf/solrconfig-basic.xml"), new File(confDir, "solrconfig.xml")); + FileUtils.copyFile(getFile("solr/collection1/conf/solrconfig.snippet.randomindexconfig.xml"), new File(confDir, "solrconfig.snippet.randomindexconfig.xml")); FileUtils.copyFile(getFile("solr/collection1/conf/schema-collate.xml"), new File(confDir, "schema.xml")); // generate custom collation rules (DIN 5007-2), saving to customrules.dat diff --git a/solr/core/src/test/org/apache/solr/schema/TestManagedSchema.java b/solr/core/src/test/org/apache/solr/schema/TestManagedSchema.java index 7fb8a31dfe6..16fa650bba4 100644 --- a/solr/core/src/test/org/apache/solr/schema/TestManagedSchema.java +++ b/solr/core/src/test/org/apache/solr/schema/TestManagedSchema.java @@ -55,6 +55,7 @@ public class TestManagedSchema extends AbstractBadConfigTestBase { FileUtils.copyFileToDirectory(new File(testHomeConfDir, "solrconfig-mutable-managed-schema.xml"), tmpConfDir); FileUtils.copyFileToDirectory(new File(testHomeConfDir, "solrconfig-managed-schema.xml"), tmpConfDir); FileUtils.copyFileToDirectory(new File(testHomeConfDir, "solrconfig-basic.xml"), tmpConfDir); + FileUtils.copyFileToDirectory(new File(testHomeConfDir, "solrconfig.snippet.randomindexconfig.xml"), tmpConfDir); FileUtils.copyFileToDirectory(new File(testHomeConfDir, "schema-one-field-no-dynamic-field.xml"), tmpConfDir); FileUtils.copyFileToDirectory(new File(testHomeConfDir, "schema-minimal.xml"), tmpConfDir); FileUtils.copyFileToDirectory(new File(testHomeConfDir, "schema_codec.xml"), tmpConfDir); diff --git a/solr/solrj/src/test-files/solrj/solr/collection1/conf/solrconfig-slave1.xml b/solr/solrj/src/test-files/solrj/solr/collection1/conf/solrconfig-slave1.xml index 76db378e42c..99bec049675 100644 --- a/solr/solrj/src/test-files/solrj/solr/collection1/conf/solrconfig-slave1.xml +++ b/solr/solrj/src/test-files/solrj/solr/collection1/conf/solrconfig-slave1.xml @@ -19,11 +19,12 @@ ${tests.luceneMatchVersion:LUCENE_CURRENT} + + ${useCompoundFile:false} + ${solr.data.dir:} - - diff --git a/solr/solrj/src/test-files/solrj/solr/collection1/conf/solrconfig.xml b/solr/solrj/src/test-files/solrj/solr/collection1/conf/solrconfig.xml index f1a31de6f40..7f683e501b9 100644 --- a/solr/solrj/src/test-files/solrj/solr/collection1/conf/solrconfig.xml +++ b/solr/solrj/src/test-files/solrj/solr/collection1/conf/solrconfig.xml @@ -22,6 +22,9 @@ --> ${tests.luceneMatchVersion:LUCENE_CURRENT} + + ${useCompoundFile:false} + ${solr.data.dir:} diff --git a/solr/solrj/src/test-files/solrj/solr/shared/conf/solrconfig.xml b/solr/solrj/src/test-files/solrj/solr/shared/conf/solrconfig.xml index 8cda0e68d0d..31d8f1d85a6 100644 --- a/solr/solrj/src/test-files/solrj/solr/shared/conf/solrconfig.xml +++ b/solr/solrj/src/test-files/solrj/solr/shared/conf/solrconfig.xml @@ -22,6 +22,9 @@ --> ${tests.luceneMatchVersion:LUCENE_CURRENT} + + ${useCompoundFile:false} + ${tempDir}/data/${l10n:}-${version:} 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 eef9f8e7868..7b590046733 100755 --- a/solr/test-framework/src/java/org/apache/solr/SolrTestCaseJ4.java +++ b/solr/test-framework/src/java/org/apache/solr/SolrTestCaseJ4.java @@ -86,6 +86,8 @@ public abstract class SolrTestCaseJ4 extends LuceneTestCase { @SuppressWarnings("unused") private static void beforeClass() { System.setProperty("jetty.testMode", "true"); + + System.setProperty("useCompoundFile", Boolean.toString(random().nextBoolean())); System.setProperty("enable.update.log", usually() ? "true" : "false"); System.setProperty("tests.shardhandler.randomSeed", Long.toString(random().nextLong())); setupLogging(); @@ -106,6 +108,7 @@ public abstract class SolrTestCaseJ4 extends LuceneTestCase { System.clearProperty("jetty.testMode"); System.clearProperty("tests.shardhandler.randomSeed"); System.clearProperty("enable.update.log"); + System.clearProperty("useCompoundFile"); } private static boolean changedFactory = false; @@ -1469,6 +1472,7 @@ public abstract class SolrTestCaseJ4 extends LuceneTestCase { String top = SolrTestCaseJ4.TEST_HOME() + "/collection1/conf"; FileUtils.copyFile(new File(top, "schema-tiny.xml"), new File(subHome, "schema.xml")); FileUtils.copyFile(new File(top, "solrconfig-minimal.xml"), new File(subHome, "solrconfig.xml")); + FileUtils.copyFile(new File(top, "solrconfig.snippet.randomindexconfig.xml"), new File(subHome, "solrconfig.snippet.randomindexconfig.xml")); } }