This is an automated email from the ASF dual-hosted git repository.
snazy pushed a commit to branch main
in repository https://gitbox.apache.org/repos/asf/polaris.git
The following commit(s) were added to refs/heads/main by this push:
new 6652f1c06 Fix catalog-role creating in `PolarisTestMetaStoreManager`
(#3122)
6652f1c06 is described below
commit 6652f1c0606a0430d40d5732120152cfa62b34db
Author: Robert Stupp <[email protected]>
AuthorDate: Wed Nov 26 16:58:54 2025 +0100
Fix catalog-role creating in `PolarisTestMetaStoreManager` (#3122)
`testLookup()` attempts to check for a catalog-role on catalog ID 0, which
is an illegal ID for a catalog.
Fix is to move the assertion below the catalog creation.
---
.../apache/polaris/core/persistence/PolarisTestMetaStoreManager.java | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git
a/polaris-core/src/testFixtures/java/org/apache/polaris/core/persistence/PolarisTestMetaStoreManager.java
b/polaris-core/src/testFixtures/java/org/apache/polaris/core/persistence/PolarisTestMetaStoreManager.java
index b32a4059d..e62faaf23 100644
---
a/polaris-core/src/testFixtures/java/org/apache/polaris/core/persistence/PolarisTestMetaStoreManager.java
+++
b/polaris-core/src/testFixtures/java/org/apache/polaris/core/persistence/PolarisTestMetaStoreManager.java
@@ -2658,8 +2658,6 @@ public class PolarisTestMetaStoreManager {
PolarisEntityConstants.getNullId(), principal.getId(),
PolarisEntityType.PRINCIPAL_ROLE);
this.ensureNotExistsById(
PolarisEntityConstants.getNullId(), principal.getId(),
PolarisEntityType.CATALOG);
- this.ensureNotExistsById(
- PolarisEntityConstants.getNullId(), principal.getId(),
PolarisEntityType.CATALOG_ROLE);
// create new catalog
PolarisBaseEntity catalog =
@@ -2675,6 +2673,8 @@ public class PolarisTestMetaStoreManager {
Assertions.assertThat(catalogCreated).isNotNull();
catalog = catalogCreated.getCatalog();
+ this.ensureNotExistsById(catalog.getId(), principal.getId(),
PolarisEntityType.CATALOG_ROLE);
+
// now create all objects
PolarisBaseEntity N1 = this.createEntity(List.of(catalog),
PolarisEntityType.NAMESPACE, "N1");
PolarisBaseEntity N1_N2 =