From ae9e19b1273150e998243ccd5a673413b88db54a Mon Sep 17 00:00:00 2001 From: Tomoyuki Morita Date: Thu, 1 Aug 2024 16:53:41 -0700 Subject: [PATCH] Remove dependency from async-query-core to datasources Signed-off-by: Tomoyuki Morita --- async-query-core/build.gradle | 1 - .../sql/spark/asyncquery/AsyncQueryCoreIntegTest.java | 8 +------- 2 files changed, 1 insertion(+), 8 deletions(-) diff --git a/async-query-core/build.gradle b/async-query-core/build.gradle index 1de6cb3105..3cce1b7780 100644 --- a/async-query-core/build.gradle +++ b/async-query-core/build.gradle @@ -49,7 +49,6 @@ dependencies { implementation project(':core') implementation project(':spark') // TODO: dependency to spark should be eliminated - implementation project(':datasources') // TODO: dependency to datasources should be eliminated implementation 'org.json:json:20231013' implementation 'com.google.code.gson:gson:2.8.9' diff --git a/async-query-core/src/test/java/org/opensearch/sql/spark/asyncquery/AsyncQueryCoreIntegTest.java b/async-query-core/src/test/java/org/opensearch/sql/spark/asyncquery/AsyncQueryCoreIntegTest.java index ff92762a7c..3983c67701 100644 --- a/async-query-core/src/test/java/org/opensearch/sql/spark/asyncquery/AsyncQueryCoreIntegTest.java +++ b/async-query-core/src/test/java/org/opensearch/sql/spark/asyncquery/AsyncQueryCoreIntegTest.java @@ -14,8 +14,6 @@ import static org.mockito.ArgumentMatchers.eq; import static org.mockito.Mockito.verify; import static org.mockito.Mockito.when; -import static org.opensearch.sql.datasources.glue.GlueDataSourceFactory.GLUE_INDEX_STORE_OPENSEARCH_AUTH; -import static org.opensearch.sql.datasources.glue.GlueDataSourceFactory.GLUE_INDEX_STORE_OPENSEARCH_URI; import static org.opensearch.sql.spark.dispatcher.IndexDMLHandler.DML_QUERY_JOB_ID; import static org.opensearch.sql.spark.dispatcher.IndexDMLHandler.DROP_INDEX_JOB_ID; @@ -41,7 +39,6 @@ import org.opensearch.sql.datasource.DataSourceService; import org.opensearch.sql.datasource.model.DataSourceMetadata; import org.opensearch.sql.datasource.model.DataSourceType; -import org.opensearch.sql.datasources.auth.AuthenticationType; import org.opensearch.sql.spark.asyncquery.model.AsyncQueryExecutionResponse; import org.opensearch.sql.spark.asyncquery.model.AsyncQueryJobMetadata; import org.opensearch.sql.spark.asyncquery.model.AsyncQueryJobMetadata.AsyncQueryJobMetadataBuilder; @@ -522,10 +519,7 @@ private void givenValidDataSourceMetadataExist() { .setName(DATASOURCE_NAME) .setConnector(DataSourceType.S3GLUE) .setProperties( - ImmutableMap.builder() - .put(GLUE_INDEX_STORE_OPENSEARCH_URI, "https://open.search.cluster:9200/") - .put(GLUE_INDEX_STORE_OPENSEARCH_AUTH, AuthenticationType.NOAUTH.getName()) - .build()) + ImmutableMap.builder().put("PARAM_NAME", "PARAM_VALUE").build()) .build()); }