rdblue commented on code in PR #6029:
URL: https://github.com/apache/iceberg/pull/6029#discussion_r1001905683
##########
aws/src/integration/java/org/apache/iceberg/aws/TestAssumeRoleAwsClientFactory.java:
##########
@@ -128,20 +130,15 @@ public void testAssumeRoleGlueCatalog() throws Exception {
GlueCatalog glueCatalog = new GlueCatalog();
assumeRoleProperties.put("warehouse", "s3://path");
glueCatalog.initialize("test", assumeRoleProperties);
- try {
- glueCatalog.createNamespace(
- Namespace.of("denied_" + UUID.randomUUID().toString().replace("-",
"")));
- Assert.fail("Access to Glue should be denied");
- } catch (GlueException e) {
- Assert.assertEquals(AccessDeniedException.class, e.getClass());
- }
+ Assertions.assertThatThrownBy(
+ () ->
+ glueCatalog.createNamespace(
+ Namespace.of("denied_" +
UUID.randomUUID().toString().replace("-", ""))))
Review Comment:
In the future, it would be better to put the namespace in a variable to
avoid such awkward auto formatting.
--
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]