From d5c33c21a30171c052e4070e9f6d5916771cb78e Mon Sep 17 00:00:00 2001 From: Giorgio Trettenero Date: Wed, 4 Dec 2024 04:06:13 -0800 Subject: [PATCH] comment out catch --- .../connector/polaris/PolarisConnectorDatabaseService.java | 2 -- .../connector/polaris/PolarisConnectorDatabaseServiceTest.java | 3 ++- 2 files changed, 2 insertions(+), 3 deletions(-) diff --git a/metacat-connector-polaris/src/main/java/com/netflix/metacat/connector/polaris/PolarisConnectorDatabaseService.java b/metacat-connector-polaris/src/main/java/com/netflix/metacat/connector/polaris/PolarisConnectorDatabaseService.java index 2a76a342..c94663fd 100644 --- a/metacat-connector-polaris/src/main/java/com/netflix/metacat/connector/polaris/PolarisConnectorDatabaseService.java +++ b/metacat-connector-polaris/src/main/java/com/netflix/metacat/connector/polaris/PolarisConnectorDatabaseService.java @@ -10,7 +10,6 @@ import com.netflix.metacat.common.server.connectors.exception.ConnectorException; import com.netflix.metacat.common.server.connectors.exception.DatabaseAlreadyExistsException; import com.netflix.metacat.common.server.connectors.exception.DatabaseNotFoundException; -import com.netflix.metacat.common.server.connectors.exception.DatabasePreconditionFailedException; import com.netflix.metacat.common.server.connectors.exception.InvalidMetaException; import com.netflix.metacat.common.server.connectors.model.DatabaseInfo; import com.netflix.metacat.connector.polaris.common.PolarisUtils; @@ -21,7 +20,6 @@ import org.springframework.dao.DataIntegrityViolationException; import javax.annotation.Nullable; -import java.sql.SQLException; import java.util.ArrayList; import java.util.List; import java.util.stream.Collectors; diff --git a/metacat-connector-polaris/src/test/java/com/netflix/metacat/connector/polaris/PolarisConnectorDatabaseServiceTest.java b/metacat-connector-polaris/src/test/java/com/netflix/metacat/connector/polaris/PolarisConnectorDatabaseServiceTest.java index e05c30e4..555c1131 100644 --- a/metacat-connector-polaris/src/test/java/com/netflix/metacat/connector/polaris/PolarisConnectorDatabaseServiceTest.java +++ b/metacat-connector-polaris/src/test/java/com/netflix/metacat/connector/polaris/PolarisConnectorDatabaseServiceTest.java @@ -7,6 +7,7 @@ import com.netflix.metacat.common.server.connectors.ConnectorRequestContext; import com.netflix.metacat.common.server.connectors.exception.DatabaseAlreadyExistsException; import com.netflix.metacat.common.server.connectors.exception.DatabaseNotFoundException; +import com.netflix.metacat.common.server.connectors.exception.InvalidMetaException; import com.netflix.metacat.common.server.connectors.model.AuditInfo; import com.netflix.metacat.common.server.connectors.model.DatabaseInfo; import com.netflix.metacat.common.server.connectors.model.TableInfo; @@ -219,7 +220,7 @@ public void testDeleteDbNoCascades() { polarisDBService.delete(requestContext, DB1_QUALIFIED_NAME); - Assertions.assertThrows(DataIntegrityViolationException.class, () -> + Assertions.assertThrows(InvalidMetaException.class, () -> polarisDBService.delete(requestContext, DB1_QUALIFIED_NAME)); Assert.assertTrue(polarisDBService.exists(requestContext, qualifiedName)); }