From a42ce5a50ffa97e61c401e1d1a9d7cb4637302b0 Mon Sep 17 00:00:00 2001 From: Shivam Raj Date: Wed, 2 Jul 2025 13:26:18 +0530 Subject: [PATCH 1/3] exclude m2m tests in pr checks --- .github/workflows/runIntegrationTests.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/runIntegrationTests.yml b/.github/workflows/runIntegrationTests.yml index f686b7a8fa..efe97ca421 100644 --- a/.github/workflows/runIntegrationTests.yml +++ b/.github/workflows/runIntegrationTests.yml @@ -14,7 +14,7 @@ jobs: strategy: matrix: include: - - test-command: mvn -B compile test -Dtest=*IntegrationTests + - test-command: mvn -B compile test -Dtest=*IntegrationTests,!M2MPrivateKeyCredentialsIntegrationTests,!M2MAuthIntegrationTests token-secret: DATABRICKS_TOKEN fake-service-type: 'SQL_EXEC' - test-command: mvn -B compile test -Dtest=*IntegrationTests,!M2MPrivateKeyCredentialsIntegrationTests,!SqlExecApiHybridResultsIntegrationTests,!DBFSVolumeIntegrationTests,!M2MAuthIntegrationTests,!UCVolumeIntegrationTests From 21df6e2f978ed5d7382ae0f5b19c9983ed726c15 Mon Sep 17 00:00:00 2001 From: Shivam Raj Date: Wed, 2 Jul 2025 13:36:35 +0530 Subject: [PATCH 2/3] exclude m2m tests on PR run --- .github/workflows/prIntegrationTests.yml | 2 +- .github/workflows/runIntegrationTests.yml | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/prIntegrationTests.yml b/.github/workflows/prIntegrationTests.yml index 8fc9f11593..e5851eb00b 100644 --- a/.github/workflows/prIntegrationTests.yml +++ b/.github/workflows/prIntegrationTests.yml @@ -14,7 +14,7 @@ jobs: strategy: matrix: include: - - test-command: mvn -B compile test -Dtest=*IntegrationTests + - test-command: mvn -B compile test -Dtest=*IntegrationTests,!M2MPrivateKeyCredentialsIntegrationTests,!M2MAuthIntegrationTests fake-service-type: 'SQL_EXEC' - test-command: mvn -B compile test -Dtest=*IntegrationTests,!M2MPrivateKeyCredentialsIntegrationTests,!SqlExecApiHybridResultsIntegrationTests,!DBFSVolumeIntegrationTests,!M2MAuthIntegrationTests,!UCVolumeIntegrationTests fake-service-type: 'THRIFT_SERVER' diff --git a/.github/workflows/runIntegrationTests.yml b/.github/workflows/runIntegrationTests.yml index efe97ca421..f686b7a8fa 100644 --- a/.github/workflows/runIntegrationTests.yml +++ b/.github/workflows/runIntegrationTests.yml @@ -14,7 +14,7 @@ jobs: strategy: matrix: include: - - test-command: mvn -B compile test -Dtest=*IntegrationTests,!M2MPrivateKeyCredentialsIntegrationTests,!M2MAuthIntegrationTests + - test-command: mvn -B compile test -Dtest=*IntegrationTests token-secret: DATABRICKS_TOKEN fake-service-type: 'SQL_EXEC' - test-command: mvn -B compile test -Dtest=*IntegrationTests,!M2MPrivateKeyCredentialsIntegrationTests,!SqlExecApiHybridResultsIntegrationTests,!DBFSVolumeIntegrationTests,!M2MAuthIntegrationTests,!UCVolumeIntegrationTests From 0a60465cb1b618b94228c30109e78c1101c3f3d2 Mon Sep 17 00:00:00 2001 From: Shivam Raj Date: Wed, 2 Jul 2025 14:49:32 +0530 Subject: [PATCH 3/3] removed getJwtTokenEndpoint method --- .../fakeservice/AbstractFakeServiceIntegrationTests.java | 4 ++-- .../jdbc/integration/fakeservice/FakeServiceConfigLoader.java | 2 ++ src/test/resources/sqlexecfakeservicetest.properties | 1 + src/test/resources/sqlgatewayfakeservicetest.properties | 1 + src/test/resources/thriftserverfakeservicetest.properties | 1 + 5 files changed, 7 insertions(+), 2 deletions(-) diff --git a/src/test/java/com/databricks/jdbc/integration/fakeservice/AbstractFakeServiceIntegrationTests.java b/src/test/java/com/databricks/jdbc/integration/fakeservice/AbstractFakeServiceIntegrationTests.java index 76dca2c985..b247576ddd 100644 --- a/src/test/java/com/databricks/jdbc/integration/fakeservice/AbstractFakeServiceIntegrationTests.java +++ b/src/test/java/com/databricks/jdbc/integration/fakeservice/AbstractFakeServiceIntegrationTests.java @@ -1,8 +1,8 @@ package com.databricks.jdbc.integration.fakeservice; -import static com.databricks.jdbc.integration.IntegrationTestUtil.getJWTTokenEndpointHost; import static com.databricks.jdbc.integration.fakeservice.FakeServiceConfigLoader.CLOUD_FETCH_HOST_PROP; import static com.databricks.jdbc.integration.fakeservice.FakeServiceConfigLoader.DATABRICKS_HOST_PROP; +import static com.databricks.jdbc.integration.fakeservice.FakeServiceConfigLoader.JWT_TOKEN_ENDPOINT_HOST_PROP; import static com.github.tomakehurst.wiremock.core.WireMockConfiguration.wireMockConfig; import com.databricks.jdbc.common.DatabricksJdbcConstants; @@ -73,7 +73,7 @@ public abstract class AbstractFakeServiceIntegrationTests { new FakeServiceHttpClientFactory( FakeServiceConfigLoader.getFakeServiceUserAgent()))), DatabricksJdbcConstants.FakeServiceType.JWT_TOKEN_ENDPOINT, - getJWTTokenEndpointHost()); + FakeServiceConfigLoader.getProperty(JWT_TOKEN_ENDPOINT_HOST_PROP)); /** * Resets the potential mutations (e.g., URLs set by {@link #setDatabricksApiTargetUrl}, {@link diff --git a/src/test/java/com/databricks/jdbc/integration/fakeservice/FakeServiceConfigLoader.java b/src/test/java/com/databricks/jdbc/integration/fakeservice/FakeServiceConfigLoader.java index a56dafe63c..9f588bac62 100644 --- a/src/test/java/com/databricks/jdbc/integration/fakeservice/FakeServiceConfigLoader.java +++ b/src/test/java/com/databricks/jdbc/integration/fakeservice/FakeServiceConfigLoader.java @@ -13,6 +13,8 @@ public class FakeServiceConfigLoader { public static final String PRESIGNED_URL_HOST = "host.presignedurl"; + public static final String JWT_TOKEN_ENDPOINT_HOST_PROP = "host.jwt.token.endpoint"; + public static final String TEST_CATALOG = "testcatalog"; public static final String TEST_SCHEMA = "testschema"; diff --git a/src/test/resources/sqlexecfakeservicetest.properties b/src/test/resources/sqlexecfakeservicetest.properties index e3d0937724..854c3e1995 100644 --- a/src/test/resources/sqlexecfakeservicetest.properties +++ b/src/test/resources/sqlexecfakeservicetest.properties @@ -1,6 +1,7 @@ host.databricks=https://e2-dogfood.staging.cloud.databricks.com:443 host.cloudfetch=https://e2-dogfood-core.s3.us-west-2.amazonaws.com host.presignedurl=https://us-west-2-extstaging-managed-catalog-test-bucket-1.s3-fips.us-west-2.amazonaws.com +host.jwt.token.endpoint=https://dev-591123.oktapreview.com # SQL warehouse compute httppath=/sql/1.0/warehouses/dd43ee29fedd958d connschema=default diff --git a/src/test/resources/sqlgatewayfakeservicetest.properties b/src/test/resources/sqlgatewayfakeservicetest.properties index e9c4e4a5c1..25053c3969 100644 --- a/src/test/resources/sqlgatewayfakeservicetest.properties +++ b/src/test/resources/sqlgatewayfakeservicetest.properties @@ -1,5 +1,6 @@ host.databricks=https://e2-dogfood.staging.cloud.databricks.com:443 host.cloudfetch=https://e2-dogfood-core.s3.us-west-2.amazonaws.com +host.jwt.token.endpoint=https://dev-591123.oktapreview.com # SQL warehouse compute httppath=/sql/1.0/warehouses/dd43ee29fedd958d connschema=default diff --git a/src/test/resources/thriftserverfakeservicetest.properties b/src/test/resources/thriftserverfakeservicetest.properties index 52110b0bb1..532ec89cbe 100644 --- a/src/test/resources/thriftserverfakeservicetest.properties +++ b/src/test/resources/thriftserverfakeservicetest.properties @@ -1,5 +1,6 @@ host.databricks=https://e2-dogfood.staging.cloud.databricks.com:443 host.cloudfetch=https://e2-dogfood-core.s3.us-west-2.amazonaws.com +host.jwt.token.endpoint=https://dev-591123.oktapreview.com # All-purpose compute httppath=/sql/protocolv1/o/6051921418418893/0819-204509-hill72 connschema=default