-
Notifications
You must be signed in to change notification settings - Fork 28
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* Create missing profiles for H2, in pom and github workflows * Add test classpath for H2 remote, so that UDF tests can run * Make each H2 test config use different directories/ports * Enable CockroachDB engine schema tests (required upgrading Docker image version, due to a bug cockroachdb/cockroach#62601) * Add flag to MySQL test configs to allow connecting to newer versions of the server * Other improvements and cleanups
- Loading branch information
José Fidalgo
committed
Feb 14, 2022
1 parent
968dc8d
commit b3b5cd9
Showing
14 changed files
with
239 additions
and
161 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,36 @@ | ||
# This workflow will build a Java project with Maven | ||
# For more information see: https://help.github.com/actions/language-and-framework-guides/building-and-testing-java-with-maven | ||
|
||
name: PDB tests with H2 remote | ||
|
||
on: | ||
push: | ||
branches: [ master ] | ||
pull_request: | ||
branches: [ master ] | ||
|
||
jobs: | ||
test: | ||
runs-on: ubuntu-latest | ||
name: Test H2 remote PDB Java ${{ matrix.java-version }} | ||
|
||
strategy: | ||
matrix: | ||
java-version: [ 8, 11, 17 ] | ||
steps: | ||
- uses: actions/checkout@v2 | ||
- name: Set up JDK ${{ matrix.java-version }} | ||
uses: actions/setup-java@v2.3.1 | ||
with: | ||
java-version: ${{ matrix.java-version }} | ||
distribution: zulu | ||
|
||
- name: Cache Maven packages | ||
uses: actions/cache@v2.1.6 | ||
with: | ||
path: ~/.m2 | ||
key: ${{ runner.os }}-m2-${{ hashFiles('**/pom.xml') }} | ||
restore-keys: ${{ runner.os }}-m2-java${{ matrix.java-version }} | ||
|
||
- name: Test with H2 remote | ||
run: mvn -B clean test -Ph2remote |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,36 @@ | ||
# This workflow will build a Java project with Maven | ||
# For more information see: https://help.github.com/actions/language-and-framework-guides/building-and-testing-java-with-maven | ||
|
||
name: PDB tests with H2v2 remote | ||
|
||
on: | ||
push: | ||
branches: [ master ] | ||
pull_request: | ||
branches: [ master ] | ||
|
||
jobs: | ||
test: | ||
runs-on: ubuntu-latest | ||
name: Test H2V2 remote PDB Java ${{ matrix.java-version }} | ||
|
||
strategy: | ||
matrix: | ||
java-version: [ 8, 11, 17 ] | ||
steps: | ||
- uses: actions/checkout@v2 | ||
- name: Set up JDK ${{ matrix.java-version }} | ||
uses: actions/setup-java@v2.3.1 | ||
with: | ||
java-version: ${{ matrix.java-version }} | ||
distribution: zulu | ||
|
||
- name: Cache Maven packages | ||
uses: actions/cache@v2.1.6 | ||
with: | ||
path: ~/.m2 | ||
key: ${{ runner.os }}-m2-${{ hashFiles('**/pom.xml') }} | ||
restore-keys: ${{ runner.os }}-m2-java${{ matrix.java-version }} | ||
|
||
- name: Test with H2v2 remote | ||
run: mvn -B clean test -Ph2v2remote |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
52 changes: 52 additions & 0 deletions
52
...om/feedzai/commons/sql/abstraction/engine/impl/cockroach/CockroachDBEngineSchemaTest.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,52 @@ | ||
/* | ||
* Copyright 2022 Feedzai | ||
* | ||
* Licensed under the Apache License, Version 2.0 (the "License"); | ||
* you may not use this file except in compliance with the License. | ||
* You may obtain a copy of the License at | ||
* | ||
* http://www.apache.org/licenses/LICENSE-2.0 | ||
* | ||
* Unless required by applicable law or agreed to in writing, software | ||
* distributed under the License is distributed on an "AS IS" BASIS, | ||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | ||
* See the License for the specific language governing permissions and | ||
* limitations under the License. | ||
*/ | ||
package com.feedzai.commons.sql.abstraction.engine.impl.cockroach; | ||
|
||
import com.feedzai.commons.sql.abstraction.engine.impl.postgresql.PostgreSqlEngineSchemaTest; | ||
import com.feedzai.commons.sql.abstraction.engine.testconfig.DatabaseConfiguration; | ||
import com.feedzai.commons.sql.abstraction.engine.testconfig.DatabaseTestUtil; | ||
import org.junit.Ignore; | ||
import org.junit.Test; | ||
import org.junit.runner.RunWith; | ||
import org.junit.runners.Parameterized; | ||
|
||
import java.util.Collection; | ||
|
||
/** | ||
* Schema related tests for CockroachDB. | ||
* | ||
* @author José Fidalgo (jose.fidalgo@feedzai.com) | ||
*/ | ||
@RunWith(Parameterized.class) | ||
public class CockroachDBEngineSchemaTest extends PostgreSqlEngineSchemaTest { | ||
|
||
@Parameterized.Parameters | ||
public static Collection<DatabaseConfiguration> data() throws Exception { | ||
return DatabaseTestUtil.loadConfigurations("cockroach"); | ||
} | ||
|
||
@Override | ||
@Test | ||
@Ignore("CockroachDB doesn't support stored procedures; see https://github.com/cockroachdb/cockroach/issues/17511") | ||
public void udfGetOneTest() { | ||
} | ||
|
||
@Override | ||
@Test | ||
@Ignore("CockroachDB doesn't support stored procedures; see https://github.com/cockroachdb/cockroach/issues/17511") | ||
public void udfTimesTwoTest() { | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.