@@ -245,9 +245,10 @@ static int s_validate_retry_metrics(struct aws_array_list *metrics_list, uint32_
245245 ASSERT_SUCCESS (s_validate_create_multipart_upload_metrics (metrics ));
246246
247247 /* All of the middle should be Upload Parts*/
248- /* This check assumes each request fails 'expected_failures' number of times and then succeeds.
249- * So for each part, we would have expected_failures + 1 attempts.
250- * We make sure all of the attempts have the same request_first_attempt_start_time and the last attempt has an end time. */
248+ /* This check assumes each request fails 'expected_failures' number of times and then succeeds.
249+ * So for each part, we would have expected_failures + 1 attempts.
250+ * We make sure all of the attempts have the same request_first_attempt_start_time and the last attempt has an end
251+ * time. */
251252 size_t failed_count = 0 ;
252253 for (size_t i = 1 ; i < aws_array_list_length (metrics_list ) - 1 ; i = i + expected_failures + 1 ) {
253254 aws_array_list_get_at (metrics_list , & metrics , i );
@@ -283,18 +284,18 @@ static int s_validate_fail_metrics(struct aws_array_list *metrics_list, uint32_t
283284 aws_array_list_get_at (metrics_list , (void * * )& metrics , 0 );
284285 ASSERT_SUCCESS (s_validate_create_multipart_upload_metrics (metrics ));
285286
286- /* It is difficult to simulate forced failure and be precise about how a request fails if there are multiple connections.
287- * Assuming, the first request itself is failing, all of the other parts are force cancelled.
288- * If there are n parts, we would record n + 5 metrics. 5 retries for the first part alone. */
287+ /* It is difficult to simulate forced failure and be precise about how a request fails if there are multiple
288+ * connections. Assuming, the first request itself is failing, all of the other parts are force cancelled. If there
289+ * are n parts, we would record n + 5 metrics. 5 retries for the first part alone. */
289290
290291 /* First part fails 5 times */
291292 aws_array_list_get_at (metrics_list , & metrics , 1 );
292293 ASSERT_TRUE (metrics -> crt_info_metrics .error_code != AWS_ERROR_SUCCESS );
293- for (size_t i = 1 ; i < 6 ; i ++ ) {
294+ for (size_t i = 1 ; i < 6 ; i ++ ) {
294295 aws_array_list_get_at (metrics_list , & metrics2 , i + 1 );
295296 ASSERT_INT_EQUALS (
296- metrics -> time_metrics .s3_request_first_attempt_start_timestamp_ns ,
297- metrics2 -> time_metrics .s3_request_first_attempt_start_timestamp_ns );
297+ metrics -> time_metrics .s3_request_first_attempt_start_timestamp_ns ,
298+ metrics2 -> time_metrics .s3_request_first_attempt_start_timestamp_ns );
298299 ASSERT_INT_EQUALS (metrics -> crt_info_metrics .retry_attempt + 1 , metrics2 -> crt_info_metrics .retry_attempt );
299300 ASSERT_TRUE (metrics2 -> crt_info_metrics .error_code != AWS_ERROR_SUCCESS );
300301 ASSERT_SUCCESS (s_validate_upload_part_metrics (metrics , false));
@@ -303,12 +304,12 @@ static int s_validate_fail_metrics(struct aws_array_list *metrics_list, uint32_t
303304 ASSERT_SUCCESS (s_validate_upload_part_metrics (metrics , true));
304305
305306 /* Rest of the request should have been cancelled */
306- for (size_t i = 7 ; i < parts + 6 ; i ++ ){
307+ for (size_t i = 7 ; i < parts + 6 ; i ++ ) {
307308 aws_array_list_get_at (metrics_list , & metrics , i );
308309 ASSERT_TRUE (metrics -> crt_info_metrics .error_code == AWS_ERROR_S3_CANCELED );
309310 ASSERT_SUCCESS (s_validate_upload_part_metrics (metrics , true));
310311 }
311-
312+
312313 /* Last metrics should be AbortMPU*/
313314 metrics = NULL ;
314315 aws_array_list_get_at (metrics_list , (void * * )& metrics , aws_array_list_length (metrics_list ) - 1 );
@@ -488,8 +489,7 @@ TEST_CASE(multipart_upload_failure_with_mock_server) {
488489 // check if number of metrics received for each part is n
489490 aws_s3_meta_request_test_results_init (& meta_request_test_results , allocator );
490491 ASSERT_SUCCESS (aws_s3_tester_send_meta_request_with_options (& tester , & put_options , & meta_request_test_results ));
491- ASSERT_SUCCESS (
492- s_validate_fail_metrics (& meta_request_test_results .synced_data .metrics , parts ));
492+ ASSERT_SUCCESS (s_validate_fail_metrics (& meta_request_test_results .synced_data .metrics , parts ));
493493
494494 aws_s3_meta_request_test_results_clean_up (& meta_request_test_results );
495495 }
0 commit comments