Back Forum Reply New

How to create tests to simulate concurrent updates

Can anyone provide me with guidance on how to create tests to simulate concurrent updates in order to test transaction isolation?  I'm using Spring 1.2.8 amp; Hibernate 3.1.3.

Thx,
Gary

I would have a look at the Spring testing references,  I think it would be possible to do updates in different transactions and perform your tests.

docs/...e/testing.html
docs/...tml#testing-tx
docs/...textTests.html

Thanks for the response.

I have looked at that documentation and it appears that Spring does provide some of the building blocks for transactional testing but the important piece that I don't see is how to cause 2 simultanteous updates to the same object.  It seems to me that some type of multithreaded mechanism would be needed to do this.

I have had a couple of recommendations on another list that look promising.  One person suggested using multithreaded JUnit extensions (news/extension/threaded/index.htm).  Someone else suggested using load testing tools such as WAPT, Grinder and TestNG.  I've looked briefly at the load testing tools and haven't had a chance to look at the JUnit extensions yet so I still don't have a firm solution at this point.  

I don't have a great deal of time to devote to researching the various options because of a tight schedule.  I was hoping that this is a scenario that is commonly encountered and that there would be a ready answer but I guess that's not the case.

Thanks again,
Gary

A co-worker also suggested JUnit extensions might be worth looking at!
¥
Back Forum Reply New