-
Notifications
You must be signed in to change notification settings - Fork 10
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Arquillian Persistence does not cleanup or commit between multiple test-methods - integration-tests state currupted #21
Comments
Anyone who's tried my simple "UserService_IT" from the project I've linked? IMHO this is a blocker upgrading and using arquillian-persistence in your JEE projects |
Thanks for reporting this issue and providing reproducer 💯 🥇 I will give it a spin this week. |
abregar
added a commit
to abregar/arquillian-extension-transaction
that referenced
this issue
Feb 19, 2023
- keeping junit4 as this extension is still not ready for junit5, see arquillian/arquillian-extension-persistence#195 - update versions arquillian core and junit4
psi-msudra
added a commit
to psi-msudra/arquillian-extension-persistence
that referenced
this issue
Dec 13, 2023
Since version 1.0.4 of arquillian transaction extension, @after remains within the transaction bounds, TransactionHandler first proceeds and then ends the transaction. This causes that after persistence test logic is applied before the test method transaction is finished. This fix restores the correct ordering of after persistence test logic. arquillian/arquillian-extension-transaction@92864c8 arquillian/arquillian-extension-transaction#21
psi-msudra
added a commit
to PSI-Polska/arquillian-extension-persistence
that referenced
this issue
Dec 13, 2023
Since version 1.0.4 of arquillian transaction extension, @after remains within the transaction bounds, TransactionHandler first proceeds and then ends the transaction. This causes that after persistence test logic is applied before the test method transaction is finished. This fix restores the correct ordering of after persistence test logic. arquillian/arquillian-extension-transaction@92864c8 arquillian/arquillian-extension-transaction#21
psi-msudra
added a commit
to PSI-Polska/arquillian-extension-persistence
that referenced
this issue
Dec 18, 2023
Since version 1.0.4 of arquillian transaction extension, @after remains within the transaction bounds, TransactionHandler first proceeds and then ends the transaction. This causes that after persistence test logic is applied before the test method transaction is finished. This fix restores the correct ordering of after persistence test logic. arquillian/arquillian-extension-transaction@92864c8 arquillian/arquillian-extension-transaction#21
TheOnlyAl
pushed a commit
to TheOnlyAl/arquillian-extension-persistence
that referenced
this issue
Feb 14, 2024
Since version 1.0.4 of arquillian transaction extension, @after remains within the transaction bounds, TransactionHandler first proceeds and then ends the transaction. This causes that after persistence test logic is applied before the test method transaction is finished. This fix restores the correct ordering of after persistence test logic. arquillian/arquillian-extension-transaction@92864c8 arquillian/arquillian-extension-transaction#21
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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
mvn clean install
(usesarquillian-persistence:1.2.0.2
) => UserService_IT failspom.xml
, switcharquillian-persistence
to version1.1.13.0
=> UserService_IT succeedsAdditional information
Maybe this issue is related to arquillian/arquillian-extension-persistence#123 ?
The text was updated successfully, but these errors were encountered: