mirror of
https://github.com/honeymoose/OpenSearch.git
synced 2025-02-06 21:18:31 +00:00
speed up slow test
This commit is contained in:
parent
7aada44da3
commit
5390c01b1c
@ -57,7 +57,7 @@ public class S3OutputStreamTest extends ElasticsearchTestCase {
|
|||||||
|
|
||||||
@Test
|
@Test
|
||||||
public void testWriteSameDataThanBufferSize() throws IOException {
|
public void testWriteSameDataThanBufferSize() throws IOException {
|
||||||
int size = randomIntBetween(BUFFER_SIZE, 10 * BUFFER_SIZE);
|
int size = randomIntBetween(BUFFER_SIZE, 2 * BUFFER_SIZE);
|
||||||
MockDefaultS3OutputStream out = newS3OutputStream(size);
|
MockDefaultS3OutputStream out = newS3OutputStream(size);
|
||||||
|
|
||||||
ByteArrayOutputStream content = new ByteArrayOutputStream(size);
|
ByteArrayOutputStream content = new ByteArrayOutputStream(size);
|
||||||
@ -78,9 +78,9 @@ public class S3OutputStreamTest extends ElasticsearchTestCase {
|
|||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
@Test
|
@Test @Slow
|
||||||
public void testWriteExactlyNTimesMoreDataThanBufferSize() throws IOException {
|
public void testWriteExactlyNTimesMoreDataThanBufferSize() throws IOException {
|
||||||
int n = randomIntBetween(2, 10);
|
int n = randomIntBetween(2, 3);
|
||||||
int length = n * BUFFER_SIZE;
|
int length = n * BUFFER_SIZE;
|
||||||
ByteArrayOutputStream content = new ByteArrayOutputStream(length);
|
ByteArrayOutputStream content = new ByteArrayOutputStream(length);
|
||||||
|
|
||||||
@ -105,10 +105,10 @@ public class S3OutputStreamTest extends ElasticsearchTestCase {
|
|||||||
|
|
||||||
@Test
|
@Test
|
||||||
public void testWriteRandomNumberOfBytes() throws IOException {
|
public void testWriteRandomNumberOfBytes() throws IOException {
|
||||||
Integer randomBufferSize = randomIntBetween(BUFFER_SIZE, 5 * BUFFER_SIZE);
|
Integer randomBufferSize = randomIntBetween(BUFFER_SIZE, 2 * BUFFER_SIZE);
|
||||||
MockDefaultS3OutputStream out = newS3OutputStream(randomBufferSize);
|
MockDefaultS3OutputStream out = newS3OutputStream(randomBufferSize);
|
||||||
|
|
||||||
Integer randomLength = randomIntBetween(1, 10 * BUFFER_SIZE);
|
Integer randomLength = randomIntBetween(1, 2 * BUFFER_SIZE);
|
||||||
ByteArrayOutputStream content = new ByteArrayOutputStream(randomLength);
|
ByteArrayOutputStream content = new ByteArrayOutputStream(randomLength);
|
||||||
for (int i = 0; i < randomLength; i++) {
|
for (int i = 0; i < randomLength; i++) {
|
||||||
content.write(randomByte());
|
content.write(randomByte());
|
||||||
|
Loading…
x
Reference in New Issue
Block a user