tone down these stress tests
This commit is contained in:
parent
3b7316fb8d
commit
45ad47581d
|
@ -48,7 +48,7 @@ public abstract class AbstractCompressedStreamTests extends ESTestCase {
|
|||
public void testRandom() throws IOException {
|
||||
Random r = getRandom();
|
||||
for (int i = 0; i < 10; i++) {
|
||||
byte bytes[] = new byte[TestUtil.nextInt(r, 1, 400000)];
|
||||
byte bytes[] = new byte[TestUtil.nextInt(r, 1, 100000)];
|
||||
r.nextBytes(bytes);
|
||||
doTest(bytes);
|
||||
}
|
||||
|
@ -56,7 +56,7 @@ public abstract class AbstractCompressedStreamTests extends ESTestCase {
|
|||
|
||||
public void testRandomThreads() throws Exception {
|
||||
final Random r = getRandom();
|
||||
int threadCount = TestUtil.nextInt(r, 2, 10);
|
||||
int threadCount = TestUtil.nextInt(r, 2, 6);
|
||||
Thread[] threads = new Thread[threadCount];
|
||||
final CountDownLatch startingGun = new CountDownLatch(1);
|
||||
for (int tid=0; tid < threadCount; tid++) {
|
||||
|
@ -102,7 +102,7 @@ public abstract class AbstractCompressedStreamTests extends ESTestCase {
|
|||
|
||||
public void testLineDocsThreads() throws Exception {
|
||||
final Random r = getRandom();
|
||||
int threadCount = TestUtil.nextInt(r, 2, 10);
|
||||
int threadCount = TestUtil.nextInt(r, 2, 6);
|
||||
Thread[] threads = new Thread[threadCount];
|
||||
final CountDownLatch startingGun = new CountDownLatch(1);
|
||||
for (int tid=0; tid < threadCount; tid++) {
|
||||
|
@ -162,7 +162,7 @@ public abstract class AbstractCompressedStreamTests extends ESTestCase {
|
|||
|
||||
public void testRepetitionsLThreads() throws Exception {
|
||||
final Random r = getRandom();
|
||||
int threadCount = TestUtil.nextInt(r, 2, 10);
|
||||
int threadCount = TestUtil.nextInt(r, 2, 6);
|
||||
Thread[] threads = new Thread[threadCount];
|
||||
final CountDownLatch startingGun = new CountDownLatch(1);
|
||||
for (int tid=0; tid < threadCount; tid++) {
|
||||
|
@ -226,7 +226,7 @@ public abstract class AbstractCompressedStreamTests extends ESTestCase {
|
|||
|
||||
public void testRepetitionsIThreads() throws Exception {
|
||||
final Random r = getRandom();
|
||||
int threadCount = TestUtil.nextInt(r, 2, 10);
|
||||
int threadCount = TestUtil.nextInt(r, 2, 6);
|
||||
Thread[] threads = new Thread[threadCount];
|
||||
final CountDownLatch startingGun = new CountDownLatch(1);
|
||||
for (int tid=0; tid < threadCount; tid++) {
|
||||
|
@ -350,7 +350,7 @@ public abstract class AbstractCompressedStreamTests extends ESTestCase {
|
|||
|
||||
public void testRepetitionsSThreads() throws Exception {
|
||||
final Random r = getRandom();
|
||||
int threadCount = TestUtil.nextInt(r, 2, 10);
|
||||
int threadCount = TestUtil.nextInt(r, 2, 6);
|
||||
Thread[] threads = new Thread[threadCount];
|
||||
final CountDownLatch startingGun = new CountDownLatch(1);
|
||||
for (int tid=0; tid < threadCount; tid++) {
|
||||
|
|
|
@ -250,7 +250,7 @@ public abstract class AbstractStringFieldDataTests extends AbstractFieldDataImpl
|
|||
for (int i = 1; i < values.length; ++i) {
|
||||
values[i] = TestUtil.randomUnicodeString(getRandom());
|
||||
}
|
||||
final int numDocs = scaledRandomIntBetween(10, 10000);
|
||||
final int numDocs = scaledRandomIntBetween(10, 3072);
|
||||
for (int i = 0; i < numDocs; ++i) {
|
||||
final String value = RandomPicks.randomFrom(getRandom(), values);
|
||||
if (value == null) {
|
||||
|
@ -306,7 +306,7 @@ public abstract class AbstractStringFieldDataTests extends AbstractFieldDataImpl
|
|||
for (int i = 1; i < values.length; ++i) {
|
||||
values[i] = TestUtil.randomUnicodeString(getRandom());
|
||||
}
|
||||
final int numDocs = scaledRandomIntBetween(10, 10000);
|
||||
final int numDocs = scaledRandomIntBetween(10, 3072);
|
||||
for (int i = 0; i < numDocs; ++i) {
|
||||
final String value = RandomPicks.randomFrom(getRandom(), values);
|
||||
if (value == null) {
|
||||
|
@ -359,7 +359,7 @@ public abstract class AbstractStringFieldDataTests extends AbstractFieldDataImpl
|
|||
for (int i = 0; i < values.length; ++i) {
|
||||
values[i] = TestUtil.randomSimpleString(getRandom());
|
||||
}
|
||||
final int numParents = scaledRandomIntBetween(10, 10000);
|
||||
final int numParents = scaledRandomIntBetween(10, 3072);
|
||||
List<Document> docs = new ArrayList<>();
|
||||
FixedBitSet parents = new FixedBitSet(64);
|
||||
for (int i = 0; i < numParents; ++i) {
|
||||
|
|
|
@ -66,7 +66,7 @@ public class DuelFieldDataTests extends AbstractFieldDataTests {
|
|||
.endObject().endObject().endObject().string();
|
||||
final DocumentMapper mapper = mapperService.documentMapperParser().parse(mapping);
|
||||
Random random = getRandom();
|
||||
int atLeast = scaledRandomIntBetween(1000, 1500);
|
||||
int atLeast = scaledRandomIntBetween(200, 1500);
|
||||
for (int i = 0; i < atLeast; i++) {
|
||||
String s = Integer.toString(randomByte());
|
||||
|
||||
|
@ -142,8 +142,8 @@ public class DuelFieldDataTests extends AbstractFieldDataTests {
|
|||
|
||||
final DocumentMapper mapper = mapperService.documentMapperParser().parse(mapping);
|
||||
Random random = getRandom();
|
||||
int atLeast = scaledRandomIntBetween(1000, 1500);
|
||||
final int maxNumValues = randomBoolean() ? 1 : randomIntBetween(2, 40);
|
||||
int atLeast = scaledRandomIntBetween(200, 1500);
|
||||
final int maxNumValues = randomBoolean() ? 1 : randomIntBetween(2, 10);
|
||||
byte[] values = new byte[maxNumValues];
|
||||
for (int i = 0; i < atLeast; i++) {
|
||||
int numValues = randomInt(maxNumValues);
|
||||
|
@ -224,8 +224,8 @@ public class DuelFieldDataTests extends AbstractFieldDataTests {
|
|||
|
||||
final DocumentMapper mapper = mapperService.documentMapperParser().parse(mapping);
|
||||
Random random = getRandom();
|
||||
int atLeast = scaledRandomIntBetween(1000, 1500);
|
||||
final int maxNumValues = randomBoolean() ? 1 : randomIntBetween(2, 40);
|
||||
int atLeast = scaledRandomIntBetween(200, 1500);
|
||||
final int maxNumValues = randomBoolean() ? 1 : randomIntBetween(2, 10);
|
||||
float[] values = new float[maxNumValues];
|
||||
for (int i = 0; i < atLeast; i++) {
|
||||
int numValues = randomInt(maxNumValues);
|
||||
|
@ -301,7 +301,7 @@ public class DuelFieldDataTests extends AbstractFieldDataTests {
|
|||
@Test
|
||||
public void testDuelStrings() throws Exception {
|
||||
Random random = getRandom();
|
||||
int atLeast = scaledRandomIntBetween(1000, 1500);
|
||||
int atLeast = scaledRandomIntBetween(200, 1500);
|
||||
for (int i = 0; i < atLeast; i++) {
|
||||
Document d = new Document();
|
||||
d.add(new StringField("_id", "" + i, Field.Store.NO));
|
||||
|
@ -407,8 +407,8 @@ public class DuelFieldDataTests extends AbstractFieldDataTests {
|
|||
final DocumentMapper mapper = mapperService.documentMapperParser().parse(mapping);
|
||||
|
||||
Random random = getRandom();
|
||||
int atLeast = scaledRandomIntBetween(1000, 1500);
|
||||
int maxValuesPerDoc = randomBoolean() ? 1 : randomIntBetween(2, 40);
|
||||
int atLeast = scaledRandomIntBetween(200, 1500);
|
||||
int maxValuesPerDoc = randomBoolean() ? 1 : randomIntBetween(2, 10);
|
||||
// to test deduplication
|
||||
double defaultLat = randomDouble() * 180 - 90;
|
||||
double defaultLon = randomDouble() * 360 - 180;
|
||||
|
|
Loading…
Reference in New Issue