Implement H2-first CI strategy with workflow dependencies#173
Closed
Copilot wants to merge 61 commits into
Closed
Conversation
- Created Db2TestContainer.java utility class for singleton DB2 container management - Created Db2ConnectionProvider.java for parameterized test arguments - Added DB2 JDBC driver (com.ibm.db2:jcc:11.5.9.0) and TestContainers DB2 dependencies to ojp-jdbc-driver/pom.xml with test scope - Added @EnabledIf annotation to all 11 DB2 test classes to prevent test discovery when disabled - Updated all DB2 test classes to use Db2ConnectionProvider instead of CsvFileSource - Updated flag logic to use isTestDisabled (consistent with SQL Server tests) - Created new workflow file .github/workflows/db2-testing.yml for DB2 integration tests Co-authored-by: rrobetti <7221783+rrobetti@users.noreply.github.com>
- Created Db2ConnectionWithRecordCountsProvider for tests with record count parameters - Updated Db2ReadMultipleBlocksOfDataIntegrationTest to use correct provider - Fixed import grouping in Db2PreparedStatementExtensiveTests - All 100 test source files now compile successfully Co-authored-by: rrobetti <7221783+rrobetti@users.noreply.github.com>
- Updated Db2ConnectionProvider with more robust URL construction - Updated Db2ConnectionWithRecordCountsProvider with same improvements - Added support for ojp.proxy.host and ojp.proxy.port system properties - Improved JDBC URL prefix handling for better safety - Ensured getInstance() is called to initialize container before use Co-authored-by: rrobetti <7221783+rrobetti@users.noreply.github.com>
- Removed unused CsvFileSource imports from all DB2 test classes - Made shutdownHookRegistered volatile for thread safety - Added double-checked locking for shutdown hook registration - Enhanced JavaDoc to document singleton pattern and thread safety - All code review issues resolved Co-authored-by: rrobetti <7221783+rrobetti@users.noreply.github.com>
- Add oracle-xe TestContainers dependency to pom.xml - Create OracleTestContainer singleton class with XA permissions - Create OracleConnectionProvider for parameterized tests - Update all Oracle test files to use ArgumentsProvider - Update oracle-testing.yml to remove services section - Tests now use TestContainers for Oracle database lifecycle Co-authored-by: rrobetti <7221783+rrobetti@users.noreply.github.com>
- Add missing EnabledIf imports to all Oracle test files - Create OracleConnectionWithRecordCountsProvider for special tests - Update OracleReadMultipleBlocksOfDataIntegrationTest - Remove oracle_connections.csv and oracle_xa_connection.csv files - Build successful with no compilation errors Co-authored-by: rrobetti <7221783+rrobetti@users.noreply.github.com>
- Fix XA permissions script execution in OracleTestContainer - Add proper logging using slf4j instead of System.err - Improve SQL script construction with StringBuilder - Fix comment in OracleConnectionProvider to match implementation - Use proper bash command structure for execInContainer Co-authored-by: rrobetti <7221783+rrobetti@users.noreply.github.com>
The OracleContainer from TestContainers doesn't support setting a custom database name. The database name is determined by the Oracle XE image and cannot be overridden. Removing withDatabaseName() call to use default configuration. Fixes: IllegalArgumentException: Database name cannot be set to xepdb1 Co-authored-by: rrobetti <7221783+rrobetti@users.noreply.github.com>
Changed from Stream.of(RECORD_COUNTS) to Arrays.stream(RECORD_COUNTS) to properly iterate over individual integers instead of streaming the array itself. Also changed .map() to .mapToObj() for proper conversion. Fixes: ParameterResolutionException - No built-in converter for source type int[] and target type int Co-authored-by: rrobetti <7221783+rrobetti@users.noreply.github.com>
Changed Stream.of(RECORD_COUNTS) to Arrays.stream(RECORD_COUNTS).mapToObj() to properly iterate over individual int values instead of treating the entire array as a single element. This fixes the ParameterResolutionException when JUnit tries to convert int[] to int. Fixes: multiplePagesOfRowsResultSetSuccessful test failure Co-authored-by: rrobetti <7221783+rrobetti@users.noreply.github.com>
…-tests Add DB2 integration tests with TestContainers support
…-to-containers Migrate Oracle integration tests to TestContainers
Co-authored-by: rrobetti <7221783+rrobetti@users.noreply.github.com>
Co-authored-by: rrobetti <7221783+rrobetti@users.noreply.github.com>
…for-linkedin Add LinkedIn certification links to all contributor badge images
Added information about sharing badges on LinkedIn.
- Added MySQL JDBC driver and TestContainers MySQL dependencies to pom.xml - Created MySQLTestContainer.java singleton container manager - Created MySQLConnectionProvider.java ArgumentsProvider for parameterized tests - Updated 6 MySQL test classes to use TestContainers with @EnabledIf and @ArgumentsSource - Changed from disableMySQLTests to enableMySQLTests flag (default false) - Removed obsolete mysql_mariadb_connection.csv file - Created new mysql-testing.yml workflow for MySQL-specific tests - Updated main.yml to remove MySQL service and explicitly disable MySQL tests Co-authored-by: rrobetti <7221783+rrobetti@users.noreply.github.com>
…kflow Co-authored-by: rrobetti <7221783+rrobetti@users.noreply.github.com>
Co-authored-by: rrobetti <7221783+rrobetti@users.noreply.github.com>
Co-authored-by: rrobetti <7221783+rrobetti@users.noreply.github.com>
- Added missing MySQLConnectionProvider import Co-authored-by: rrobetti <7221783+rrobetti@users.noreply.github.com>
…oachDBTests flag Co-authored-by: rrobetti <7221783+rrobetti@users.noreply.github.com>
- Created mariadb-testing-guide.md with TestContainer setup instructions - Created MARIADB_TESTCONTAINER_GUIDE.md for migration details - Updated all documentation to use enableMariaDBTests instead of disableMariaDBTests - Added MariaDB setup section to setup_and_testing_ojp_source.md - Updated test options documentation with all enable/disable flags Co-authored-by: rrobetti <7221783+rrobetti@users.noreply.github.com>
Co-authored-by: rrobetti <7221783+rrobetti@users.noreply.github.com>
- Accept MySQL test versions from main branch (using MySQLTestContainer and enableMySQLTests flag) - Create MariaDB-specific duplicates of 6 shared test classes - Update MariaDB tests to use MariaDBConnectionProvider and enableMariaDBTests flag - Resolve BasicCrudIntegrationTest and BlobIntegrationTest to support both MySQL and MariaDB flags - Accept main.yml from main branch (includes both mysql and postgres workflows) - MariaDB tests now have 5 parameters (with isXA), MySQL tests have 4 parameters
Co-authored-by: rrobetti <7221783+rrobetti@users.noreply.github.com>
… CSV files - Removed MariaDB entries from h2_postgres_mysql_mariadb_oracle_sqlserver_connections.csv (port 3307 no longer valid with TestContainers) - Removed MariaDB entries from h2_mysql_mariadb_oracle_connections.csv - Added MariaDB-specific test methods to BasicCrudIntegrationTest using MariaDBConnectionProvider - Added MariaDB-specific test methods to BlobIntegrationTest using MariaDBConnectionProvider - MariaDB tests now exclusively use TestContainers with dynamic ports instead of hardcoded localhost:3307 Co-authored-by: rrobetti <7221783+rrobetti@users.noreply.github.com>
- Added @EnabledIf("openjproxy.jdbc.testutil.MariaDBTestContainer#isEnabled") to crudTestSuccessfulMariaDB in BasicCrudIntegrationTest
- Added @EnabledIf to createAndReadingBLOBsSuccessfulMariaDB in BlobIntegrationTest
- Added @EnabledIf to creatingAndReadingLargeBLOBsSuccessfulMariaDB in BlobIntegrationTest
- These annotations prevent tests from running when enableMariaDBTests=false (default in main CI)
- Fixes "PreconditionViolation: Configuration error: You must configure at least one set of arguments" error
Co-authored-by: rrobetti <7221783+rrobetti@users.noreply.github.com>
- Reduced blob size from 5MB to 3MB in creatingAndReadingLargeBLOBsSuccessfulMariaDB test - gRPC message size limit is 4MB, the 5MB blob was exceeding this causing RESOURCE_EXHAUSTED error - 3MB provides safe margin below the 4MB limit while still testing large BLOB functionality Co-authored-by: rrobetti <7221783+rrobetti@users.noreply.github.com>
- Reduced blob size from 3MB to 1MB in creatingAndReadingLargeBLOBsSuccessfulMariaDB test - 3MB was causing socket errors/timeouts during data transfer through OJP proxy - 1MB is more conservative and reliable while still testing large BLOB functionality - Original CSV-based test uses 18KB file, so 1MB is still significantly larger for testing Co-authored-by: rrobetti <7221783+rrobetti@users.noreply.github.com>
…rray - Changed creatingAndReadingLargeBLOBsSuccessfulMariaDB to use largeTextFile.txt resource (17KB) instead of creating large in-memory byte arrays - Matches the approach used in the original CSV-based test - Fixes "Broken pipe" socket errors caused by large in-memory blob transfers - 17KB file transfers reliably through OJP proxy without connection issues Co-authored-by: rrobetti <7221783+rrobetti@users.noreply.github.com>
- Merged MARIADB_TESTCONTAINER_GUIDE.md into mariadb-testing-guide.md - Added technical details, dependencies, and migration information to mariadb-testing-guide.md - Removed standalone MARIADB_TESTCONTAINER_GUIDE.md file - Removed unnecessary paragraph from cockroachdb-testing-guide.md about MariaDB tests being disabled by default - All MariaDB documentation now in single comprehensive guide Co-authored-by: rrobetti <7221783+rrobetti@users.noreply.github.com>
…ts-to-containers Migrate MariaDB integration tests to TestContainers and resolve MySQL/MariaDB test separation
Co-authored-by: rrobetti <7221783+rrobetti@users.noreply.github.com>
…tests-workflow Migrate CockroachDB tests to TestContainers and invert flag to enableCockroachDBTests
…roach Co-authored-by: rrobetti <7221783+rrobetti@users.noreply.github.com>
Co-authored-by: rrobetti <7221783+rrobetti@users.noreply.github.com>
…sumptions pattern Co-authored-by: rrobetti <7221783+rrobetti@users.noreply.github.com>
…l URL checks Co-authored-by: rrobetti <7221783+rrobetti@users.noreply.github.com>
Copilot
AI
changed the title
[WIP] Add enableH2Tests flag for Main CI workflow
Implement H2-first CI strategy with workflow dependencies
Dec 7, 2025
Contributor
|
Something is wrong with this PR, too many changes showing up in the diff. |
This file contains hidden or 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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Restructure CI/CD to run H2 tests as a fast quality gate before expensive multi-database tests. Saves cycles by catching fundamental issues early without spinning up containers.
Changes
New test flag:
enableH2Teststrue) to 13 test filesenablePostgresTests,enableMySQLTests, etc.)url.toLowerCase().contains("h2:")Main CI: H2-only execution
-DenableH2Tests=true -DenablePostgresTests=false -DenableMySQLTests=falseDatabase workflows: Gated on Main CI success
workflow_runtrigger to 8 database-specific workflows (MySQL, Postgres, MariaDB, Oracle, SQL Server, DB2, CockroachDB, Multinode)workflow_dispatchstill availableDocumentation
documents/ci-cd-workflow-structure.mdexplaining workflow execution order and rationaledocuments/code-contributions/setup_and_testing_ojp_source.mdwith new flagImpact
H2 catches compilation errors, JDBC contract violations, and major bugs before TestContainers spin up. Database tests run in parallel only when base functionality is confirmed working.
Original prompt
✨ Let Copilot coding agent set things up for you — coding agent works faster and does higher quality work when set up for your repo.