diff --git a/lucene/core/src/test/org/apache/lucene/index/TestConcurrentMergeScheduler.java b/lucene/core/src/test/org/apache/lucene/index/TestConcurrentMergeScheduler.java index 7935db70751..700c50ff921 100644 --- a/lucene/core/src/test/org/apache/lucene/index/TestConcurrentMergeScheduler.java +++ b/lucene/core/src/test/org/apache/lucene/index/TestConcurrentMergeScheduler.java @@ -222,7 +222,8 @@ public class TestConcurrentMergeScheduler extends LuceneTestCase { setCommitOnClose(false) ); - for(int iter=0;iter<10;iter++) { + int numIters = TEST_NIGHTLY ? 10 : 3; + for(int iter=0;iter openLocks = Collections.synchronizedMap(new HashMap()); volatile boolean crashed; private ThrottledIndexOutput throttledOutput; - private Throttling throttling = Throttling.SOMETIMES; + private Throttling throttling = LuceneTestCase.TEST_NIGHTLY ? Throttling.SOMETIMES : Throttling.NEVER; final AtomicInteger inputCloneCount = new AtomicInteger(); @@ -191,9 +191,9 @@ public class MockDirectoryWrapper extends BaseDirectoryWrapper { } /** - * By default, opening and closing has a rare small sleep to catch race conditions + * Add a rare small sleep to catch race conditions in open/close *

- * You can disable this if you dont need it + * You can enable this if you need it. */ public void setUseSlowOpenClosers(boolean v) { useSlowOpenClosers = v; diff --git a/lucene/test-framework/src/java/org/apache/lucene/util/LuceneTestCase.java b/lucene/test-framework/src/java/org/apache/lucene/util/LuceneTestCase.java index 998ee27a64f..deff9a6d642 100644 --- a/lucene/test-framework/src/java/org/apache/lucene/util/LuceneTestCase.java +++ b/lucene/test-framework/src/java/org/apache/lucene/util/LuceneTestCase.java @@ -1330,7 +1330,7 @@ public abstract class LuceneTestCase extends Assert { directory = new NRTCachingDirectory(directory, random.nextDouble(), random.nextDouble()); } - if (rarely(random) && !bare) { + if (TEST_NIGHTLY && rarely(random) && !bare) { final double maxMBPerSec = TestUtil.nextInt(random, 20, 40); if (LuceneTestCase.VERBOSE) { System.out.println("LuceneTestCase: will rate limit output IndexOutput to " + maxMBPerSec + " MB/sec");