test « Transaction « Spring Q&A





1. Integration Test which simulates Exceptional / Rollback condition with AbstractTransactionalJUnit4SpringContextTests    stackoverflow.com

I have a JUnit4 test which extends AbstractTransactionalJUnit4SpringContextTests. I have a business object that I've marked as a unit of work with @Transactional. The unit of work updates the ...

2. Cannot get @Rollback to work for my Spring JPA Integration Test    stackoverflow.com

This here is a little test class that I have. Problem is that it is not rolling back the transaction after each test run. What have I done wrong? :)

@RunWith(SpringJUnit4ClassRunner.class)
@ContextConfiguration(locations = ...

3. How to rollback nested transactions with Propagation.REQUIRES_NEW in integration tests    stackoverflow.com

I have several integration tests for various services that extend the following baseclass:

@ContextConfiguration(locations="classpath:applicationContext-test.xml")
@TransactionConfiguration(transactionManager="txManager", defaultRollback=true)
@Transactional
public abstract class IntegrationTestBase extends AbstractTransactionalJUnit4SpringContextTests
{
    //Some setup, filling test data to a HSQLDB-database etc
}
For ...

4. Spring Test Transaction Rollback Problem    stackoverflow.com

i have a Problem understanding the @Transactional and @TransactionConfiguration(defaultRollback = true) Annotations. I have a test Code which inserts a userAccount into the Database, then another account with the same name should ...

5. Spring tests inpact on service transactions    stackoverflow.com

I am using @Transactional for my JUnit tests (main advantage is rollback of changes within one test) but I have small problem that this influence my service transactions. So for example ...

6. Supporting transaction Rollback for End-to-end testing    forum.springsource.org

Supporting transaction Rollback for End-to-end testing Hi all, section 10.2 of the reference documentation provides an example for doing end-to-end tests using "JobLauncherTestUtils". The test consists of some data setup and ...

7. Tests and @Transaction - how to create expectations?    forum.springsource.org

@Transaction REQUIRES_NEW - does it start a new transaction? Dear all, I am trying to use spring's transaction management for my hibernate tests. In this quick scenario I am testing a ...

8. How to test @Transactional of my service class ?    forum.springsource.org

How to test @Transactional of my service class ? Hi all, I want to test the transactionality of my service. Following is my configuration file: HTML Code:

9. Spring Testing - Nested transactions across test methods and test classes    forum.springsource.org

I am looking for a way to nest the test methods in a test class and then multiple test classes under a test suite in one transaction. The idea is, prepare ...





10. How to make my integration test transactional?    forum.springsource.org

How to make my integration test transactional? I have a small app that reads a few databases, and writes a small table in one database. I have a @Service-annotated class with ...

11. Making Transactional Tests    forum.springsource.org

Making Transactional Tests Hi, I'm trying to create transactional test. So I inherit from AbstractTransactionalSpringContextTests. I wan't to create my database on the fly using schema generator of hibernate and in ...

12. Testing transaction behaviour    forum.springsource.org

Testing transaction behaviour Hi. We are migrating (in small steps) from our struts, J2EE, CMP architecture to a struts, Spring, Hibernate architecture. We'll probably move off struts as well, but baby ...

13. Transactional test not rolling back as I expected    forum.springsource.org

Transactional test not rolling back as I expected I want to add an integration test to my persistence layer using the AbstractTransactionalSpringContextTests. But I cant figure out why my dao doesn't ...

14. Testing HIbernate Optimistic locking    forum.springsource.org

Testing HIbernate Optimistic locking I'm using Hibernate's versioning system to help prevent synchronization errors. So far so good. However, I'm having a hell of a time trying to figure out a ...

15. Hibernate Transactions During Testing    forum.springsource.org

Hibernate Transactions During Testing Helllo, Im performing integration testing using the AbstractTransactionalDataSourceSpringContextTests class from within Eclipse 3.2. When i use the org.springframework.orm.hibernate3.HibernateTransa ctionManager transaction manager, the following exception is thrown: Code: ...

16. How to test a transaction manager    forum.springsource.org

How to test a transaction manager Hello I create a transaction manager using TransactionProxyFactoryBean such as: PROPAGATION_REQUIRED ...





17. How to test a simple transaction    forum.springsource.org

How to test a simple transaction Hi, I need to suggestion about test a simple transaction using AbstractTransactionalDataSourceSpringContextTests. This is a method that defines my "transaction": /* ISOLATION_SERIALIZABLE - PROPAGATION_REQUIRES_NEW */ ...

18. Doubt on "how to test transactions on Spring"    forum.springsource.org

Doubt on "how to test transactions on Spring" Hi, I have doubts on how to test transactions. Ideally (I think), they are not typical unit/integration tests. In a previous post this ...

19. testing multiple transaction managers    forum.springsource.org

Hi, Is there any way to use AbstractTransactionalSpringContextTests to test DAOs that access 2 datasources - each of which is managed by a different transaction manager - and still have any ...

20. Transaction & Test case    forum.springsource.org

Transaction & Test case Hi all, I am currently writing a test case using Spring. Basically I have a method that should execute under transaction (saveOrder() below). In this method, I ...

21. Integration Test with @Transactional in service Class    forum.springsource.org

Jun 2nd, 2007, 02:49 AM #1 Sankaran View Profile View Forum Posts Private Message Junior Member Join Date Jun 2007 Location Bangalore ,India Posts 3 Integration Test with @Transactional in service ...

22. Multiple Transaction Managers For Tests    forum.springsource.org

Multiple Transaction Managers For Tests Hi all, So the AbstractTransactionalDataSourceSpringContextTests (ATDSSCT) class is wonderful, we use it everywhere. Our needs have grown beyond the capabilities of that class, however, as we ...

23. Testing transaction management    forum.springsource.org

Hi all, I've added declarative transaction management to a bean, and would like to test if it works, so if someone changes (or removes) transaction management, i can check that something ...

24. Simple Hibernate Transaction Rollback test    forum.springsource.org

Simple Hibernate Transaction Rollback test hi, I'm kinda new with spring and I wanted to try out the hibernate transactionmanager. The scenario is simple enough: I start a transaction (programmatically), add ...

25. automatic rollback in Spring 2.5 test framework    forum.springsource.org

automatic rollback in Spring 2.5 test framework Hi, I'm trying out the new Spring 2.5 test framework. I've defined a class with a single test method which uses DbUnit to insert ...

26. No transaction is started in test case    forum.springsource.org

No transaction is started in test case Hello! I started to learn about the Spring testing framework today and I'm having some problems with transactional support in the Test Cases. Here's ...

27. Stripes Mock Container and Spring's Transactional Tests    forum.springsource.org

Stripes Mock Container and Spring's Transactional Tests Hi all, I am using Stripes 1.4.3, Spring 2.5.3 and TestNG 5.7. I am trying to unit test some action beans using the Stripes ...

28. No transaction is started in test case    forum.springsource.org

No transaction is started in test case Hello! I started to learn about the Spring testing framework a few days ago and I'm having some problems with transactional support in the ...

29. Tests rolling back on initial connection vs after test transaction    forum.springsource.org

May 5th, 2008, 10:43 AM #1 Helena View Profile View Forum Posts Private Message Member Spring Team Join Date Dec 2007 Posts 90 Tests rolling back on initial connection vs after ...

30. Integration tests transaction not started    forum.springsource.org

I am currently configuring an application to use Spring/Hibernate3 and attempting to write some integration tests using AbstractTransactionalDataSourceSpringContextTests. I am using a GenericHibernateDao pattern as can be found on elsewhere and ...

31. Testing transactions with AbstractTransactionalDataSourceSpringContextTests    forum.springsource.org

Testing transactions with AbstractTransactionalDataSourceSpringContextTests Hi, In my web application I'm using Struts2 actions to access business methods on the service layer. Transactions are defined using a transaction advice on the service ...

32. Transactional test verification problem    forum.springsource.org

Transactional test verification problem Good evening, all. I'm looking for some help for a problem I'm having with an integration test I'm running against an Oracle database. I'm using Spring 2.5.5 ...

33. Testing - Multiple spring powered services in test, service registration order , lock    forum.springsource.org

Nov 27th, 2008, 06:00 PM #1 drubio View Profile View Forum Posts Private Message Member Join Date May 2008 Posts 50 Testing - Multiple spring powered services in test, service registration ...

34. TestContext. Multiple transaction tests.    forum.springsource.org

I am not finding a way to finish a transaction and start a new one inside a test using the new TestContext Framework. Am I missing something here or TestContext Framework ...

35. Testing transactional services    forum.springsource.org

Testing transactional services Hi, I am not quite sure whether this is the correct forum, but I hope so. In my application I have the following architecture: GUI -> Business Logic ...

36. How to wire transactions for FitNesse tests?    forum.springsource.org

Hi Are using FitNesse for testing an application. I have problems running a fixture (extending columnfixture) and only having one transaction for the entire testpage. Does anyone know how to wire ...

38. Problem with Rollback on Tests    forum.springsource.org

Problem with Rollback on Tests Hello, I am having some issues with my spring context integration tests. I have gotten them all wired up loading the context correctly; however, when they ...

39. Propagation.REQUIRE_NEW and rollback after test    forum.springsource.org

Hi All, I'm trying to write transaction-aware (rollbacks after methods) tests to my DAO/service layer using testNG framework.To integrate it with Spring I'm using AbstractTransactionalTestNGSpringContextTests class. Everything worked fine until I've ...

40. Testing Transactional Entity Persistence Success    forum.springsource.org

Testing Transactional Entity Persistence Success I have a JPA DAO that I am testing in a class that extends AbstractTransactionalTestNGSpringContextTests. All I do in the method is construct a POJO entity ...

41. Spring 3.0.0M4 Integration test, rollback    forum.springsource.org

Sep 21st, 2009, 07:48 AM #1 aasheikh View Profile View Forum Posts Private Message Junior Member Join Date Apr 2008 Posts 12 Spring 3.0.0M4 Integration test, rollback I have just configure ...

42. Aspect weaving based @Transactional tests fail when running in test suite    forum.springsource.org

Aspect weaving based @Transactional tests fail when running in test suite The Symptom: - Each test passes when running individually; - A few @Transactional tests may fail when running in a ...

43. Testing if transactions work correctly    forum.springsource.org

Testing if transactions work correctly Hi, i have financeService and methods in this service are transactinal. There is applicationContext.xml: Code: // dao's configurations ...

44. Rolling back transactions when testing with embedded container    forum.springsource.org

Rolling back transactions when testing with embedded container Hey folks, My situation is this. The project I am building runs using an embedded Jetty container. I load Jetty and Spring and ...

45. Spring 3 JPA tests - no rollback    forum.springsource.org

Spring 3 JPA tests - no rollback Hi, I've been recently trying to test JPA DAOs. The test case is marked with @Transactional, but no rollback occurs. I can see in ...

46. Transactional tests and simpleJdbcTemplate issues    forum.springsource.org

Transactional tests and simpleJdbcTemplate issues Hi there, I'm having some issues using simpleJdbcTemplate in my Roo jUnit integration tests. I've marked my test class with @Transactional because I want them all ...

47. in integration test is it possible to define two transactions for a test method    forum.springsource.org

Hello, In my project I configured the spring test package and it works great. But in some test I want to prepare some data and then perform a test, and I ...

48. Transactional Testing (Spring + TestNG)    forum.springsource.org

49. Transactional Integration-Test    forum.springsource.org

Transactional Integration-Test SOLVED: Failed miserably to read the documentation for programmatic transactions... Sorry Hello community, I am looking for advice / best practice on how to test my service layer. I ...

50. Testing service which execute multiple transactions    forum.springsource.org

51. Strange Problem With Transactional TestNG Tests    forum.springsource.org

Strange Problem With Transactional TestNG Tests We have One-Offs If we run our test suite we receive some UnexpectedRollbackException and IllegalTransactionStateException. Doesn't matter if we use ctw or ltw. If we ...