Skip to content

Commit 0195782

Browse files
committed
make sure it passed down correctly
1 parent 322c67c commit 0195782

File tree

1 file changed

+14
-1
lines changed

1 file changed

+14
-1
lines changed

test/test_s3.py

Lines changed: 14 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,7 @@
2525
S3RequestType,
2626
S3ResponseError,
2727
CrossProcessLock,
28+
S3FileIoOptions,
2829
create_default_s3_signing_config,
2930
get_optimized_platforms,
3031
)
@@ -397,12 +398,14 @@ def _test_s3_put_get_object(
397398
enable_s3express=False,
398399
mem_limit=None,
399400
**kwargs):
401+
fio_options = S3FileIoOptions(should_stream=True, disk_throughput_gbps=10.0, direct_io=True)
400402
s3_client = s3_client_new(
401403
False,
402404
self.region,
403405
self.part_size,
404406
enable_s3express=enable_s3express,
405-
mem_limit=mem_limit)
407+
mem_limit=mem_limit,
408+
fio_options=fio_options)
406409
signing_config = None
407410
if enable_s3express:
408411
signing_config = AwsSigningConfig(
@@ -590,6 +593,16 @@ def test_put_object_filepath(self):
590593
request = self._put_object_request(None, content_length)
591594
self._test_s3_put_get_object(request, S3RequestType.PUT_OBJECT, send_filepath=self.temp_put_obj_file_path)
592595

596+
def test_put_object_filepath_with_fio_options(self):
597+
content_length = os.stat(self.temp_put_obj_file_path).st_size
598+
request = self._put_object_request(None, content_length)
599+
fio_options = S3FileIoOptions(should_stream=True, disk_throughput_gbps=10.0, direct_io=True)
600+
self._test_s3_put_get_object(
601+
request,
602+
S3RequestType.PUT_OBJECT,
603+
send_filepath=self.temp_put_obj_file_path,
604+
fio_options=fio_options)
605+
593606
def test_put_object_filepath_unknown_content_length(self):
594607
content_length = os.stat(self.temp_put_obj_file_path).st_size
595608
request = self._put_object_request(None, content_length, unknown_content_length=True)

0 commit comments

Comments
 (0)