Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
61 commits
Select commit Hold shift + click to select a range
c24e629
Initial plan
Copilot Dec 4, 2025
d68d658
Add DB2 integration tests with TestContainers support
Copilot Dec 4, 2025
41635c7
Fix DB2 test issues identified in code review
Copilot Dec 4, 2025
97cb01a
Improve DB2 connection providers to follow SQL Server pattern
Copilot Dec 4, 2025
2fecf8c
Clean up unused imports and fix thread safety in Db2TestContainer
Copilot Dec 4, 2025
cc1f76a
Initial plan
Copilot Dec 4, 2025
8b9b27b
Migrate Oracle tests to use TestContainers
Copilot Dec 4, 2025
80dc2a9
Fix compilation errors and complete Oracle TestContainers migration
Copilot Dec 4, 2025
0c09eac
Remove duplicate imports from Oracle test files
Copilot Dec 4, 2025
a440569
Address code review feedback
Copilot Dec 4, 2025
3362b56
Fix Oracle TestContainer initialization - remove withDatabaseName
Copilot Dec 4, 2025
bab1574
Fix OracleConnectionWithRecordCountsProvider to stream individual ints
Copilot Dec 5, 2025
b81be08
Fix parameter resolution error in Db2ConnectionWithRecordCountsProvider
Copilot Dec 5, 2025
e9b41c7
Increase timeout to start DB2 to 2h.
rrobetti Dec 5, 2025
ef5fe92
Merge pull request #165 from Open-J-Proxy/copilot/add-db2-integration…
rrobetti Dec 5, 2025
76e95c8
Merge branch 'main' into copilot/change-oracle-tests-to-containers
rrobetti Dec 5, 2025
cb25256
Initial plan
Copilot Dec 5, 2025
8e01405
Merge pull request #166 from Open-J-Proxy/copilot/change-oracle-tests…
rrobetti Dec 5, 2025
511b977
Make all badge images clickable LinkedIn certification links
Copilot Dec 5, 2025
60facbd
Add organizationId and update organizationName in LinkedIn links
Copilot Dec 5, 2025
f754732
Merge pull request #167 from Open-J-Proxy/copilot/update-badge-links-…
rrobetti Dec 5, 2025
7638d41
Enhance contributor recognition program details
rrobetti Dec 5, 2025
91dbaeb
Initial plan
Copilot Dec 5, 2025
0bbf7a1
Initial plan
Copilot Dec 5, 2025
ba020d7
Initial plan
Copilot Dec 5, 2025
df9dce5
Add MySQL TestContainer support and create dedicated workflow
Copilot Dec 5, 2025
4a04fc0
Add PostgreSQL TestContainers support and create postgres-testing wor…
Copilot Dec 5, 2025
338c9d6
Add MariaDB TestContainer support and update tests
Copilot Dec 5, 2025
0fd807b
Remove Postgres CSV files and fix compilation error
Copilot Dec 5, 2025
870697d
Fix missing import in MySQLSpecificFeaturesIntegrationTest
Copilot Dec 5, 2025
1a38ec5
Fix inverted flag logic in Postgres test files
Copilot Dec 5, 2025
2147792
Fix test compilation issues
Copilot Dec 5, 2025
1ba8e36
Remove CSV file and fix code review issues
Copilot Dec 5, 2025
a20056b
Improve comment explaining TestContainers usage for Postgres tests
Copilot Dec 5, 2025
faa49a9
Add missing @EnabledIf annotations to Postgres test classes
Copilot Dec 5, 2025
4437e27
Merge pull request #168 from Open-J-Proxy/copilot/refactor-postgres-i…
rrobetti Dec 5, 2025
666c678
Merge branch 'main' into copilot/update-mysql-tests-workflow
rrobetti Dec 5, 2025
e5ecd2f
Fix MySQL test flag in BasicCrudIntegrationTest and BlobIntegrationTest
Copilot Dec 5, 2025
edd181f
Merge pull request #169 from Open-J-Proxy/copilot/update-mysql-tests-…
rrobetti Dec 5, 2025
1fb8c59
Initial plan
Copilot Dec 5, 2025
f1338d7
Migrate CockroachDB tests to TestContainers and change to enableCockr…
Copilot Dec 5, 2025
0e46e97
Add MariaDB documentation and update flag references
Copilot Dec 5, 2025
a6f9322
Fix missing import in CockroachDBDatabaseMetaDataExtensiveTests
Copilot Dec 5, 2025
5f92346
Merge main and resolve conflicts - duplicate MySQL/MariaDB tests
Copilot Dec 5, 2025
9d06159
Update workflows and documentation for MySQL/MariaDB separation
Copilot Dec 5, 2025
f86e551
Fix MariaDB workflow failures by removing hardcoded MariaDB URLs from…
Copilot Dec 6, 2025
13eae5a
Add @EnabledIf to MariaDB-specific test methods to fix main CI
Copilot Dec 6, 2025
08fa923
Reduce blob size in MariaDB large BLOB test to fix gRPC limit error
Copilot Dec 6, 2025
7acf1b5
Reduce MariaDB large BLOB test size to 1MB to fix socket errors
Copilot Dec 6, 2025
2fbd556
Use largeTextFile.txt resource in MariaDB blob test instead of byte a…
Copilot Dec 7, 2025
7c4c423
Consolidate MariaDB documentation and clean up CockroachDB guide
Copilot Dec 7, 2025
6dc295d
Merge pull request #170 from Open-J-Proxy/copilot/migrate-mariadb-tes…
rrobetti Dec 7, 2025
755ab98
Merge main branch and resolve conflicts with MariaDB changes
Copilot Dec 7, 2025
2ba06e5
Merge branch 'main' into copilot/update-cockroachdb-tests-workflow
rrobetti Dec 7, 2025
d64eefb
Merge pull request #171 from Open-J-Proxy/copilot/update-cockroachdb-…
rrobetti Dec 7, 2025
3ad74f3
Initial plan
Copilot Dec 7, 2025
b863c17
Add enableH2Tests flag and restructure CI workflows for fail-fast app…
Copilot Dec 7, 2025
f29d14d
Add CI/CD workflow documentation link to README
Copilot Dec 7, 2025
dc69d8e
Fix code review issues: remove unreachable code and use consistent As…
Copilot Dec 7, 2025
6dfb776
Fix URL pattern consistency: use h2: instead of _h2: and lowercase al…
Copilot Dec 7, 2025
a929d33
Merge branch 'main' into copilot/add-h2-tests-flag
rrobetti Dec 7, 2025
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
82 changes: 82 additions & 0 deletions .github/workflows/cockroachdb-testing.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,82 @@
# This workflow runs only CockroachDB integration tests using TestContainers.
# It disables all other database integration tests to focus on CockroachDB testing.
# TestContainers automatically manages the CockroachDB container lifecycle.
# This workflow only runs after the Main CI workflow succeeds.
name: CockroachDB Integration Tests

