Results 1 to 4 of 4

Thread: How to create tests to simulate concurrent updates

  1. #1

    Default 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 & Hibernate 3.1.3.

    Thx,
    Gary

  2. #2
    Join Date
    Sep 2006
    Location
    UK
    Posts
    8,424

    Default

    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.

    http://www.springframework.org/docs/...e/testing.html
    http://www.springframework.org/docs/...tml#testing-tx
    http://www.springframework.org/docs/...textTests.html

  3. #3

    Default

    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 (http://www.junit.org/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

  4. #4
    Join Date
    Sep 2006
    Location
    UK
    Posts
    8,424

    Default

    A co-worker also suggested JUnit extensions might be worth looking at!
    Last edited by karldmoore; Dec 8th, 2006 at 04:21 PM.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •