@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.
@StormTestruns 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-46asserts>= 3with the comment "may be more if insert tests run first", while:56-59in 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.