|
25 | 25 | S3RequestType, |
26 | 26 | S3ResponseError, |
27 | 27 | CrossProcessLock, |
| 28 | + S3FileIoOptions, |
28 | 29 | create_default_s3_signing_config, |
29 | 30 | get_optimized_platforms, |
30 | 31 | ) |
@@ -397,12 +398,14 @@ def _test_s3_put_get_object( |
397 | 398 | enable_s3express=False, |
398 | 399 | mem_limit=None, |
399 | 400 | **kwargs): |
| 401 | + fio_options = S3FileIoOptions(should_stream=True, disk_throughput_gbps=10.0, direct_io=True) |
400 | 402 | s3_client = s3_client_new( |
401 | 403 | False, |
402 | 404 | self.region, |
403 | 405 | self.part_size, |
404 | 406 | enable_s3express=enable_s3express, |
405 | | - mem_limit=mem_limit) |
| 407 | + mem_limit=mem_limit, |
| 408 | + fio_options=fio_options) |
406 | 409 | signing_config = None |
407 | 410 | if enable_s3express: |
408 | 411 | signing_config = AwsSigningConfig( |
@@ -590,6 +593,16 @@ def test_put_object_filepath(self): |
590 | 593 | request = self._put_object_request(None, content_length) |
591 | 594 | self._test_s3_put_get_object(request, S3RequestType.PUT_OBJECT, send_filepath=self.temp_put_obj_file_path) |
592 | 595 |
|
| 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 | + |
593 | 606 | def test_put_object_filepath_unknown_content_length(self): |
594 | 607 | content_length = os.stat(self.temp_put_obj_file_path).st_size |
595 | 608 | request = self._put_object_request(None, content_length, unknown_content_length=True) |
|
0 commit comments