Skip to content

[#14002] improvement(test): Replace the scripted Trino stack with TrinoCluster (part 6/6) - #14012

Open
nevzheng wants to merge 8 commits into
apache:mainfrom
nevzheng:claude/13900-tc-08-trino-cluster
Open

nevzheng wants to merge 8 commits into
apache:mainfrom
nevzheng:claude/13900-tc-08-trino-cluster

Conversation

@nevzheng

@nevzheng nevzheng commented Oct 20, 2026 •

Copy link
Copy Markdown
Collaborator

What changes were proposed in this pull request?

  • TrinoCluster starts the Trino stack (its own Hive, MySQL and PostgreSQL, workers, coordinator) through Testcontainers instead of launch.sh and docker compose, from the same docker-script/init files. Readiness checks replace polling and a fixed sleep; Ryuk cleans up.
  • @TrinoFixture starts lazily and reads the Gravitino server port from the test (GravitinoServerAware, implemented by BaseIT).
  • TrinoQueryITBase (also used by the Trino test tool) builds the cluster directly; the web UI CatalogsPageTest classes use the fixture. CI logs still land in integration-test-common/build/trino-ci-container-log.

This PR includes the commits of the PRs below it. Review only its own commit: nevzheng/gravitino@claude/13900-tc-07-dependencies-hive-variants...claude/13900-tc-08-trino-cluster

Why are the changes needed?

The Trino stack was the last container setup outside the framework, started by shell scripts with polling and a fixed sleep (design doc, Trino cluster). Part 6 of 6 of #14002.

Fix: #14002

Does this PR introduce any user-facing change?

No. Test code only.

How was this patch tested?

Trino JUnit ITs and the Trino SQL test tool on Trino 478.

Stack: #14005 → #14006 → #14007 → #14008 → #14009 → #14010 → #14011 → #14012 → #14013 → #14052 → #14076 → #14077 → #14078 → #14079

Design doc for apache#13900 and a rumdl config for design-docs/testing.
…e ContainerSuite lifecycle

- Log every container start with pull, start and readiness times; add test
  log4j configs so the lines show.
- Reset all ContainerSuite state in close(); key Hive by version; make the
  PostgreSQL retry wait; pin StarRocks; drop a dead start method.
- Poll readiness with no initial delay; run cleanDisk() only on real starts.
- idp-basic starts its containers once per run; Ryuk back on, unprivileged.
- Drop the suite-wide closes in Hive2, Flink and Spark ITs.
…est containers (part 1/6)

ContainerSpec, ContainerExtension and @FixtureContainer: a test declares a
container with a fixture annotation and receives it as a parameter or field.
Fixtures for Kafka, LocalStack, RustFS, StarRocks, OceanBase and Doris, with
their callers migrated.
…o, Ranger and Hive (part 2/6)

- TestImages declares every test image in one place.
- BaseContainer subclasses can supply their own container (ready for the
  official Testcontainers modules).
- Moto, Ranger and Hive (version, auth) fixtures.
- A container whose start fails is closed instead of leaking.
…add ClickHouse fixtures and scope (part 3/6)

- client-java, fileset, Hudi, Iceberg, Paimon, Iceberg REST, GVFS, Flink,
  Spark and Trino env tests use @HiveFixture.
- ClickHouse (1 or 3 nodes) and ZooKeeper fixtures.
- scope = RUN | CLASS | METHOD; HadoopUserAuthenticationIT gets a private
  Kerberos Hive.
…and PostgreSQL fixtures (part 4/6)

- Review follow-ups from the first fixture changes.
- A fixture annotation on a field picks that field's container.
- startup = EAGER | LAZY; a warning for fixtures no test injects.
- MySQL and PostgreSQL fixtures; SparkQueryRunner starts Hive through its
  spec.
- Only the run's closer closes the container suite.
- Split container start time into pull, start and readiness; give the Hive
  metastore check a real time budget.
…remaining Hive variants (part 5/6)

- ContainerSpec.dependencies(): dependencies start first, deepest first,
  with a cycle check.
- ClickHouseCluster injected for the three-node cluster.
- Hive auth = RANGER and storage = S3 | GCS | ABS; the CatalogHive IT family
  and the Ranger ITs use them.
- HiveUserAuthenticationIT on the Kerberos Hive fixture.
…th TrinoCluster (part 6/6)

TrinoCluster starts the Trino stack through Testcontainers instead of
launch.sh and docker compose, with real readiness checks and Ryuk cleanup.
@TrinoFixture starts lazily and reads the Gravitino server port from the
test.
@nevzheng
nevzheng force-pushed the claude/13900-tc-08-trino-cluster branch from a5e735b to c704aae Compare October 21, 2026 07:09
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.

[Subtask] Add a JUnit fixture framework for test containers and move every caller to it

1 participant