tone down more overkill tests

git-svn-id: https://svn.apache.org/repos/asf/lucene/dev/trunk@1642175 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
Robert Muir 2014-11-27 15:24:54 +00:00
parent d5e118d011
commit cef380630b
3 changed files with 10 additions and 6 deletions

View File

@ -32,8 +32,9 @@ public class TestLookaheadTokenFilter extends BaseTokenStreamTestCase {
TokenStream output = new MockRandomLookaheadTokenFilter(random, tokenizer); TokenStream output = new MockRandomLookaheadTokenFilter(random, tokenizer);
return new TokenStreamComponents(tokenizer, output); return new TokenStreamComponents(tokenizer, output);
} }
}; };
checkRandomData(random(), a, 200*RANDOM_MULTIPLIER, 8192); int maxLength = TEST_NIGHTLY ? 8192 : 1024;
checkRandomData(random(), a, 50*RANDOM_MULTIPLIER, maxLength);
} }
private static class NeverPeeksLookaheadTokenFilter extends LookaheadTokenFilter<LookaheadTokenFilter.Position> { private static class NeverPeeksLookaheadTokenFilter extends LookaheadTokenFilter<LookaheadTokenFilter.Position> {
@ -60,8 +61,9 @@ public class TestLookaheadTokenFilter extends BaseTokenStreamTestCase {
TokenStream output = new NeverPeeksLookaheadTokenFilter(tokenizer); TokenStream output = new NeverPeeksLookaheadTokenFilter(tokenizer);
return new TokenStreamComponents(tokenizer, output); return new TokenStreamComponents(tokenizer, output);
} }
}; };
checkRandomData(random(), a, 200*RANDOM_MULTIPLIER, 8192); int maxLength = TEST_NIGHTLY ? 8192 : 1024;
checkRandomData(random(), a, 50*RANDOM_MULTIPLIER, maxLength);
} }
public void testMissedFirstToken() throws Exception { public void testMissedFirstToken() throws Exception {

View File

@ -31,8 +31,9 @@ public class TestBytesStore extends LuceneTestCase {
public void testRandom() throws Exception { public void testRandom() throws Exception {
final int iters = atLeast(10); final int iters = atLeast(10);
final int maxBytes = TEST_NIGHTLY ? 200000 : 20000;
for(int iter=0;iter<iters;iter++) { for(int iter=0;iter<iters;iter++) {
final int numBytes = TestUtil.nextInt(random(), 1, 200000); final int numBytes = TestUtil.nextInt(random(), 1, maxBytes);
final byte[] expected = new byte[numBytes]; final byte[] expected = new byte[numBytes];
final int blockBits = TestUtil.nextInt(random(), 8, 15); final int blockBits = TestUtil.nextInt(random(), 8, 15);
final BytesStore bytes = new BytesStore(blockBits); final BytesStore bytes = new BytesStore(blockBits);

View File

@ -85,7 +85,8 @@ public class TestDirectPacked extends LuceneTestCase {
private void doTestBpv(Directory directory, int bpv) throws Exception { private void doTestBpv(Directory directory, int bpv) throws Exception {
MyRandom random = new MyRandom(random().nextLong()); MyRandom random = new MyRandom(random().nextLong());
for (int i = 0; i < 100; i++) { int numIters = TEST_NIGHTLY ? 100 : 10;
for (int i = 0; i < numIters; i++) {
long original[] = randomLongs(random, bpv); long original[] = randomLongs(random, bpv);
int bitsRequired = bpv == 64 ? 64 : DirectWriter.bitsRequired(1L<<(bpv-1)); int bitsRequired = bpv == 64 ? 64 : DirectWriter.bitsRequired(1L<<(bpv-1));
String name = "bpv" + bpv + "_" + i; String name = "bpv" + bpv + "_" + i;