fabio-rizzo-01 commented on code in PR #1989: URL: https://github.com/apache/polaris/pull/1989#discussion_r2180402864
########## runtime/service/src/test/java/org/apache/polaris/service/quarkus/catalog/IcebergCatalogTest.java: ########## @@ -486,6 +488,31 @@ public Map<String, BaseResult> purgeRealms(Iterable<String> realms) { }; } + @Test + public void testPropertiesUpdateConcurrentException() { + PolarisMetaStoreManager spyMetaStore = spy(metaStoreManager); + PolarisPassthroughResolutionView passthroughView = + new PolarisPassthroughResolutionView( + polarisContext, entityManager, securityContext, CATALOG_NAME); + IcebergCatalog catalog = + new IcebergCatalog( + entityManager, + spyMetaStore, + polarisContext, + passthroughView, + securityContext, + Mockito.mock(TaskExecutor.class), + fileIOFactory, + polarisEventListener); + catalog.createNamespace(NS); + doReturn(new EntityResult(ENTITY_NOT_FOUND, "")) + .when(spyMetaStore) + .updateEntityPropertiesIfNotChanged(any(), any(), any()); + assertThrows( + CommitFailedException.class, () -> catalog.setProperties(NS, ImmutableMap.of("a", "b"))); + assertThrows(CommitFailedException.class, () -> catalog.removeProperties(NS, Set.of("a", "b"))); Review Comment: That code is in the Exception mapper, I can add that specific case in the test: https://github.com/apache/polaris/blob/eb6b6ad50f33d0ac73c92753063438dcf428c9db/service/common/src/test/java/org/apache/polaris/service/exception/IcebergExceptionMapperTest.java#L73 like this ` Arguments.of(new CommitFailedException("Error persisting entity"), 409)),` but I think that at the catalog level we have to check for the exception. -- 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...@polaris.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org