nastra commented on code in PR #8804: URL: https://github.com/apache/iceberg/pull/8804#discussion_r1362431071
########## aws/src/integration/java/org/apache/iceberg/aws/TestAssumeRoleAwsClientFactory.java: ########## @@ -189,7 +192,17 @@ 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() { + TestHelpers.delayUntilTrueCondition( + "wait for IAM role policy to update.", + 1000, + 1001, + 10001, + TimeUnit.MILLISECONDS, + () -> + iam.getRolePolicy( Review Comment: is that the check required whether IAM is consistent? -- 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: issues-unsubscr...@iceberg.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org --------------------------------------------------------------------- To unsubscribe, e-mail: issues-unsubscr...@iceberg.apache.org For additional commands, e-mail: issues-h...@iceberg.apache.org