[hibernate-commits] Hibernate SVN: r18077 - in core/trunk/cache-infinispan: src/test/java/org/hibernate/test/cache/infinispan/functional and 1 other directory.

hibernate-commits at lists.jboss.org hibernate-commits at lists.jboss.org
Fri Nov 27 11:53:34 EST 2009


Author: galder.zamarreno at jboss.com
Date: 2009-11-27 11:53:33 -0500 (Fri, 27 Nov 2009)
New Revision: 18077

Modified:
   core/trunk/cache-infinispan/pom.xml
   core/trunk/cache-infinispan/src/test/java/org/hibernate/test/cache/infinispan/functional/ConcurrentWriteTest.java
Log:
[ISPN-277] (LRU data container endlesly looping or exhibiting heavy contention) Update to trunk and check if testManyUsers runs fine now.

Modified: core/trunk/cache-infinispan/pom.xml
===================================================================
--- core/trunk/cache-infinispan/pom.xml	2009-11-27 16:51:42 UTC (rev 18076)
+++ core/trunk/cache-infinispan/pom.xml	2009-11-27 16:53:33 UTC (rev 18077)
@@ -17,7 +17,7 @@
     <description>Integration of Hibernate with Infinispan</description>
 
     <properties>
-      <version.infinispan>4.0.0.CR2</version.infinispan>
+      <version.infinispan>4.0.0-SNAPSHOT</version.infinispan>
       <version.hsqldb>1.8.0.2</version.hsqldb>
       <version.cglib>2.2</version.cglib>
       <version.javassist>3.4.GA</version.javassist>

Modified: core/trunk/cache-infinispan/src/test/java/org/hibernate/test/cache/infinispan/functional/ConcurrentWriteTest.java
===================================================================
--- core/trunk/cache-infinispan/src/test/java/org/hibernate/test/cache/infinispan/functional/ConcurrentWriteTest.java	2009-11-27 16:51:42 UTC (rev 18076)
+++ core/trunk/cache-infinispan/src/test/java/org/hibernate/test/cache/infinispan/functional/ConcurrentWriteTest.java	2009-11-27 16:53:33 UTC (rev 18077)
@@ -189,40 +189,40 @@
 
    }
 
-//   /**
-//    * TODO: This will fail until ISPN-??? has been fixed.
-//    * 
-//    * @throws Exception
-//    */
-//   public void testManyUsers() throws Throwable {
-//      try {
-//         // setup - create users
-//         for (int i = 0; i < USER_COUNT; i++) {
-//            Customer customer = createCustomer(0);
-//            getCustomerIDs().add(customer.getId());
-//         }
-//         assertEquals("failed to create enough Customers", USER_COUNT, getCustomerIDs().size());
-//
-//         final ExecutorService executor = Executors.newFixedThreadPool(USER_COUNT);
-//
-//         CyclicBarrier barrier = new CyclicBarrier(USER_COUNT + 1);
-//         List<Future<Void>> futures = new ArrayList<Future<Void>>(USER_COUNT);
-//         for (Integer customerId : getCustomerIDs()) {
-//            Future<Void> future = executor.submit(new UserRunner(customerId, barrier));
-//            futures.add(future);
-//            Thread.sleep(LAUNCH_INTERVAL_MILLIS); // rampup
-//         }
-////         barrier.await(); // wait for all threads to be ready
-//         barrier.await(45, TimeUnit.SECONDS); // wait for all threads to finish
-//         log.info("All threads finished, let's shutdown the executor and check whether any exceptions were reported");
-//         for (Future<Void> future : futures) future.get();
-//         log.info("All future gets checked");
-//      } catch (Throwable t) {
-//         log.error("Error running test", t);
-//         throw t;
-//      }
-//   }
+   /**
+    * TODO: This will fail until ISPN-??? has been fixed.
+    * 
+    * @throws Exception
+    */
+   public void testManyUsers() throws Throwable {
+      try {
+         // setup - create users
+         for (int i = 0; i < USER_COUNT; i++) {
+            Customer customer = createCustomer(0);
+            getCustomerIDs().add(customer.getId());
+         }
+         assertEquals("failed to create enough Customers", USER_COUNT, getCustomerIDs().size());
 
+         final ExecutorService executor = Executors.newFixedThreadPool(USER_COUNT);
+
+         CyclicBarrier barrier = new CyclicBarrier(USER_COUNT + 1);
+         List<Future<Void>> futures = new ArrayList<Future<Void>>(USER_COUNT);
+         for (Integer customerId : getCustomerIDs()) {
+            Future<Void> future = executor.submit(new UserRunner(customerId, barrier));
+            futures.add(future);
+            Thread.sleep(LAUNCH_INTERVAL_MILLIS); // rampup
+         }
+//         barrier.await(); // wait for all threads to be ready
+         barrier.await(45, TimeUnit.SECONDS); // wait for all threads to finish
+         log.info("All threads finished, let's shutdown the executor and check whether any exceptions were reported");
+         for (Future<Void> future : futures) future.get();
+         log.info("All future gets checked");
+      } catch (Throwable t) {
+         log.error("Error running test", t);
+         throw t;
+      }
+   }
+
    public void cleanup() throws Exception {
       getCustomerIDs().clear();
       String deleteContactHQL = "delete from Contact";



More information about the hibernate-commits mailing list