[JBoss JIRA] (ARQ-723) TransactionalWrapper.afterTest() ignores SessionContext.setRollbackOnly()
by Juergen Zimmermann (Created) (JIRA)
TransactionalWrapper.afterTest() ignores SessionContext.setRollbackOnly()
-------------------------------------------------------------------------
Key: ARQ-723
URL: https://issues.jboss.org/browse/ARQ-723
Project: Arquillian
Issue Type: Bug
Security Level: Public (Everyone can see)
Components: Extension - Persistence
Affects Versions: persistence_1.0.0.Alpha3
Reporter: Juergen Zimmermann
Assignee: Bartosz Majsak
If a method is being tested that invokes SessionContext.setRollbackOnly(), then the commit mode doesn't work correctly, because doing a commit() after setRollbackOnly() will fail. Therefore, the method TransactionalWrapper.afterTest() should be implemented as follows:
final TransactionMode mode = metadataProvider.get().getTransactionalMode();
final UserTransaction trans;
if (TransactionMode.COMMIT.equals(mode)) {
if (Status.STATUS_MARKED_ROLLBACK.equals(trans.getStatus())) {
trans.rollback();
}
else {
trans.commit();
}
}
else {
trans.rollback();
}
--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.jboss.org/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira
12 years, 2 months
[JBoss JIRA] (ARQ-755) Introduce annotation based db cleanup configuration
by Bartosz Majsak (JIRA)
Bartosz Majsak created ARQ-755:
----------------------------------
Summary: Introduce annotation based db cleanup configuration
Key: ARQ-755
URL: https://issues.jboss.org/browse/ARQ-755
Project: Arquillian
Issue Type: Enhancement
Security Level: Public (Everyone can see)
Components: Extension - Persistence
Affects Versions: persistence_1.0.0.Alpha3
Reporter: Bartosz Majsak
Assignee: Bartosz Majsak
Fix For: persistence_1.0.0.next
User should have control on data cleanup event. Currently it's always executed after the test. Provide @Cleanup annotation with following options:
- DISABLED
- BEFORE (default)
- AFTER
This annotation can be placed on class level - defining the default behaviour for all test cases, but when define on method level it will override global settings.
--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.jboss.org/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira
12 years, 2 months
[JBoss JIRA] (ARQ-806) Should provide cleanup modes to control what to remove for the given test
by Bartosz Majsak (JIRA)
Bartosz Majsak created ARQ-806:
----------------------------------
Summary: Should provide cleanup modes to control what to remove for the given test
Key: ARQ-806
URL: https://issues.jboss.org/browse/ARQ-806
Project: Arquillian
Issue Type: Sub-task
Security Level: Public (Everyone can see)
Components: Extension - Persistence
Affects Versions: persistence_1.0.0.Alpha3
Reporter: Bartosz Majsak
Assignee: Bartosz Majsak
Fix For: persistence_1.0.0.next
Provide following cleanup strategies:
* STRICT (implemented currently) - Cleans whole database content (using DELETE_ALL). Might require turning off database constraints (e.g. referential integrity).
* USED_ROWS_ONLY - Deletes only those entries which were defined in data sets.
* USED_TABLES_ONLY - Deletes only those tables which were used in data sets.
--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.jboss.org/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira
12 years, 2 months