[jboss-cvs] JBossCache/tests/functional/org/jboss/cache/optimistic ...

Manik Surtani manik at jboss.org
Tue May 22 08:01:38 EDT 2007


  User: msurtani
  Date: 07/05/22 08:01:38

  Modified:    tests/functional/org/jboss/cache/optimistic  CacheTest.java
  Log:
  JBCACHE-1038
  
  Revision  Changes    Path
  1.33      +11 -2     JBossCache/tests/functional/org/jboss/cache/optimistic/CacheTest.java
  
  (In the diff below, changes in quantity of whitespace are not shown.)
  
  Index: CacheTest.java
  ===================================================================
  RCS file: /cvsroot/jboss/JBossCache/tests/functional/org/jboss/cache/optimistic/CacheTest.java,v
  retrieving revision 1.32
  retrieving revision 1.33
  diff -u -b -r1.32 -r1.33
  --- CacheTest.java	26 Apr 2007 13:19:31 -0000	1.32
  +++ CacheTest.java	22 May 2007 12:01:38 -0000	1.33
  @@ -99,13 +99,22 @@
         for (int i = 0; i < numThreads; i++) thread[i].start();
         latch.countDown();
         for (int i = 0; i < numThreads; i++) thread[i].join();
  -      // test exceptions.
  +      // test exceptions.  Expecting at least one exception
  +      Exception e;
  +      int exceptionCount = 0;
         for (int i = 0; i < numThreads; i++)
         {
  -         Assert.assertNull("Thread " + thread[i].getName() + " threw exception!", thread[i].getException());
  +
  +         if ((e = thread[i].getException()) != null)
  +         {
  +            assertFalse("Should never see a RollbackException - instead, expecting the CAUSE of the rollback.", e instanceof RollbackException);
  +            exceptionCount++;
         }
      }
   
  +      assertTrue("Expecting at least ONE concurrent write exception!!", exceptionCount > 0);
  +   }
  +
      public void testLocalTransaction() throws Exception
      {
         MockInterceptor dummy = new MockInterceptor();
  
  
  



More information about the jboss-cvs-commits mailing list