nastra commented on code in PR #8804:
URL: https://github.com/apache/iceberg/pull/8804#discussion_r1365078356


##########
aws/src/integration/java/org/apache/iceberg/aws/lakeformation/LakeFormationTestBase.java:
##########
@@ -357,8 +359,20 @@ String getRandomTableName() {
     return LF_TEST_TABLE_PREFIX + UUID.randomUUID().toString().replace("-", 
"");
   }
 
-  private static void waitForIamConsistency() throws Exception {
-    Thread.sleep(IAM_PROPAGATION_DELAY); // sleep to make sure IAM up to date
+  private static void waitForIamConsistency(String roleName, String 
policyName) {
+    Awaitility.await()
+        .pollDelay(Duration.ofMillis(1000))
+        .atMost(Duration.ofSeconds(10))
+        .until(
+            () ->
+                iam.getRolePolicy(
+                        GetRolePolicyRequest.builder()
+                            .roleName(roleName)
+                            .policyName(policyName)
+                            .build())
+                    .roleName()
+                    .equalsIgnoreCase(roleName));
+    ; // wait to make sure IAM up to date

Review Comment:
   that seeems like a weird formatting. Maybe just put the comment at the top 
in L363



-- 
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

Reply via email to