nastra commented on code in PR #8804:
URL: https://github.com/apache/iceberg/pull/8804#discussion_r1371698377
##########
aws/src/integration/java/org/apache/iceberg/aws/TestAssumeRoleAwsClientFactory.java:
##########
@@ -189,7 +192,18 @@ public void testAssumeRoleS3FileIO() throws Exception {
Assert.assertFalse("should be able to access file", inputFile.exists());
}
- private void waitForIamConsistency() throws Exception {
- Thread.sleep(10000); // sleep to make sure IAM up to date
+ private void waitForIamConsistency() {
+ Awaitility.await("wait for IAM role policy to update.")
+ .pollDelay(Duration.ofSeconds(1))
+ .atMost(Duration.ofSeconds(10))
+ .until(
Review Comment:
I think you also might need to specify `.ignoreExceptions()` as otherwise
the API can throw a `NoSuchEntityException` when the role doesn't exist
--
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]