Skip to content

Parallel integration test execution using PostgreSQL schema isolation #49719

@drnow4u

Description

@drnow4u

Summary

Integration tests currently run sequentially. With 50+ test classes, this results in long feedback cycles.

Problem

Each test class uses TRUNCATE CASCADE for isolation before execution, which prevents parallel runs — concurrent tests would interfere with each other's data in the shared public schema.

On modern multi-core CPUs, sequential test execution leaves most cores idle, failing to utilise available hardware capacity.

Goal

Enable integration test classes to run in parallel without data interference, reducing overall test suite execution time.

Context

  • Spring Boot integration tests (@SpringBootTest)
  • All test classes share a single Spring application context
  • PostgreSQL
  • Flyway for schema migrations
  • ~50+ integration test classes, each setting up and tearing down data via JDBC

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions