Skip to content

Change YamlTest to not run different configs for the same file concurrently #4345

Description

@ScottDugas

Reference Commits: b6309fce1, b2a0486d1, 7c9bbed11
Files (primary):
yaml-tests/src/main/.../YamlTestCatalogInitializer.java,
yaml-tests/src/test/.../YamlTest.java,
yaml-tests/src/main/.../block/SetupBlock.java,
yaml-tests/src/test/.../PerMethodResourceLocksProvider.java

Each yaml-test lazily bootstrapped /__SYS/CATALOG on its first transaction; under parallelism the first test wins the create race and every sibling retries around a SERIALIZATION_FAILURE. Parameterised invocations of the same yaml-test method also collide with each other on the same fixture, though different methods have no reason to serialise.

Bootstrap the /__SYS/CATALOG record store once per suite in @BeforeAll rather than lazily on the first test. Register a JUnit LockConfigurationResolver (via PerMethodResourceLocksProvider) that serialises the parameterised invocations of any single yaml- test method against each other while still allowing different methods to run concurrently.

In addition the core YamlTest tests, other classes run into catalog initialization issues. We should wire those files up too:
Reference Commits: b2a0486d1 (partial)
Files (primary): EmbeddedConfig.java, JDBCInProcessConfig.java,
external-server yaml-test config

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Fields

    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions