Skip to content

Arquillian Persistence does not cleanup or commit between multiple test-methods - integration-tests state currupted #21

@jenskreidler

Description

@jenskreidler
Issue Overview

Problem with integration test state using transactions, @UsingDataSet and @ShouldMatchDataSet:
It seems that Arquillian Persistence does not clean up a previous test-method's setup or commit a subsequent test-method's state.

Expected Behaviour

Method 1 executes: it seeds state with @UsingDataSet, test code manipulates persistence context.
Method 2 executes subsequently: it seeds cleanly an other state with @UsingDataSet, test code manipluates persistence context and @ShouldMatchDataSet ensures database state-

Current Behaviour

With arquillian-persistence:1.2.0.2, method 2 gets a corrupted persistence state from method 1 and test code - a database insert - is not commited and thus verifyable using method 2's @ShouldMatchDataSet.

Steps To Reproduce
  1. Use/fork my ape-transaction-test project: https://github.com/jenskreidler/ape-transaction-test.git
  2. Configure project for your local enviroment (see README)
  3. Run mvn clean install (uses arquillian-persistence:1.2.0.2) => UserService_IT fails
  4. In pom.xml, switch arquillian-persistence to version 1.1.13.0 => UserService_IT succeeds
Additional information

Maybe this issue is related to arquillian/arquillian-extension-persistence#123 ?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions