Skip to content

Commit

Permalink
fixed jdbc url for cloud
Browse files Browse the repository at this point in the history
  • Loading branch information
chernser committed Dec 19, 2024
1 parent 0814b5d commit cf6d4cc
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 62 deletions.
65 changes: 4 additions & 61 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -196,7 +196,7 @@ jobs:
CLICKHOUSE_CLOUD_HOST: ${{ secrets.INTEGRATIONS_TEAM_TESTS_CLOUD_HOST_SMT }}
CLICKHOUSE_CLOUD_PASSWORD: ${{ secrets.INTEGRATIONS_TEAM_TESTS_CLOUD_PASSWORD_SMT }}
run: |
mvn --also-make --batch-mode --no-transfer-progress --projects clickhouse-http-client -DclickhouseVersion=${{ matrix.clickhouse }} verify
mvn --also-make --batch-mode --no-transfer-progress --projects clickhouse-http-client,client-v2 -DclickhouseVersion=${{ matrix.clickhouse }} verify
- name: Upload test results
uses: actions/upload-artifact@v4
if: failure()
Expand All @@ -217,7 +217,7 @@ jobs:
project: ["clickhouse-http-client", "clickhouse-jdbc", "client-v2", "jdbc-v2"]
fail-fast: false
timeout-minutes: 15
name: Java client (http) + CH ${{ matrix.clickhouse }}
name: ${{ matrix.project }} + CH ${{ matrix.clickhouse }}
steps:
- name: Check out repository
uses: actions/checkout@v4
Expand Down Expand Up @@ -265,7 +265,7 @@ jobs:
uses: actions/upload-artifact@v4
if: failure()
with:
name: result ${{ github.job }}
name: result ${{ github.job }}_${{ matrix.project }}_${{ matrix.clickhouse }}
path: |
**/target/failsafe-reports
**/target/surefire-reports
Expand Down Expand Up @@ -322,7 +322,7 @@ jobs:
CLICKHOUSE_CLOUD_HOST: ${{ secrets.INTEGRATIONS_TEAM_TESTS_CLOUD_HOST_SMT }}
CLICKHOUSE_CLOUD_PASSWORD: ${{ secrets.INTEGRATIONS_TEAM_TESTS_CLOUD_PASSWORD_SMT }}
run: |
mvn --batch-mode --no-transfer-progress --projects clickhouse-jdbc -DclickhouseVersion=${{ matrix.clickhouse }} -Dprotocol=${{ matrix.protocol }} verify
mvn --batch-mode --no-transfer-progress --projects clickhouse-jdbc,jdbc-v2 -DclickhouseVersion=${{ matrix.clickhouse }} -Dprotocol=${{ matrix.protocol }} verify
- name: Upload test results
uses: actions/upload-artifact@v4
if: failure()
Expand Down Expand Up @@ -446,60 +446,3 @@ jobs:
path: |
**/target/failsafe-reports
**/target/surefire-reports
test-client-v2:
runs-on: ubuntu-latest
needs: compile
strategy:
matrix:
# most recent LTS releases as well as latest stable builds
# https://github.com/ClickHouse/ClickHouse/pulls?q=is%3Aopen+is%3Apr+label%3Arelease
clickhouse: ["24.3", "24.8", "latest"]
fail-fast: false
timeout-minutes: 15
name: Client V2 + CH ${{ matrix.clickhouse }}
steps:
- name: Check out repository
uses: actions/checkout@v4
- name: Check out PR
run: |
git fetch --no-tags --prune --progress --no-recurse-submodules --depth=1 \
origin pull/${{ github.event.inputs.pr }}/merge:merged-pr && git checkout merged-pr
if: github.event.inputs.pr != ''
- name: Install JDK 17 and Maven
uses: actions/setup-java@v4
with:
distribution: "temurin"
java-version: |
8
17
cache: "maven"
- name: Setup Toolchain
shell: bash
run: |
mkdir -p $HOME/.m2 \
&& cat << EOF > $HOME/.m2/toolchains.xml
<?xml version="1.0" encoding="UTF8"?>
<toolchains>
<toolchain>
<type>jdk</type>
<provides>
<version>17</version>
</provides>
<configuration>
<jdkHome>${{ env.JAVA_HOME }}</jdkHome>
</configuration>
</toolchain>
</toolchains>
EOF
- name: Test Java client
run: |
mvn --also-make --batch-mode --no-transfer-progress --projects client-v2 -Dclient.tests.useNewImplementation=true -DclickhouseVersion=${{ matrix.clickhouse }} verify
- name: Upload test results
uses: actions/upload-artifact@v4
if: failure()
with:
name: result ${{ github.job }}
path: |
**/target/failsafe-reports
**/target/surefire-reports
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ public String getEndpointString() {
return getEndpointString(isCloud());
}
public String getEndpointString(boolean includeDbName) {
return "jdbc:ch:" + (isCloud() ? "https" : "http") + "://" +
return "jdbc:ch:" + (isCloud() ? "" : "http://") +
ClickHouseServerForTest.getClickHouseAddress(ClickHouseProtocol.HTTP, false) + "/" + (includeDbName ? ClickHouseServerForTest.getDatabase() : "");
}

Expand Down

0 comments on commit cf6d4cc

Please sign in to comment.