Skip to content

Commit 849f4d3

Browse files
committed
still use 1MB to avoid it took too long
1 parent 9204fc6 commit 849f4d3

File tree

3 files changed

+15
-13
lines changed

3 files changed

+15
-13
lines changed

tests/s3_data_plane_tests.c

Lines changed: 11 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -1830,7 +1830,7 @@ static int s_test_s3_get_object_backpressure_helper(
18301830
}
18311831
/* Put together a simple S3 Get Object request. */
18321832
struct aws_http_message *message =
1833-
aws_s3_test_get_object_request_new(allocator, host_cursor, g_pre_existing_object_10MB);
1833+
aws_s3_test_get_object_request_new(allocator, host_cursor, g_pre_existing_object_1MB);
18341834

18351835
struct aws_signing_config_aws s3express_signing_config = {
18361836
.algorithm = AWS_SIGNING_ALGORITHM_V4_S3EXPRESS,
@@ -1845,7 +1845,7 @@ static int s_test_s3_get_object_backpressure_helper(
18451845
}
18461846
struct aws_string *filepath_str = NULL;
18471847
if (file_on_disk) {
1848-
filepath_str = aws_s3_tester_create_file(allocator, g_pre_existing_object_10MB, NULL);
1848+
filepath_str = aws_s3_tester_create_file(allocator, g_pre_existing_object_1MB, NULL);
18491849
options.recv_filepath = aws_byte_cursor_from_string(filepath_str);
18501850
}
18511851

@@ -1902,7 +1902,7 @@ static int s_test_s3_get_object_backpressure_small_increments(struct aws_allocat
19021902
/* Test increments smaller than part-size.
19031903
* Only 1 part at a time should be in flight */
19041904
(void)ctx;
1905-
size_t file_size = 10 * 1024 * 1024; /* Test downloads 10MB file */
1905+
size_t file_size = 1 * 1024 * 1024; /* Test downloads 1MB file */
19061906
size_t part_size = file_size / 4;
19071907
size_t window_initial_size = 1024;
19081908
uint64_t window_increment_size = part_size / 4;
@@ -1915,7 +1915,7 @@ static int s_test_s3_get_object_backpressure_big_increments(struct aws_allocator
19151915
/* Test increments larger than part-size.
19161916
* Multiple parts should be in flight at a time */
19171917
(void)ctx;
1918-
size_t file_size = 10 * 1024 * 1024; /* Test downloads 10MB file */
1918+
size_t file_size = 1 * 1024 * 1024; /* Test downloads 1MB file */
19191919
size_t part_size = file_size / 8;
19201920
size_t window_initial_size = 1024;
19211921
uint64_t window_increment_size = part_size * 3;
@@ -1927,7 +1927,7 @@ AWS_TEST_CASE(test_s3_get_object_backpressure_initial_size_zero, s_test_s3_get_o
19271927
static int s_test_s3_get_object_backpressure_initial_size_zero(struct aws_allocator *allocator, void *ctx) {
19281928
/* Test with initial window size of zero */
19291929
(void)ctx;
1930-
size_t file_size = 10 * 1024 * 1024; /* Test downloads 10MB file */
1930+
size_t file_size = 1 * 1024 * 1024; /* Test downloads 1MB file */
19311931
size_t part_size = file_size / 4;
19321932
size_t window_initial_size = 0;
19331933
uint64_t window_increment_size = part_size / 2;
@@ -1944,7 +1944,7 @@ static int s_test_s3_get_object_backpressure_small_increments_recv_filepath(
19441944
/* Test increments smaller than part-size.
19451945
* Only 1 part at a time should be in flight */
19461946
(void)ctx;
1947-
size_t file_size = 10 * 1024 * 1024; /* Test downloads 10MB file */
1947+
size_t file_size = 1 * 1024 * 1024; /* Test downloads 1MB file */
19481948
size_t part_size = file_size / 4;
19491949
size_t window_initial_size = 1024;
19501950
uint64_t window_increment_size = part_size / 2;
@@ -1959,7 +1959,7 @@ static int s_test_s3_get_object_backpressure_big_increments_recv_filepath(struct
19591959
/* Test increments larger than part-size.
19601960
* Multiple parts should be in flight at a time */
19611961
(void)ctx;
1962-
size_t file_size = 10 * 1024 * 1024; /* Test downloads 10MB file */
1962+
size_t file_size = 1 * 1024 * 1024; /* Test downloads 1MB file */
19631963
size_t part_size = file_size / 8;
19641964
size_t window_initial_size = 1024;
19651965
uint64_t window_increment_size = part_size * 3;
@@ -1975,7 +1975,7 @@ static int s_test_s3_get_object_backpressure_initial_size_zero_recv_filepath(
19751975
void *ctx) {
19761976
/* Test with initial window size of zero */
19771977
(void)ctx;
1978-
size_t file_size = 10 * 1024 * 1024; /* Test downloads 10MB file */
1978+
size_t file_size = 1 * 1024 * 1024; /* Test downloads 1MB file */
19791979
size_t part_size = file_size / 4;
19801980
size_t window_initial_size = 0;
19811981
uint64_t window_increment_size = part_size / 2;
@@ -1990,7 +1990,7 @@ static int s_test_s3_get_object_backpressure_small_increments_s3express(struct a
19901990
/* Test increments smaller than part-size with S3 Express.
19911991
* Only 1 part at a time should be in flight */
19921992
(void)ctx;
1993-
size_t file_size = 10 * 1024 * 1024; /* Test downloads 10MB file */
1993+
size_t file_size = 1 * 1024 * 1024; /* Test downloads 1MB file */
19941994
size_t part_size = file_size / 4;
19951995
size_t window_initial_size = 1024;
19961996
uint64_t window_increment_size = part_size / 4;
@@ -2005,7 +2005,7 @@ static int s_test_s3_get_object_backpressure_big_increments_s3express(struct aws
20052005
/* Test increments larger than part-size with S3 Express.
20062006
* Multiple parts should be in flight at a time */
20072007
(void)ctx;
2008-
size_t file_size = 10 * 1024 * 1024; /* Test downloads 10MB file */
2008+
size_t file_size = 1 * 1024 * 1024; /* Test downloads 1MB file */
20092009
size_t part_size = file_size / 8;
20102010
size_t window_initial_size = 1024;
20112011
uint64_t window_increment_size = part_size * 3;
@@ -2019,7 +2019,7 @@ AWS_TEST_CASE(
20192019
static int s_test_s3_get_object_backpressure_initial_size_s3express(struct aws_allocator *allocator, void *ctx) {
20202020
/* Test with initial window size of zero with S3 Express */
20212021
(void)ctx;
2022-
size_t file_size = 10 * 1024 * 1024; /* Test downloads 10MB file */
2022+
size_t file_size = 1 * 1024 * 1024; /* Test downloads 1MB file */
20232023
size_t part_size = file_size / 4;
20242024
size_t window_initial_size = 0;
20252025
uint64_t window_increment_size = part_size / 2;

tests/test_helper/README.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -48,13 +48,15 @@ python3 test_helper.py clean
4848
+ Add the lifecycle to automatic clean up the `upload/` and clean up incomplete multipart uploads after one day.
4949
+ Upload files:
5050
- `pre-existing-10MB` 10MB file.
51+
- `pre-existing-1MB` 1MB file.
5152
- with `--large_objects` enabled
5253
- `pre-existing-2GB`
5354

5455
* Create directory bucket `<BUCKET_NAME>--use1-az4--x-s3` in us-east-1
5556
+ Add the lifecycle to automatic clean up the `upload/` and clean up incomplete multipart uploads after one day.
5657
+ Upload files:
5758
- `pre-existing-10MB` 10MB file.
59+
- `pre-existing-1MB` 1MB file.
5860
- with `--large_objects` enabled
5961
- `pre-existing-2GB`
6062

tests/test_helper/test_helper.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -189,6 +189,8 @@ def create_bucket_with_lifecycle(availability_zone=None, client=s3_client, regio
189189

190190
put_pre_existing_objects(
191191
10*MB, 'pre-existing-10MB', bucket=bucket_name, client=client)
192+
put_pre_existing_objects(
193+
1*MB, 'pre-existing-1MB', bucket=bucket_name, client=client)
192194

193195
if args.large_objects:
194196
put_pre_existing_objects(
@@ -201,8 +203,6 @@ def create_bucket_with_lifecycle(availability_zone=None, client=s3_client, regio
201203
10*MB, 'pre-existing-10MB-aes256', sse='aes256', bucket=bucket_name)
202204
put_pre_existing_objects(
203205
10*MB, 'pre-existing-10MB-kms', sse='kms', bucket=bucket_name)
204-
put_pre_existing_objects(
205-
1*MB, 'pre-existing-1MB', bucket=bucket_name)
206206
put_pre_existing_objects(
207207
1*MB, 'pre-existing-1MB-@', bucket=bucket_name)
208208
put_pre_existing_objects(

0 commit comments

Comments
 (0)