yuqi1129 opened a new pull request, #14288: URL: https://github.com/apache/gravitino/pull/14288
### What changes were proposed in this pull request? Two changes to `RangerBaseE2EIT`: 1. `waitForUpdatingPolicies()` now has the Ranger Spark plugin download the policies and roles from Ranger admin right away (`SparkRangerAdminPlugin.refreshPoliciesAndTags()`), instead of relying only on the 1s sleep to cover a background poll. The sleep stays for the Ranger plugins the test can't refresh, such as the HDFS one in the Hive container. 2. `cleanIT()` drops the leftover schemas with `cascade`, and closes the Spark session in a `finally` block. ### Why are the changes needed? The Ranger Spark plugin polls Ranger admin every 500ms, and the tests sleep 1s after each grant. On a busy CI runner the poll can finish after the sleep, so the next SQL runs against stale policies. For example, `RangerIcebergE2EIT.testCreateTable` fails on `CREATE DATABASE` with `Permission denied: user [gravitino] does not have [create] privilege`. One such failure then breaks 25 more tests: - The schema created by the failed test stays, so the later tests fail with `SCHEMA_ALREADY_EXISTS`. - `cleanIT()` fails on the non-empty schema before it closes the Spark session. - `RangerPaimonE2EIT` then gets the Iceberg session back from `getOrCreate()`, so every Paimon test fails because `PaimonSparkSessionExtensions` is not configured. Example run: https://github.com/yuqi1129/gravitino/actions/runs/40481390616/job/122114194992 (115 tests, 26 failed). ### Does this PR introduce _any_ user-facing change? No, test only. ### How was this patch tested? The `access-control-IT` job in CI. -- 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]
