RussellSpitzer commented on code in PR #5317:
URL: https://github.com/apache/iceberg/pull/5317#discussion_r925999644


##########
aws/src/test/java/org/apache/iceberg/aws/s3/TestS3OutputStream.java:
##########
@@ -119,22 +119,26 @@ public void testWrite() {
 
   @Test
   public void testAbortAfterFailedPartUpload() {
-    doThrow(new 
RuntimeException()).when(s3mock).uploadPart((UploadPartRequest) any(), 
(RequestBody) any());
+    doThrow(new RuntimeException("mock uploadPart 
failure")).when(s3mock).uploadPart((UploadPartRequest) any(), (RequestBody) 
any());
 
     try (S3OutputStream stream = new S3OutputStream(s3mock, randomURI(), 
properties, nullMetrics())) {
       stream.write(randomData(10 * 1024 * 1024));
     } catch (Exception e) {

Review Comment:
   I think for something like this we should use the
   ```
   Assertions.assertThrows(RuntimeException).when( S3OutputStream ....)
   verify(...)
   ```



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to