8000 test(inkless): speed up Postgres test setup and cluster test poll intervals by jeqo · Pull Request #924 · aiven/inkless · GitHub
[go: up one dir, main page]

Skip to content

test(inkless): speed up Postgres test setup and cluster test poll intervals - #924

Merged
gqmelo merged 2 commits into
mainfrom
jeqo/ci-tier2-test-infra
Dec 2, 2026
Merged

gqmelo merged 2 commits into
mainfrom
jeqo/ci-tier2-test-infra

Conversation

@jeqo
@jeqo jeqo commented Dec 1, 2026
Copy link
Copy Markdown
Contributor

Postgres-backed unit tests and the heaviest :core cluster tests spend most of their wall time waiting on repeated Flyway migrations and 5-second background poll intervals. Cloning a single pre-migrated template database per container preserves per-test database isolation without replaying DDL on every test method, and lowering remote log manager and consolidation cleanup poll intervals shortens tiering and WAL-pruning waits without changing test assertions.

Commits

  • test(inkless): clone a pre-migrated Postgres template database per test
  • test(inkless): lower RLM and consolidation poll intervals in cluster tests
    See the commit messages for the reasoning behind each step.

Test plan

  • BatchesPlanRegressionTest uses createEmptyDatabase to verify historical-version migration paths remain unmigrated before migrate(targetVersion).
  • InklessControlPlaneMigrationLockClusterTest verifies Flyway still acquires the advisory lock on restart against a template-cloned database.
  • PostgresControlPlaneTest, WriterPropertyTest, CommitFileJobTest, InklessConsolidatedDisklessReassignmentTest, and InklessConsolidatedDisklessTopicsTest.testCrossTierDeleteRecordsOnConsolidatedTopic verify control-plane behavior and shortened RLM/consolidation cycles.

@jeqo
jeqo added this pull request to stack #925 December 1, 2026 15:20
@jeqo
jeqo force-pushed the jeqo/ci-tier2-test-infra branch 3 times, most recently from 98411fe to e993d68 Compare December 1, 2026 16:18
Base automatically changed from jeqo/ci-tier1-optimizations to main December 2, 2026 14:39
jeqo added 2 commits December 2, 2026 15:39
Every Postgres-backed test method creates a blank database and runs the
full Flyway migration chain from scratch, spending ~1.2s per test in
DDL setup (`PostgresControlPlaneTest` runs 114 migrations in 146s;
`WriterPropertyTest` runs 100 in 131s).

In `InklessPostgreSQLContainer`, create and migrate an
`inkless_migrated_template` database once per container, lock it with
`IS_TEMPLATE true ALLOW_CONNECTIONS false`, and clone per-test
databases via `CREATE DATABASE ... TEMPLATE`. Add `createEmptyDatabase`
for tests that migrate to a specific historical Flyway version
(`BatchesPlanRegressionTest` and
`ListOffsetsTimestampScanBenchmarkTest`).

Assisted-by: Gemini 4 Neon
…tests

The four heaviest tiered and consolidated cluster test classes configure
5-second remote log manager and consolidation cleanup poll intervals,
stretching every tiering, WAL-pruning, and local-retention wait.

Lower `remote.log.manager.task.interval.ms` from 5000 ms to 1000 ms in
`InklessTopicTypeSwitcherClusterTest`,
`InklessConsolidatedDisklessTopicsTest`,
`InklessUntieredDisklessMigrationTest`, and
`InklessConsolidatedDisklessReassignmentTest`. Lower
`consolidation.cleanup.interval.ms` to 1000 ms in
`InklessConsolidatedDisklessTopicsTest` and adjust its reclaim-cycle
wait from 15s to 5s (5 cycles at 1s instead of 3 at 5s).

Assisted-by: Gemini 4 Neon
@gqmelo
gqmelo force-pushed the jeqo/ci-tier2-test-infra branch from e993d68 to 5fd0afb Compare December 2, 2026 14:39
@jeqo
jeqo marked this pull request as ready for review December 2, 2026 14:40
@jeqo
jeqo requested a review from gqmelo December 2, 2026 14:41
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

0