on:
workflow_run:
workflows: ["Main CI"]
types:
- completed
branches: [ main ]
pull_request:
branches: [ main ]
workflow_dispatch: # Allow manual triggering

jobs:
cockroachdb-tests:
name: CockroachDB Integration Tests
runs-on: ubuntu-latest
if: ${{ github.event_name == 'workflow_dispatch' || github.event_name == 'pull_request' || (github.event_name == 'workflow_run' && github.event.workflow_run.conclusion == 'success') }}

permissions:
contents: read

strategy:
fail-fast: false
matrix:
java-version: [ 11, 17, 21, 22 ]

steps:
- name: Git checkout
uses: actions/checkout@v4
with:
fetch-depth: 0

- name: Set up JDK 22 for build
uses: actions/setup-java@v4
with:
java-version: 22
distribution: 'temurin'
cache: maven

- name: Build and Install (ojp-grpc-commons) with JDK 22
run: mvn clean install -pl ojp-grpc-commons -am -DskipTests -Dgpg.skip=true

- name: Test (ojp-grpc-commons) with JDK 22
run: mvn test -pl ojp-grpc-commons -Dgpg.skip=true

- name: Build (ojp-server) with JDK 22
run: mvn clean install -pl ojp-server -am -DskipTests -Dgpg.skip=true

- name: Test and Run (ojp-server)
run: |
nohup java -jar ojp-server/target/ojp-server-0.2.1-snapshot-shaded.jar > /tmp/ojp-server.log 2>&1 &
echo $! > /tmp/ojp-server.pid

- name: Wait for ojp-server to start
run: sleep 10

- name: Set up JDK ${{ matrix.java-version }} for ojp-jdbc-driver
uses: actions/setup-java@v4
with:
java-version: ${{ matrix.java-version }}
distribution: 'temurin'
cache: maven

- name: Build (ojp-jdbc-driver) with JDK ${{ matrix.java-version }}
run: mvn clean install -pl ojp-jdbc-driver -am -DskipTests -Dgpg.skip=true

- name: Run CockroachDB Integration Tests
run: |
mvn test -pl ojp-jdbc-driver -Dgpg.skip=true \
-DenableCockroachDBTests=true \
-DdisablePostgresTests=true \
-DdisableMySQLTests=true \
-DdisableMariaDBTests=true \
-Dtest="CockroachDB*"

- name: Show ojp-server.log
if: always() # ensures it runs even if previous steps fail
run: cat /tmp/ojp-server.log || echo "/tmp/ojp-server.log not found"
102 changes: 102 additions & 0 deletions .github/workflows/db2-testing.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,102 @@
# This workflow runs only DB2 integration tests using TestContainers.
# It disables all other database integration tests to focus on DB2 testing.
# TestContainers automatically manages the DB2 container lifecycle.
# This workflow only runs after the Main CI workflow succeeds.
name: DB2 Integration Tests

on:
workflow_run:
workflows: ["Main CI"]
types:
- completed
branches: [ main ]
pull_request:
branches: [ main ]
workflow_dispatch: # Allow manual triggering

jobs:
db2-tests:
name: DB2 Integration Tests
runs-on: ubuntu-latest
if: ${{ github.event_name == 'workflow_dispatch' || github.event_name == 'pull_request' || (github.event_name == 'workflow_run' && github.event.workflow_run.conclusion == 'success') }}

permissions:
contents: read

strategy:
fail-fast: false
matrix:
java-version: [ 11, 17, 21, 22 ]

steps:
- name: Git checkout
uses: actions/checkout@v4
with:
fetch-depth: 0

- name: Add DB2 JDBC Driver to ojp-server
run: |
# Create temporary file with DB2 JDBC dependency
cat > /tmp/db2-dep.txt << 'EOF'
<!-- DB2 JDBC Driver (added by CI) -->
<dependency>
<groupId>com.ibm.db2</groupId>
<artifactId>jcc</artifactId>
<version>11.5.9.0</version>
</dependency>
EOF

# Insert after the placeholder comment
sed -i '/<!-- PROPRIETARY DATABASE DRIVERS PLACEHOLDER -->/r /tmp/db2-dep.txt' ojp-server/pom.xml

# Verify the insertion
echo "=== Modified ojp-server/pom.xml dependencies section ==="
sed -n '/PROPRIETARY DATABASE DRIVERS PLACEHOLDER/,/HikariCP/p' ojp-server/pom.xml

- name: Set up JDK 22 for build
uses: actions/setup-java@v4
with:
java-version: 22
distribution: 'temurin'
cache: maven

- name: Build and Install (ojp-grpc-commons) with JDK 22
run: mvn clean install -pl ojp-grpc-commons -am -DskipTests -Dgpg.skip=true

- name: Test (ojp-grpc-commons) with JDK 22
run: mvn test -pl ojp-grpc-commons -Dgpg.skip=true

- name: Build (ojp-server) with JDK 22
run: mvn clean install -pl ojp-server -am -DskipTests -Dgpg.skip=true

- name: Test and Run (ojp-server)
run: |
nohup java -jar ojp-server/target/ojp-server-0.2.1-snapshot-shaded.jar > /tmp/ojp-server.log 2>&1 &
echo $! > /tmp/ojp-server.pid

- name: Wait for ojp-server to start
run: sleep 10

- name: Set up JDK ${{ matrix.java-version }} for ojp-jdbc-driver
uses: actions/setup-java@v4
with:
java-version: ${{ matrix.java-version }}
distribution: 'temurin'
cache: maven

- name: Build (ojp-jdbc-driver) with JDK ${{ matrix.java-version }}
run: mvn clean install -pl ojp-jdbc-driver -am -DskipTests -Dgpg.skip=true

- name: Run DB2 Integration Tests
run: |
mvn test -pl ojp-jdbc-driver -Dgpg.skip=true \
-DenableDb2Tests=true \
-DdisablePostgresTests=true \
-DdisableMySQLTests=true \
-DenableMariaDBTests=false \
-DenableCockroachDBTests=false \
-Dtest="Db2*"

- name: Show ojp-server.log
if: always() # ensures it runs even if previous steps fail
run: cat /tmp/ojp-server.log || echo "/tmp/ojp-server.log not found"
42 changes: 3 additions & 39 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
# This workflow builds and tests the project on pushes and pull requests to the main branch.
# It uses a Postgres service for integration tests and skips the CI if the commit message contains '[skip ci]'.
# It uses services for MySQL and MariaDB integration tests.
# PostgreSQL, Oracle, SQL Server, DB2, and CockroachDB tests are run in separate workflows using TestContainers.
# The workflow result is reported in the Actions tab of the repository.
name: Main CI

Expand Down Expand Up @@ -36,21 +37,6 @@ jobs:
ports:
- 3307:3306

mysql:
image: mysql:8.0
env:
MYSQL_DATABASE: defaultdb
MYSQL_USER: testuser
MYSQL_PASSWORD: testpassword
MYSQL_ROOT_PASSWORD: rootpassword
options: >-
--health-cmd "mysqladmin ping"
--health-interval=10s
--health-timeout=5s
--health-retries=5
ports:
- 3306:3306

#TODO maybe put proprietary DBs in separated workflows, seem to be insufficient memory in github to run all at once
#oracle:
# image: gvenzl/oracle-xe:21-slim
Expand Down Expand Up @@ -114,28 +100,6 @@ jobs:
with:
fetch-depth: 0

- name: Start CockroachDB
run: |
docker run --name ojp-cockroachdb -p 26257:26257 -p 8080:8080 -d cockroachdb/cockroach:v24.3.4 start-single-node --insecure
# Wait for CockroachDB to be ready
timeout 60 bash -c 'until curl -f http://localhost:8080/health?ready=1 2>/dev/null; do sleep 2; done'

- name: Start Postgres
run: |
docker run --name ojp-postgres \
-e POSTGRES_USER=testuser \
-e POSTGRES_PASSWORD=testpassword \
-e POSTGRES_DB=defaultdb \
-p 5432:5432 \
-d postgres:17 \
-c max_prepared_transactions=100

# Wait for Postgres to become ready (up to 60s)
timeout 60 bash -c 'until docker exec ojp-postgres pg_isready -U testuser -d defaultdb -h 127.0.0.1; do sleep 2; done'

# Verify setting (should print 100)
PGPASSWORD=testpassword psql -h 127.0.0.1 -U testuser -d defaultdb -c "SHOW max_prepared_transactions;"

- name: Set up JDK 22 for build
uses: actions/setup-java@v4
with:
Expand Down Expand Up @@ -171,7 +135,7 @@ jobs:
run: mvn clean install -pl ojp-jdbc-driver -am -DskipTests -Dgpg.skip=true

- name: Test (ojp-jdbc-driver)
run: mvn test -pl ojp-jdbc-driver -Dgpg.skip=true
run: mvn test -pl ojp-jdbc-driver -Dgpg.skip=true -DenableH2Tests=true -DenableMySQLTests=false -DenablePostgresTests=false -DenableCockroachDBTests=false

- name: Show ojp-server.log
if: always() # ensures it runs even if previous steps fail
Expand Down
82 changes: 82 additions & 0 deletions .github/workflows/mariadb-testing.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,82 @@
# This workflow runs only MariaDB integration tests using TestContainers.
# It disables all other database integration tests to focus on MariaDB testing.
# TestContainers automatically manages the MariaDB container lifecycle.
# This workflow only runs after the Main CI workflow succeeds.
name: MariaDB Integration Tests

on:
workflow_run:
workflows: ["Main CI"]
types:
- completed
branches: [ main ]
pull_request:
branches: [ main ]
workflow_dispatch: # Allow manual triggering

jobs:
mariadb-tests:
name: MariaDB Integration Tests
runs-on: ubuntu-latest
if: ${{ github.event_name == 'workflow_dispatch' || github.event_name == 'pull_request' || (github.event_name == 'workflow_run' && github.event.workflow_run.conclusion == 'success') }}

permissions:
contents: read

strategy:
fail-fast: false
matrix:
java-version: [ 11, 17, 21, 22 ]

steps:
- name: Git checkout
uses: actions/checkout@v4
with:
fetch-depth: 0

- name: Set up JDK 22 for build
uses: actions/setup-java@v4
with:
java-version: 22
distribution: 'temurin'
cache: maven

- name: Build and Install (ojp-grpc-commons) with JDK 22
run: mvn clean install -pl ojp-grpc-commons -am -DskipTests -Dgpg.skip=true

- name: Test (ojp-grpc-commons) with JDK 22
run: mvn test -pl ojp-grpc-commons -Dgpg.skip=true

- name: Build (ojp-server) with JDK 22
run: mvn clean install -pl ojp-server -am -DskipTests -Dgpg.skip=true

- name: Test and Run (ojp-server)
run: |
nohup java -jar ojp-server/target/ojp-server-0.2.1-snapshot-shaded.jar > /tmp/ojp-server.log 2>&1 &
echo $! > /tmp/ojp-server.pid

- name: Wait for ojp-server to start
run: sleep 10

- name: Set up JDK ${{ matrix.java-version }} for ojp-jdbc-driver
uses: actions/setup-java@v4
with:
java-version: ${{ matrix.java-version }}
distribution: 'temurin'
cache: maven

- name: Build (ojp-jdbc-driver) with JDK ${{ matrix.java-version }}
run: mvn clean install -pl ojp-jdbc-driver -am -DskipTests -Dgpg.skip=true

- name: Run MariaDB Integration Tests
run: |
mvn test -pl ojp-jdbc-driver -Dgpg.skip=true \
-DenableMariaDBTests=true \
-DenablePostgresTests=false \
-DenableMySQLTests=false \
-DdisableCockroachDBTests=true \
-Dtest="MariaDB*,Blob*,BasicCrud*"

- name: Show ojp-server.log
if: always() # ensures it runs even if previous steps fail
run: cat /tmp/ojp-server.log || echo "/tmp/ojp-server.log not found"
7 changes: 6 additions & 1 deletion .github/workflows/multinode-integration.yml
Original file line number Diff line number Diff line change
@@ -1,10 +1,14 @@
# This workflow tests multinode functionality with two OJP server instances
# It starts a Postgres database and two OJP servers on different ports,
# then runs integration tests for multinode scenarios including failover and recovery.
# This workflow only runs after the Main CI workflow succeeds.
name: Multinode Integration Tests

on:
push:
workflow_run:
workflows: ["Main CI"]
types:
- completed
branches: [ main ]
pull_request:
branches: [ main ]
Expand All @@ -13,6 +17,7 @@ jobs:
multinode-test:
name: Multinode Integration Test
runs-on: ubuntu-latest
if: ${{ github.event_name == 'pull_request' || (github.event_name == 'workflow_run' && github.event.workflow_run.conclusion == 'success') }}

steps:
- name: Git checkout
Expand Down
Loading