Rag
Rag

Reputation: 65

Disable arquillian cleanup

I Have a Bean that creates some default user in DB. In an Arquillian test I need to make test cases with @UsingDataSet. One of tests should check if Users created by this bean exist but the created users are dropped after tests.

How can I disable Cleanup on Arquillian tests? I tried @Cleanup(phase = TestExecutionPhase.NONE) but with no effects.

Upvotes: 0

Views: 301

Answers (1)

Rag
Rag

Reputation: 65

I found a solution, in every test I used:

@Cleanup(phase = TestExecutionPhase.AFTER, strategy = CleanupStrategy.USED_ROWS_ONLY)

It only cleanup users created by @UsingDataSet and left users created by Bean untouched.

Upvotes: 1

Related Questions