You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@lucene.apache.org by ho...@apache.org on 2013/08/07 00:13:40 UTC

svn commit: r1511134 - in /lucene/dev/trunk/solr/core/src: test-files/solr/collection1/conf/ test/org/apache/solr/core/

Author: hossman
Date: Tue Aug  6 22:13:40 2013
New Revision: 1511134

URL: http://svn.apache.org/r1511134
Log:
SOLR-4952: get SolrCoreCheckLockOnStartupTest using solrconfig.snippet.randomindexconfig.xml

Removed:
    lucene/dev/trunk/solr/core/src/test-files/solr/collection1/conf/solrconfig-nativelock.xml
    lucene/dev/trunk/solr/core/src/test-files/solr/collection1/conf/solrconfig-simplelock.xml
Modified:
    lucene/dev/trunk/solr/core/src/test-files/solr/collection1/conf/solrconfig.snippet.randomindexconfig.xml
    lucene/dev/trunk/solr/core/src/test/org/apache/solr/core/SolrCoreCheckLockOnStartupTest.java

Modified: lucene/dev/trunk/solr/core/src/test-files/solr/collection1/conf/solrconfig.snippet.randomindexconfig.xml
URL: http://svn.apache.org/viewvc/lucene/dev/trunk/solr/core/src/test-files/solr/collection1/conf/solrconfig.snippet.randomindexconfig.xml?rev=1511134&r1=1511133&r2=1511134&view=diff
==============================================================================
--- lucene/dev/trunk/solr/core/src/test-files/solr/collection1/conf/solrconfig.snippet.randomindexconfig.xml (original)
+++ lucene/dev/trunk/solr/core/src/test-files/solr/collection1/conf/solrconfig.snippet.randomindexconfig.xml Tue Aug  6 22:13:40 2013
@@ -38,5 +38,10 @@ A solrconfig.xml snippet containing inde
 
   <writeLockTimeout>1000</writeLockTimeout>
   <commitLockTimeout>10000</commitLockTimeout>
-  <lockType>single</lockType>
+
+  <!-- this sys property is not set by SolrTestCaseJ4 because almost all tests should
+       use the single process lockType for speed - but tests that explicitly need
+       to vary the lockType canset it as needed.
+  -->
+  <lockType>${solr.tests.lockType:single}</lockType>
 </indexConfig>

Modified: lucene/dev/trunk/solr/core/src/test/org/apache/solr/core/SolrCoreCheckLockOnStartupTest.java
URL: http://svn.apache.org/viewvc/lucene/dev/trunk/solr/core/src/test/org/apache/solr/core/SolrCoreCheckLockOnStartupTest.java?rev=1511134&r1=1511133&r2=1511134&view=diff
==============================================================================
--- lucene/dev/trunk/solr/core/src/test/org/apache/solr/core/SolrCoreCheckLockOnStartupTest.java (original)
+++ lucene/dev/trunk/solr/core/src/test/org/apache/solr/core/SolrCoreCheckLockOnStartupTest.java Tue Aug  6 22:13:40 2013
@@ -62,12 +62,14 @@ public class SolrCoreCheckLockOnStartupT
 
     ignoreException("locked");
     try {
+      System.setProperty("solr.tests.lockType","simple");
       //opening a new core on the same index
-      initCore("solrconfig-simplelock.xml", "schema.xml");
+      initCore("solrconfig-basic.xml", "schema.xml");
       if (checkForCoreInitException(LockObtainFailedException.class))
         return;
       fail("Expected " + LockObtainFailedException.class.getSimpleName());
     } finally {
+      System.clearProperty("solr.tests.lockType");
       unIgnoreException("locked");
       indexWriter.close();
       directory.close();
@@ -86,13 +88,15 @@ public class SolrCoreCheckLockOnStartupT
 
     ignoreException("locked");
     try {
+      System.setProperty("solr.tests.lockType","native");
       //opening a new core on the same index
-      initCore("solrconfig-nativelock.xml", "schema.xml");
+      initCore("solrconfig-basic.xml", "schema.xml");
       CoreContainer cc = h.getCoreContainer();
       if (checkForCoreInitException(LockObtainFailedException.class))
         return;
       fail("Expected " + LockObtainFailedException.class.getSimpleName());
     } finally {
+      System.clearProperty("solr.tests.lockType");
       unIgnoreException("locked");
       indexWriter.close();
       directory.close();