@@ -3360,19 +3360,27 @@ struct aws_future_s3_buffer_ticket *s_failing_pool_reserve(
33603360 return future ;
33613361}
33623362
3363+ void s_failing_pool_trim (struct aws_s3_buffer_pool * pool ) {
3364+ (void )pool ;
3365+ }
3366+
33633367static struct aws_s3_buffer_pool_vtable s_failing_pool_vtable = {
33643368 .reserve = s_failing_pool_reserve ,
3365- .trim = NULL ,
3369+ .trim = s_failing_pool_trim ,
33663370};
33673371
3372+ void s_failing_pool_destroy (struct aws_s3_buffer_pool * buffer_pool_wrapper ) {
3373+ aws_mem_release ((struct aws_allocator * )buffer_pool_wrapper -> impl , buffer_pool_wrapper );
3374+ }
3375+
33683376struct aws_s3_buffer_pool * s_always_error_buffer_pool_fn (
33693377 struct aws_allocator * allocator ,
33703378 struct aws_s3_buffer_pool_config config ) {
33713379 (void )config ;
33723380 struct aws_s3_buffer_pool * pool = aws_mem_calloc (allocator , 1 , sizeof (struct aws_s3_buffer_pool ));
33733381 pool -> impl = allocator ;
33743382 pool -> vtable = & s_failing_pool_vtable ;
3375- aws_ref_count_init (& pool -> ref_count , pool , (aws_simple_completion_callback * )aws_s3_default_buffer_pool_destroy );
3383+ aws_ref_count_init (& pool -> ref_count , pool , (aws_simple_completion_callback * )s_failing_pool_destroy );
33763384
33773385 return pool ;
33783386}
@@ -3398,7 +3406,7 @@ static int s_test_s3_put_object_buffer_acquire_error(struct aws_allocator *alloc
33983406 AWS_ZERO_STRUCT (path_buf );
33993407
34003408 ASSERT_SUCCESS (aws_s3_tester_upload_file_path_init (
3401- tester .allocator , & path_buf , aws_byte_cursor_from_c_str ("/prefix/round_trip/test_sse_c_fc .txt" )));
3409+ tester .allocator , & path_buf , aws_byte_cursor_from_c_str ("/prefix/round_trip/test_acquire_buffer_error .txt" )));
34023410
34033411 struct aws_byte_cursor object_path = aws_byte_cursor_from_buf (& path_buf );
34043412
@@ -3420,6 +3428,7 @@ static int s_test_s3_put_object_buffer_acquire_error(struct aws_allocator *alloc
34203428 ASSERT_INT_EQUALS (AWS_ERROR_S3_BUFFER_ALLOCATION_FAILED , meta_request_test_results .finished_error_code );
34213429 client = aws_s3_client_release (client );
34223430
3431+ aws_s3_meta_request_test_results_clean_up (& meta_request_test_results );
34233432 aws_byte_buf_clean_up (& path_buf );
34243433 aws_s3_tester_clean_up (& tester );
34253434
0 commit comments