lucene-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From romseyg...@apache.org
Subject svn commit: r1640703 - /lucene/dev/trunk/solr/test-framework/src/java/org/apache/solr/SolrTestCaseJ4.java
Date Thu, 20 Nov 2014 10:03:26 GMT
Author: romseygeek
Date: Thu Nov 20 10:03:26 2014
New Revision: 1640703

URL: http://svn.apache.org/r1640703
Log:
Fix test failures when LTC uses anonymous MergeScheduler classes

Modified:
    lucene/dev/trunk/solr/test-framework/src/java/org/apache/solr/SolrTestCaseJ4.java

Modified: lucene/dev/trunk/solr/test-framework/src/java/org/apache/solr/SolrTestCaseJ4.java
URL: http://svn.apache.org/viewvc/lucene/dev/trunk/solr/test-framework/src/java/org/apache/solr/SolrTestCaseJ4.java?rev=1640703&r1=1640702&r2=1640703&view=diff
==============================================================================
--- lucene/dev/trunk/solr/test-framework/src/java/org/apache/solr/SolrTestCaseJ4.java (original)
+++ lucene/dev/trunk/solr/test-framework/src/java/org/apache/solr/SolrTestCaseJ4.java Thu
Nov 20 10:03:26 2014
@@ -304,7 +304,13 @@ public abstract class SolrTestCaseJ4 ext
 
     System.setProperty("solr.tests.maxBufferedDocs", String.valueOf(iwc.getMaxBufferedDocs()));
     System.setProperty("solr.tests.ramBufferSizeMB", String.valueOf(iwc.getRAMBufferSizeMB()));
-    System.setProperty("solr.tests.mergeScheduler", iwc.getMergeScheduler().getClass().getName());
+
+    String mergeSchedulerClass = iwc.getMergeScheduler().getClass().getName();
+    if (mergeSchedulerClass.contains("$")) {
+      // anonymous subclass - we can't instantiate via the resource loader, so use CMS instead
+      mergeSchedulerClass = "org.apache.lucene.index.ConcurrentMergeScheduler";
+    }
+    System.setProperty("solr.tests.mergeScheduler", mergeSchedulerClass);
 
     // don't ask iwc.getMaxThreadStates(), sometimes newIWC uses 
     // RandomDocumentsWriterPerThreadPool and all hell breaks loose



Mime
View raw message