From 13611a5dfb474a05ef753bc0bbf03ce4c79d9259 Mon Sep 17 00:00:00 2001 From: Sreekanth Vadigi Date: Wed, 2 Jul 2025 22:22:27 +0530 Subject: [PATCH 01/14] enabling concurrency tests on GitHub Signed-off-by: Sreekanth Vadigi --- .../workflows/concurrencyExecutionTests.yml | 57 +++++++++++++++++++ 1 file changed, 57 insertions(+) create mode 100644 .github/workflows/concurrencyExecutionTests.yml diff --git a/.github/workflows/concurrencyExecutionTests.yml b/.github/workflows/concurrencyExecutionTests.yml new file mode 100644 index 0000000000..7201107ff0 --- /dev/null +++ b/.github/workflows/concurrencyExecutionTests.yml @@ -0,0 +1,57 @@ +name: Concurrency Execution Tests + +on: + push: + branches: [ main ] + workflow_dispatch: + inputs: + branch: + description: 'Branch to checkout' + required: false + default: 'main' + repository: + description: 'Repository to checkout (e.g., user/repo)' + required: false + default: 'databricks/databricks-jdbc' + +jobs: + concurrency-tests: + name: Run Concurrency Execution Tests + runs-on: + group: databricks-protected-runner-group + labels: linux-ubuntu-latest + environment: azure-prod + strategy: + fail-fast: false + matrix: + java-version: [21] + + steps: + - name: Checkout PR or Manual Dispatch + uses: actions/checkout@v4 + with: + ref: ${{ github.event.pull_request.head.ref || inputs.branch || github.ref_name }} + repository: ${{ github.event.pull_request.head.repo.full_name || inputs.repository || github.repository }} + token: ${{ secrets.GITHUB_TOKEN }} + + - name: Set up JDK ${{ matrix.java-version }} + uses: actions/setup-java@v4 + with: + java-version: ${{ matrix.java-version }} + distribution: 'adopt' + + - name: Cache Maven packages + uses: actions/cache@v4 + with: + path: ~/.m2 + key: ${{ runner.os }}-m2-${{ hashFiles('**/pom.xml') }} + restore-keys: ${{ runner.os }}-m2 + + - name: Run Concurrency Execution Tests + run: mvn -B test -Dtest=com.databricks.jdbc.integration.e2e.ConcurrentExecutionTests + env: + DATABRICKS_TOKEN: ${{ secrets.JDBC_PAT_TEST_TOKEN }} + DATABRICKS_USER: ${{ secrets.DATABRICKS_USER }} + DATABRICKS_HOST: ${{ secrets.JDBC_PAT_TEST_HOST_NAME }} + DATABRICKS_HTTP_PATH: ${{ secrets.JDBC_PAT_TEST_HTTP_PATH }} + DATABRICKS_DOGFOOD_HTTP_PATH: ${{ secrets.DATABRICKS_DOGFOOD_HTTP_PATH }} From bd96cdd33105fee5bb99bbd9cbe143c7e74ee3fc Mon Sep 17 00:00:00 2001 From: Sreekanth Vadigi Date: Tue, 15 Jul 2025 10:51:16 +0530 Subject: [PATCH 02/14] passing -ea for strict assertions Signed-off-by: Sreekanth Vadigi --- .github/workflows/concurrencyExecutionTests.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/concurrencyExecutionTests.yml b/.github/workflows/concurrencyExecutionTests.yml index 7201107ff0..1f052cadf0 100644 --- a/.github/workflows/concurrencyExecutionTests.yml +++ b/.github/workflows/concurrencyExecutionTests.yml @@ -48,7 +48,7 @@ jobs: restore-keys: ${{ runner.os }}-m2 - name: Run Concurrency Execution Tests - run: mvn -B test -Dtest=com.databricks.jdbc.integration.e2e.ConcurrentExecutionTests + run: mvn -B test -Dtest=com.databricks.jdbc.integration.e2e.ConcurrentExecutionTests -DargLine="-ea" env: DATABRICKS_TOKEN: ${{ secrets.JDBC_PAT_TEST_TOKEN }} DATABRICKS_USER: ${{ secrets.DATABRICKS_USER }} From 46f3aef3234026df065960629a8302fea2aed158 Mon Sep 17 00:00:00 2001 From: Sreekanth Date: Wed, 16 Jul 2025 13:39:08 +0530 Subject: [PATCH 03/14] Enable concurrency tests (#896) Signed-off-by: Sreekanth Vadigi --- .../workflows/concurrencyExecutionTests.yml | 57 +++++++++++++++++++ 1 file changed, 57 insertions(+) create mode 100644 .github/workflows/concurrencyExecutionTests.yml diff --git a/.github/workflows/concurrencyExecutionTests.yml b/.github/workflows/concurrencyExecutionTests.yml new file mode 100644 index 0000000000..1f052cadf0 --- /dev/null +++ b/.github/workflows/concurrencyExecutionTests.yml @@ -0,0 +1,57 @@ +name: Concurrency Execution Tests + +on: + push: + branches: [ main ] + workflow_dispatch: + inputs: + branch: + description: 'Branch to checkout' + required: false + default: 'main' + repository: + description: 'Repository to checkout (e.g., user/repo)' + required: false + default: 'databricks/databricks-jdbc' + +jobs: + concurrency-tests: + name: Run Concurrency Execution Tests + runs-on: + group: databricks-protected-runner-group + labels: linux-ubuntu-latest + environment: azure-prod + strategy: + fail-fast: false + matrix: + java-version: [21] + + steps: + - name: Checkout PR or Manual Dispatch + uses: actions/checkout@v4 + with: + ref: ${{ github.event.pull_request.head.ref || inputs.branch || github.ref_name }} + repository: ${{ github.event.pull_request.head.repo.full_name || inputs.repository || github.repository }} + token: ${{ secrets.GITHUB_TOKEN }} + + - name: Set up JDK ${{ matrix.java-version }} + uses: actions/setup-java@v4 + with: + java-version: ${{ matrix.java-version }} + distribution: 'adopt' + + - name: Cache Maven packages + uses: actions/cache@v4 + with: + path: ~/.m2 + key: ${{ runner.os }}-m2-${{ hashFiles('**/pom.xml') }} + restore-keys: ${{ runner.os }}-m2 + + - name: Run Concurrency Execution Tests + run: mvn -B test -Dtest=com.databricks.jdbc.integration.e2e.ConcurrentExecutionTests -DargLine="-ea" + env: + DATABRICKS_TOKEN: ${{ secrets.JDBC_PAT_TEST_TOKEN }} + DATABRICKS_USER: ${{ secrets.DATABRICKS_USER }} + DATABRICKS_HOST: ${{ secrets.JDBC_PAT_TEST_HOST_NAME }} + DATABRICKS_HTTP_PATH: ${{ secrets.JDBC_PAT_TEST_HTTP_PATH }} + DATABRICKS_DOGFOOD_HTTP_PATH: ${{ secrets.DATABRICKS_DOGFOOD_HTTP_PATH }} From c71d6d36a75a37b2b87a6ee31c46e09495ed2278 Mon Sep 17 00:00:00 2001 From: Sreekanth Date: Wed, 16 Jul 2025 14:37:47 +0530 Subject: [PATCH 04/14] Update README.md - test commit to trigger workflow --- README.md | 1 + 1 file changed, 1 insertion(+) diff --git a/README.md b/README.md index 58b927cc10..ae7f48dfea 100644 --- a/README.md +++ b/README.md @@ -124,3 +124,4 @@ For more detailed information about integration tests and fake services, see [Te For more information, see the following resources: - [Integration Tests Guide](./docs/TESTING.md) - [Logging Configuration](./docs/LOGGING.md) + From cfbe85b22a144cccf3582f36135fbf65f967a45b Mon Sep 17 00:00:00 2001 From: Sreekanth Date: Wed, 16 Jul 2025 14:49:52 +0530 Subject: [PATCH 05/14] Update concurrencyExecutionTests.yml --- .github/workflows/concurrencyExecutionTests.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/concurrencyExecutionTests.yml b/.github/workflows/concurrencyExecutionTests.yml index 1f052cadf0..eedbf1019e 100644 --- a/.github/workflows/concurrencyExecutionTests.yml +++ b/.github/workflows/concurrencyExecutionTests.yml @@ -2,7 +2,7 @@ name: Concurrency Execution Tests on: push: - branches: [ main ] + branches: [ main, check-enabling-concurrency-tests ] workflow_dispatch: inputs: branch: From 898e4857cae4e63a0428836e2dd003d61f9b0eb0 Mon Sep 17 00:00:00 2001 From: Sreekanth Vadigi Date: Wed, 16 Jul 2025 15:06:27 +0530 Subject: [PATCH 06/14] adding catalog and schema env variables --- .github/workflows/concurrencyExecutionTests.yml | 2 ++ 1 file changed, 2 insertions(+) diff --git a/.github/workflows/concurrencyExecutionTests.yml b/.github/workflows/concurrencyExecutionTests.yml index 1f052cadf0..9b3383cb40 100644 --- a/.github/workflows/concurrencyExecutionTests.yml +++ b/.github/workflows/concurrencyExecutionTests.yml @@ -55,3 +55,5 @@ jobs: DATABRICKS_HOST: ${{ secrets.JDBC_PAT_TEST_HOST_NAME }} DATABRICKS_HTTP_PATH: ${{ secrets.JDBC_PAT_TEST_HTTP_PATH }} DATABRICKS_DOGFOOD_HTTP_PATH: ${{ secrets.DATABRICKS_DOGFOOD_HTTP_PATH }} + DATABRICKS_CATALOG: ${{ secrets.DATABRICKS_CATALOG }} + DATABRICKS_SCHEMA: ${{ secrets.DATABRICKS_SCHEMA }} From 099aaddf887f802283394828637d0df1bb911cc7 Mon Sep 17 00:00:00 2001 From: Sreekanth Date: Wed, 16 Jul 2025 15:11:23 +0530 Subject: [PATCH 07/14] Enable concurrency tests - 2 (#897) Signed-off-by: Sreekanth Vadigi --- .github/workflows/concurrencyExecutionTests.yml | 2 ++ 1 file changed, 2 insertions(+) diff --git a/.github/workflows/concurrencyExecutionTests.yml b/.github/workflows/concurrencyExecutionTests.yml index eedbf1019e..ef71d826f0 100644 --- a/.github/workflows/concurrencyExecutionTests.yml +++ b/.github/workflows/concurrencyExecutionTests.yml @@ -55,3 +55,5 @@ jobs: DATABRICKS_HOST: ${{ secrets.JDBC_PAT_TEST_HOST_NAME }} DATABRICKS_HTTP_PATH: ${{ secrets.JDBC_PAT_TEST_HTTP_PATH }} DATABRICKS_DOGFOOD_HTTP_PATH: ${{ secrets.DATABRICKS_DOGFOOD_HTTP_PATH }} + DATABRICKS_CATALOG: ${{ secrets.DATABRICKS_CATALOG }} + DATABRICKS_SCHEMA: ${{ secrets.DATABRICKS_SCHEMA }} From 09d29aeb74b055f74214bb9ad7edc416ea6396b1 Mon Sep 17 00:00:00 2001 From: Sreekanth Vadigi Date: Wed, 16 Jul 2025 16:10:46 +0530 Subject: [PATCH 08/14] debug logs Signed-off-by: Sreekanth Vadigi --- .../jdbc/integration/e2e/ConcurrentExecutionTests.java | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/test/java/com/databricks/jdbc/integration/e2e/ConcurrentExecutionTests.java b/src/test/java/com/databricks/jdbc/integration/e2e/ConcurrentExecutionTests.java index bc6ff17e9b..55cb9dec8c 100644 --- a/src/test/java/com/databricks/jdbc/integration/e2e/ConcurrentExecutionTests.java +++ b/src/test/java/com/databricks/jdbc/integration/e2e/ConcurrentExecutionTests.java @@ -27,8 +27,10 @@ void testConcurrentExecution() throws InterruptedException { () -> { try { runThreadQueries(threadNum); + System.out.println("Thread " + threadNum + " completed successfully"); return true; } catch (Exception e) { + System.err.println("Thread " + threadNum + " failed: " + e.getMessage()); e.printStackTrace(); return false; } From c6822d45271b3397bba40ceaaaca2199b8ebcada Mon Sep 17 00:00:00 2001 From: Sreekanth Date: Wed, 16 Jul 2025 16:15:57 +0530 Subject: [PATCH 09/14] Enable concurrency tests - 3 (#898) Signed-off-by: Sreekanth Vadigi --- .../jdbc/integration/e2e/ConcurrentExecutionTests.java | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/test/java/com/databricks/jdbc/integration/e2e/ConcurrentExecutionTests.java b/src/test/java/com/databricks/jdbc/integration/e2e/ConcurrentExecutionTests.java index bc6ff17e9b..55cb9dec8c 100644 --- a/src/test/java/com/databricks/jdbc/integration/e2e/ConcurrentExecutionTests.java +++ b/src/test/java/com/databricks/jdbc/integration/e2e/ConcurrentExecutionTests.java @@ -27,8 +27,10 @@ void testConcurrentExecution() throws InterruptedException { () -> { try { runThreadQueries(threadNum); + System.out.println("Thread " + threadNum + " completed successfully"); return true; } catch (Exception e) { + System.err.println("Thread " + threadNum + " failed: " + e.getMessage()); e.printStackTrace(); return false; } From 5ae74723773bd655ab9204c196d8871cc19f96ab Mon Sep 17 00:00:00 2001 From: Sreekanth Vadigi Date: Wed, 16 Jul 2025 16:29:04 +0530 Subject: [PATCH 10/14] testing with 1 thread Signed-off-by: Sreekanth Vadigi --- .../jdbc/integration/e2e/ConcurrentExecutionTests.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/test/java/com/databricks/jdbc/integration/e2e/ConcurrentExecutionTests.java b/src/test/java/com/databricks/jdbc/integration/e2e/ConcurrentExecutionTests.java index 55cb9dec8c..d3b01f7e69 100644 --- a/src/test/java/com/databricks/jdbc/integration/e2e/ConcurrentExecutionTests.java +++ b/src/test/java/com/databricks/jdbc/integration/e2e/ConcurrentExecutionTests.java @@ -13,7 +13,7 @@ import org.junit.jupiter.api.Test; public class ConcurrentExecutionTests { - private static final int NUM_THREADS = 20; + private static final int NUM_THREADS = 1; @Test void testConcurrentExecution() throws InterruptedException { From cf9417528f4ad110c2a940bddf923270ca002bd6 Mon Sep 17 00:00:00 2001 From: Sreekanth Date: Wed, 16 Jul 2025 16:30:09 +0530 Subject: [PATCH 11/14] Enable concurrency tests - 4 (#899) Signed-off-by: Sreekanth Vadigi --- .../jdbc/integration/e2e/ConcurrentExecutionTests.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/test/java/com/databricks/jdbc/integration/e2e/ConcurrentExecutionTests.java b/src/test/java/com/databricks/jdbc/integration/e2e/ConcurrentExecutionTests.java index 55cb9dec8c..d3b01f7e69 100644 --- a/src/test/java/com/databricks/jdbc/integration/e2e/ConcurrentExecutionTests.java +++ b/src/test/java/com/databricks/jdbc/integration/e2e/ConcurrentExecutionTests.java @@ -13,7 +13,7 @@ import org.junit.jupiter.api.Test; public class ConcurrentExecutionTests { - private static final int NUM_THREADS = 20; + private static final int NUM_THREADS = 1; @Test void testConcurrentExecution() throws InterruptedException { From 2b205c63ba4ee3d7da475d012b9cf4420dcac18b Mon Sep 17 00:00:00 2001 From: Sreekanth Vadigi Date: Thu, 17 Jul 2025 12:41:25 +0530 Subject: [PATCH 12/14] catalog and schema name updated Signed-off-by: Sreekanth Vadigi --- .github/workflows/concurrencyExecutionTests.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/concurrencyExecutionTests.yml b/.github/workflows/concurrencyExecutionTests.yml index ef71d826f0..f92a2d7409 100644 --- a/.github/workflows/concurrencyExecutionTests.yml +++ b/.github/workflows/concurrencyExecutionTests.yml @@ -55,5 +55,5 @@ jobs: DATABRICKS_HOST: ${{ secrets.JDBC_PAT_TEST_HOST_NAME }} DATABRICKS_HTTP_PATH: ${{ secrets.JDBC_PAT_TEST_HTTP_PATH }} DATABRICKS_DOGFOOD_HTTP_PATH: ${{ secrets.DATABRICKS_DOGFOOD_HTTP_PATH }} - DATABRICKS_CATALOG: ${{ secrets.DATABRICKS_CATALOG }} - DATABRICKS_SCHEMA: ${{ secrets.DATABRICKS_SCHEMA }} + DATABRICKS_CATALOG: main + DATABRICKS_SCHEMA: oss_jdbc_tests From 917c4b0dc74dcac95957e9734a26b9b224265dcd Mon Sep 17 00:00:00 2001 From: Sreekanth Vadigi Date: Thu, 17 Jul 2025 14:15:29 +0530 Subject: [PATCH 13/14] removing debug changes Signed-off-by: Sreekanth Vadigi --- README.md | 1 - .../jdbc/integration/e2e/ConcurrentExecutionTests.java | 4 +--- 2 files changed, 1 insertion(+), 4 deletions(-) diff --git a/README.md b/README.md index ae7f48dfea..58b927cc10 100644 --- a/README.md +++ b/README.md @@ -124,4 +124,3 @@ For more detailed information about integration tests and fake services, see [Te For more information, see the following resources: - [Integration Tests Guide](./docs/TESTING.md) - [Logging Configuration](./docs/LOGGING.md) - diff --git a/src/test/java/com/databricks/jdbc/integration/e2e/ConcurrentExecutionTests.java b/src/test/java/com/databricks/jdbc/integration/e2e/ConcurrentExecutionTests.java index d3b01f7e69..bc6ff17e9b 100644 --- a/src/test/java/com/databricks/jdbc/integration/e2e/ConcurrentExecutionTests.java +++ b/src/test/java/com/databricks/jdbc/integration/e2e/ConcurrentExecutionTests.java @@ -13,7 +13,7 @@ import org.junit.jupiter.api.Test; public class ConcurrentExecutionTests { - private static final int NUM_THREADS = 1; + private static final int NUM_THREADS = 20; @Test void testConcurrentExecution() throws InterruptedException { @@ -27,10 +27,8 @@ void testConcurrentExecution() throws InterruptedException { () -> { try { runThreadQueries(threadNum); - System.out.println("Thread " + threadNum + " completed successfully"); return true; } catch (Exception e) { - System.err.println("Thread " + threadNum + " failed: " + e.getMessage()); e.printStackTrace(); return false; } From d232591fdbff028b48e456b17f39297225aa2398 Mon Sep 17 00:00:00 2001 From: Sreekanth Vadigi Date: Thu, 17 Jul 2025 14:32:10 +0530 Subject: [PATCH 14/14] removing debug workflow trigger Signed-off-by: Sreekanth Vadigi --- .github/workflows/concurrencyExecutionTests.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/concurrencyExecutionTests.yml b/.github/workflows/concurrencyExecutionTests.yml index f92a2d7409..ebaa0249ac 100644 --- a/.github/workflows/concurrencyExecutionTests.yml +++ b/.github/workflows/concurrencyExecutionTests.yml @@ -2,7 +2,7 @@ name: Concurrency Execution Tests on: push: - branches: [ main, check-enabling-concurrency-tests ] + branches: [ main ] workflow_dispatch: inputs: branch: