Skip to content

Run JDBC tests in Testcontainers (MVP)#91

Open
ostinru wants to merge 4 commits intoapache:mainfrom
ostinru:jdbc-testcontainers-minimal
Open

Run JDBC tests in Testcontainers (MVP)#91
ostinru wants to merge 4 commits intoapache:mainfrom
ostinru:jdbc-testcontainers-minimal

Conversation

@ostinru
Copy link
Copy Markdown
Collaborator

@ostinru ostinru commented Apr 1, 2026

Add testcontainers-bassed automation tests

For new tests I used testcontainers. This is a shift in the way we running automation tests:

  • new tests run on host machine (you can run tests from your IDE)
    +----------------------------------------------------------------+
    |                              Host                              |
    |  +-------------------------------+  +-----------------------+  |
    |  |           Docker              |  |        Docker         |  |
    |  |   [Cloudberry] --> [PXF] ------------>  [Database]       |  |
    |  |                               |  |                       |  |
    |  +-------------------------------+  +-----------------------+  |
    |                                                                |
    |                         [Automation]                           |
    +----------------------------------------------------------------+
    
  • new test framework manages Docker containers on its own:
    • it will start only required containers
    • all test-specific code is located near test (not in a single bash-file)
    • it opens a way to run highly custom containers (kerberos tests?)
  • No jSystemCore. This framework have not active development for couple years. New classes uses same TestObject pattern, but have no direct dependency on jSystemCore.

Containers

New framework uses shrinked version of pxf-cbdb-dev:

  • no hadoop ecosystem in the same container
  • no more file permission issues - we copy files to container instead of mapping (binding) them in RW mode
  • faster cloudberry + PXF builds:
    • no pxf-cli - it is unused
    • gradle is baked into docker image - no downloads during container run
    • map system-wide gradle cache to container as RO cache

@ostinru ostinru marked this pull request as ready for review April 1, 2026 08:39
@ostinru
Copy link
Copy Markdown
Collaborator Author

ostinru commented Apr 1, 2026

This is minimal version of #84 (which is stuck on issues with ClickHouse). Difference:

  1. No Clickhouse tests (they are broken)
  2. Add Rocky Linux 9 support

${CLOUDBERRY_REPO} /home/gpadmin/workspace/cloudberry

# Copy and run the build script (demo cluster is created at runtime)
COPY script/build_cloudberrry.sh /tmp/build_cloudberrry.sh
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

file name build_cloudberrry.sh ? rrr?

matrix:
include:
- tc_group: pxf-jdbc
use_fdw: "false"
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

why no test_mode?

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I was removing test_mode as duplicate for use_fdw. And lost 2 entries below.

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