Skip to content

Per-test rollback for @StormTest #387

Description

@zantvoort

@StormTest runs all tests of a class against one shared database with no rollback between tests, so every test observes the writes of the tests before it. Our own suite already shows the cost: StormExtensionTest.java:45-46 asserts >= 3 with the comment "may be more if insert tests run first", while :56-59 in the same class asserts exactly 3 and passes only due to default method ordering.

Proposal: open a transaction per test and roll it back afterwards by default, with an opt-out (annotation attribute) for tests that need commit semantics (e.g. testing transaction behavior itself). Fix the order-dependent assertions in the same change.

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Type

    No type

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions