Skip to content

Migrate CockroachDB tests to TestContainers and invert flag to enableCockroachDBTests#171

Merged
rrobetti merged 5 commits into
mainfrom
copilot/update-cockroachdb-tests-workflow
Dec 7, 2025
Merged

Migrate CockroachDB tests to TestContainers and invert flag to enableCockroachDBTests#171
rrobetti merged 5 commits into
mainfrom
copilot/update-cockroachdb-tests-workflow

Conversation

Copy link
Copy Markdown
Contributor

Copilot AI commented Dec 5, 2025

Migrate CockroachDB Integration Tests to TestContainers

Branch merged with latest main

Successfully merged latest main branch (commit 6dc295d) and resolved all conflicts with MariaDB PR #170 changes.

Completed:

  • Add CockroachDB TestContainers dependency (using existing PostgreSQL TestContainers)
  • Create CockroachDBTestContainer.java singleton class with automatic container lifecycle management
  • Create CockroachDBConnectionProvider.java ArgumentsProvider for parameterized tests
  • Create CockroachDBConnectionWithRecordCountsProvider.java for performance tests with various record counts
  • Update all 11 CockroachDB test files to use @ArgumentsSource instead of @CsvFileSource
  • Change flag from disableCockroachDBTests to enableCockroachDBTests (default false) in all test files
  • Remove cockroachdb_connection.csv file (no longer needed)
  • Create new cockroachdb-testing.yml workflow for CockroachDB-specific tests
  • Update main.yml workflow to remove CockroachDB service and add -DenableCockroachDBTests=false flag
  • Update all other database workflow files to use -DenableCockroachDBTests=false
  • Update cockroachdb-testing-guide.md documentation to reflect enableCockroachDBTests flag
  • Update setup_and_testing_ojp_source.md documentation
  • Fix compilation errors (missing imports)
  • Merge main branch and resolve conflicts (MariaDB flag format aligned)

Conflicts Resolved (via merge):

  • Workflow files: Merged both MariaDB (enableMariaDBTests=false) and CockroachDB (enableCockroachDBTests=false) flag formats
  • Documentation: Combined MariaDB TestContainers information with CockroachDB changes
  • BasicCrudIntegrationTest.java: Kept MariaDB variable name (isMariaDBTestEnabled) and added CockroachDB enablement check

New files from main (MariaDB PR #170):

  • MariaDB TestContainers implementation and tests
  • MariaDB workflow and documentation
  • Updated pom.xml with MariaDB dependencies
Original prompt

Use this PR #166 as a model and change all CockroachDB integration tests to use test containers. Also change CockroachDB tests to run in their own workflow. Also change the flag that controls if CockroachDB tests run form disableCockroachDBTests to enableCockroachDBTests (make sure all documentation is updated) with default false and only enabled in the new specific CockroachDB workflow.


💬 We'd love your input! Share your thoughts on Copilot coding agent in our 2 minute survey.

Copilot AI and others added 2 commits December 5, 2025 16:41
…oachDBTests flag

Co-authored-by: rrobetti <7221783+rrobetti@users.noreply.github.com>
Co-authored-by: rrobetti <7221783+rrobetti@users.noreply.github.com>
@rrobetti
Copy link
Copy Markdown
Contributor

rrobetti commented Dec 5, 2025

@copilot update all documents that refers or relies on the flag changed from disableCockroachDBTests to enableCockroachDBTests

Copilot AI changed the title [WIP] Update CockroachDB integration tests to use test containers Migrate CockroachDB tests to TestContainers and invert flag to enableCockroachDBTests Dec 5, 2025
Copilot AI requested a review from rrobetti December 5, 2025 16:51
Copy link
Copy Markdown
Contributor Author

Copilot AI commented Dec 5, 2025

@copilot update all documents that refers or relies on the flag changed from disableCockroachDBTests to enableCockroachDBTests

All documents have been updated. The comprehensive search confirms:

  • 0 remaining references to disableCockroachDBTests
  • enableCockroachDBTests properly documented in:
    • cockroachdb-testing-guide.md (5 references with usage examples)
    • setup_and_testing_ojp_source.md (2 references with flag explanation)

The changes were included in commits f1338d7 and a6f9322.

@rrobetti
Copy link
Copy Markdown
Contributor

rrobetti commented Dec 7, 2025

@copilot there are new changes in the main branch, rebase your branch and resolve conflicts.

Copy link
Copy Markdown
Contributor Author

Copilot AI commented Dec 7, 2025

@copilot there are new changes in the main branch, rebase your branch and resolve conflicts.

Branch has been successfully rebased on main (commit 6dc295d). All conflicts with PR #170 (MariaDB changes) have been resolved:

Conflicts resolved:

  • Workflow files: Aligned both MariaDB and CockroachDB flag formats
  • Documentation: Merged MariaDB and CockroachDB TestContainers information
  • BasicCrudIntegrationTest.java: Integrated MariaDB variable naming with CockroachDB changes

Verification:

  • ✅ Build succeeds
  • ✅ CockroachDB tests properly skipped by default

The branch is ready but requires force push to update the PR. The rebased commits are: 042dbaa (Initial plan), 60ec505 (main migration), 59ad8b8 (import fix).

@rrobetti
Copy link
Copy Markdown
Contributor

rrobetti commented Dec 7, 2025

@copilot there are new changes in the main branch, rebase your branch and resolve conflicts.

Branch has been successfully rebased on main (commit 6dc295d). All conflicts with PR #170 (MariaDB changes) have been resolved:

Conflicts resolved:

  • Workflow files: Aligned both MariaDB and CockroachDB flag formats
  • Documentation: Merged MariaDB and CockroachDB TestContainers information
  • BasicCrudIntegrationTest.java: Integrated MariaDB variable naming with CockroachDB changes

Verification:

  • ✅ Build succeeds
  • ✅ CockroachDB tests properly skipped by default

The branch is ready but requires force push to update the PR. The rebased commits are: 042dbaa (Initial plan), 60ec505 (main migration), 59ad8b8 (import fix).

@copilot no it should not require force push, just take the changes from main and redo your changes where needed, no force push.

Co-authored-by: rrobetti <7221783+rrobetti@users.noreply.github.com>
Copy link
Copy Markdown
Contributor Author

Copilot AI commented Dec 7, 2025

@copilot there are new changes in the main branch, rebase your branch and resolve conflicts.

Branch has been successfully rebased on main (commit [6dc295d](https://github.com/Open-J-Proxy/o...

Branch merged with latest main without force push (commit 755ab98). All conflicts resolved:

Changes merged from main:

  • MariaDB TestContainers implementation and tests
  • MariaDB workflow and documentation
  • Updated flag formats

Conflict resolution:

  • Workflow files: Both MariaDB and CockroachDB use enable flags now
  • Documentation: Combined both database guides
  • BasicCrudIntegrationTest.java: Aligned with MariaDB variable naming

Verification:

  • ✅ Build succeeds
  • ✅ Tests properly skipped by default

@rrobetti rrobetti marked this pull request as ready for review December 7, 2025 20:25
@rrobetti rrobetti merged commit d64eefb into main Dec 7, 2025
34 checks passed
@rrobetti rrobetti deleted the copilot/update-cockroachdb-tests-workflow branch December 7, 2025 20:25
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants