This is an automated email from the ASF dual-hosted git repository.
yyan pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/iceberg.git
The following commit(s) were added to refs/heads/master by this push:
new ca575e9 [AWS] Fix MissingFail error prone warning by cleaning up
GlueCatalogCommitFailureTest (#2721)
ca575e9 is described below
commit ca575e9725a7e10b167851355e7d4519ef1173a6
Author: Kyle Bendickson <[email protected]>
AuthorDate: Tue Jun 22 13:08:38 2021 -0700
[AWS] Fix MissingFail error prone warning by cleaning up
GlueCatalogCommitFailureTest (#2721)
---
.../apache/iceberg/aws/glue/GlueCatalogCommitFailureTest.java | 11 +++--------
1 file changed, 3 insertions(+), 8 deletions(-)
diff --git
a/aws/src/integration/java/org/apache/iceberg/aws/glue/GlueCatalogCommitFailureTest.java
b/aws/src/integration/java/org/apache/iceberg/aws/glue/GlueCatalogCommitFailureTest.java
index bcdb4c3..f453031 100644
---
a/aws/src/integration/java/org/apache/iceberg/aws/glue/GlueCatalogCommitFailureTest.java
+++
b/aws/src/integration/java/org/apache/iceberg/aws/glue/GlueCatalogCommitFailureTest.java
@@ -76,14 +76,9 @@ public class GlueCatalogCommitFailureTest extends
GlueTestBase {
GlueTableOperations spyOps = Mockito.spy(ops);
failCommitAndThrowException(spyOps,
ConcurrentModificationException.builder().build());
- try {
- spyOps.commit(metadataV2, metadataV1);
- } catch (CommitFailedException e) {
- Assert.assertTrue("Exception message should mention concurrent
exception",
- e.getMessage().contains("Glue detected concurrent update"));
- Assert.assertTrue("Cause should be concurrent modification exception",
- e.getCause() instanceof ConcurrentModificationException);
- }
+ AssertHelpers.assertThrows("GlueCatalog should fail on concurrent
modifications",
+ ConcurrentModificationException.class, "Glue detected concurrent
update",
+ () -> spyOps.commit(metadataV2, metadataV1));
Mockito.verify(spyOps, Mockito.times(0)).refresh();
ops.refresh();