[repo] Fix slow init/teardown in cloud tests #2852
Conversation
…wait on operation
|
Repository collaborators can run the JMH benchmark suite against this PR by commenting: Optional regression threshold override (Δ% on Time or Alloc/op; defaults to 10%): Only one benchmark run per PR is active at a time — issuing a new |
Client V2 CoverageCoverage Report
Class Coverage
|
JDBC V2 CoverageCoverage Report
Class Coverage
|
JDBC V1 CoverageCoverage Report
Class Coverage
|
Client V1 CoverageCoverage Report
Class Coverage
|
… is pickedup correctly in CI
There was a problem hiding this comment.
Pull request overview
Speeds up ClickHouse Cloud integration tests by avoiding repeated per-suite database create/drop operations (which can trigger slow distributed DDL waits) and by adjusting the JWT cloud test to use an explicit endpoint.
Changes:
- Add
TEST_DB_NAMEsupport to reuse a workflow-created database and skip suite-level create/drop on Cloud. - Update the GitHub Actions cloud test job to generate, create, and always clean up a unique temporary database.
- Update the JWT cloud test to build a client with an explicit host and settings.
Reviewed changes
Copilot reviewed 3 out of 3 changed files in this pull request and generated 4 comments.
| File | Description |
|---|---|
| client-v2/src/test/java/com/clickhouse/client/HttpTransportTests.java | Updates JWT cloud test client construction and endpoint selection via env var. |
| clickhouse-client/src/test/java/com/clickhouse/client/ClickHouseServerForTest.java | Adds env-driven database selection and skips Cloud create/drop when DB is externally managed; minor HTTP POST optimization. |
| .github/workflows/build.yml | Creates a per-run Cloud test DB, passes it via TEST_DB_NAME, and ensures cleanup always runs. |
|



Summary
Each test suite tries to create a database. Database name is shared among all tests suites in the project. When run on the cloud it significantly slows down test execution.
This PR adds two flags to avoid extra queries.
Server output when creating database:
Checklist
Delete items not relevant to your PR: