mirror of https://github.com/apache/lucene.git
fix test bug and tone down slow tests
git-svn-id: https://svn.apache.org/repos/asf/lucene/dev/trunk@1641991 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
parent
273570bda5
commit
de3bfc1d0e
|
@ -18,10 +18,10 @@ package org.apache.lucene.codecs.asserting;
|
|||
*/
|
||||
|
||||
import org.apache.lucene.codecs.Codec;
|
||||
import org.apache.lucene.index.BaseDocValuesFormatTestCase;
|
||||
import org.apache.lucene.index.BasePostingsFormatTestCase;
|
||||
|
||||
/** Test AssertingDocValuesFormat directly */
|
||||
public class TestAssertingPostingsFormat extends BaseDocValuesFormatTestCase {
|
||||
/** Test AssertingPostingsFormat directly */
|
||||
public class TestAssertingPostingsFormat extends BasePostingsFormatTestCase {
|
||||
private final Codec codec = new AssertingCodec();
|
||||
|
||||
@Override
|
||||
|
|
|
@ -241,7 +241,8 @@ public class TestMultiMMap extends BaseDirectoryTestCase {
|
|||
}
|
||||
|
||||
public void testSeeking() throws Exception {
|
||||
for (int i = 0; i < 10; i++) {
|
||||
int numIters = TEST_NIGHTLY ? 10 : 1;
|
||||
for (int i = 0; i < numIters; i++) {
|
||||
MMapDirectory mmapDir = new MMapDirectory(createTempDir("testSeeking"), 1<<i);
|
||||
IndexOutput io = mmapDir.createOutput("bytes", newIOContext(random()));
|
||||
byte bytes[] = new byte[1<<(i+1)]; // make sure we switch buffers
|
||||
|
@ -268,7 +269,8 @@ public class TestMultiMMap extends BaseDirectoryTestCase {
|
|||
// note instead of seeking to offset and reading length, this opens slices at the
|
||||
// the various offset+length and just does readBytes.
|
||||
public void testSlicedSeeking() throws Exception {
|
||||
for (int i = 0; i < 10; i++) {
|
||||
int numIters = TEST_NIGHTLY ? 10 : 1;
|
||||
for (int i = 0; i < numIters; i++) {
|
||||
MMapDirectory mmapDir = new MMapDirectory(createTempDir("testSlicedSeeking"), 1<<i);
|
||||
IndexOutput io = mmapDir.createOutput("bytes", newIOContext(random()));
|
||||
byte bytes[] = new byte[1<<(i+1)]; // make sure we switch buffers
|
||||
|
@ -328,7 +330,7 @@ public class TestMultiMMap extends BaseDirectoryTestCase {
|
|||
}
|
||||
|
||||
public void testRandomChunkSizes() throws Exception {
|
||||
int num = atLeast(10);
|
||||
int num = TEST_NIGHTLY ? atLeast(10) : 3;
|
||||
for (int i = 0; i < num; i++) {
|
||||
assertChunking(random(), TestUtil.nextInt(random(), 20, 100));
|
||||
}
|
||||
|
|
|
@ -406,7 +406,7 @@ public abstract class BaseDirectoryTestCase extends LuceneTestCase {
|
|||
|
||||
@Override
|
||||
public void run() {
|
||||
for (int i = 0; i < 3000; i++) {
|
||||
for (int i = 0; i < 1000; i++) {
|
||||
String fileName = this.name + i;
|
||||
try {
|
||||
//System.out.println("create:" + fileName);
|
||||
|
|
Loading…
Reference in New Issue