mirror of https://github.com/apache/lucene.git
randomize CMS a little bit
git-svn-id: https://svn.apache.org/repos/asf/lucene/dev/trunk@1497422 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
parent
32f4a55a18
commit
02e285f6ce
|
@ -737,6 +737,13 @@ public abstract class LuceneTestCase extends Assert {
|
|||
|
||||
if (r.nextBoolean()) {
|
||||
c.setMergeScheduler(new SerialMergeScheduler());
|
||||
} else if (rarely(r)) {
|
||||
int maxThreadCount = _TestUtil.nextInt(random(), 1, 4);
|
||||
int maxMergeCount = _TestUtil.nextInt(random(), maxThreadCount, maxThreadCount+4);
|
||||
ConcurrentMergeScheduler cms = new ConcurrentMergeScheduler();
|
||||
cms.setMaxMergeCount(maxMergeCount);
|
||||
cms.setMaxThreadCount(maxThreadCount);
|
||||
c.setMergeScheduler(cms);
|
||||
}
|
||||
if (r.nextBoolean()) {
|
||||
if (rarely(r)) {
|
||||
|
|
Loading…
Reference in New Issue