Skip to content

Commit

Permalink
test hopefully last
Browse files Browse the repository at this point in the history
  • Loading branch information
Giorgio Trettenero committed Dec 4, 2024
1 parent b9ee9fd commit 6a3b2bc
Showing 1 changed file with 14 additions and 13 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -86,22 +86,9 @@ public class PolarisConnectorDatabaseServiceTest {
*/
@BeforeEach
public void init() {
final String location = "file://temp";
polarisStoreService.createDatabase(DB1_NAME, location, "metacat_user");
connectorContext = new ConnectorContext(CATALOG_NAME, CATALOG_NAME, "polaris",
new DefaultConfigImpl(new MetacatProperties(null)), new NoopRegistry(), null, Maps.newHashMap());
polarisDBService = new PolarisConnectorDatabaseService(polarisStoreService, connectorContext);
polarisTableService = new PolarisConnectorTableService(
polarisStoreService,
CATALOG_NAME,
polarisDBService,
new HiveConnectorInfoConverter(new HiveTypeConverter()),
new IcebergTableHandler(connectorContext,
new IcebergTableCriteriaImpl(connectorContext),
new IcebergTableOpWrapper(connectorContext, serviceManager),
new IcebergTableOpsProxy()),
new PolarisTableMapper(CATALOG_NAME),
connectorContext);
}

/**
Expand Down Expand Up @@ -207,6 +194,20 @@ public void testDeleteDb() {
*/
@Test
public void testDeleteDbNoCascades() {
final String location = "file://temp";
polarisStoreService.createDatabase(DB1_NAME, location, "metacat_user");
polarisTableService = new PolarisConnectorTableService(
polarisStoreService,
CATALOG_NAME,
polarisDBService,
new HiveConnectorInfoConverter(new HiveTypeConverter()),
new IcebergTableHandler(connectorContext,
new IcebergTableCriteriaImpl(connectorContext),
new IcebergTableOpWrapper(connectorContext, serviceManager),
new IcebergTableOpsProxy()),
new PolarisTableMapper(CATALOG_NAME),
connectorContext);

final DatabaseInfo info = DatabaseInfo.builder().name(DB1_QUALIFIED_NAME).build();
polarisDBService.create(requestContext, info);
Assert.assertTrue(polarisDBService.exists(requestContext, DB1_QUALIFIED_NAME));
Expand Down

0 comments on commit 6a3b2bc

Please sign in to comment.