[infinispan-commits] Infinispan SVN: r1212 - trunk/lucene-directory/src/test/java/org/infinispan/lucene.

infinispan-commits at lists.jboss.org infinispan-commits at lists.jboss.org
Tue Nov 24 07:26:37 EST 2009


Author: manik.surtani at jboss.com
Date: 2009-11-24 07:26:37 -0500 (Tue, 24 Nov 2009)
New Revision: 1212

Modified:
   trunk/lucene-directory/src/test/java/org/infinispan/lucene/DynamicClusterIndexStressTest.java
Log:
Disabled manual test

Modified: trunk/lucene-directory/src/test/java/org/infinispan/lucene/DynamicClusterIndexStressTest.java
===================================================================
--- trunk/lucene-directory/src/test/java/org/infinispan/lucene/DynamicClusterIndexStressTest.java	2009-11-24 12:25:37 UTC (rev 1211)
+++ trunk/lucene-directory/src/test/java/org/infinispan/lucene/DynamicClusterIndexStressTest.java	2009-11-24 12:26:37 UTC (rev 1212)
@@ -21,15 +21,6 @@
  */
 package org.infinispan.lucene;
 
-import java.io.IOException;
-import java.util.HashSet;
-import java.util.Set;
-import java.util.concurrent.BlockingDeque;
-import java.util.concurrent.ExecutorService;
-import java.util.concurrent.Executors;
-import java.util.concurrent.LinkedBlockingDeque;
-import java.util.concurrent.TimeUnit;
-
 import org.apache.lucene.analysis.Analyzer;
 import org.apache.lucene.analysis.SimpleAnalyzer;
 import org.apache.lucene.document.Document;
@@ -38,8 +29,8 @@
 import org.apache.lucene.document.Field.Store;
 import org.apache.lucene.index.CorruptIndexException;
 import org.apache.lucene.index.IndexWriter;
-import org.apache.lucene.index.Term;
 import org.apache.lucene.index.IndexWriter.MaxFieldLength;
+import org.apache.lucene.index.Term;
 import org.apache.lucene.search.IndexSearcher;
 import org.apache.lucene.search.Query;
 import org.apache.lucene.search.TermQuery;
@@ -54,6 +45,15 @@
 import org.testng.annotations.BeforeClass;
 import org.testng.annotations.Test;
 
+import java.io.IOException;
+import java.util.HashSet;
+import java.util.Set;
+import java.util.concurrent.BlockingDeque;
+import java.util.concurrent.ExecutorService;
+import java.util.concurrent.Executors;
+import java.util.concurrent.LinkedBlockingDeque;
+import java.util.concurrent.TimeUnit;
+
 /**
  * <p>
  * DynamicClusterIndexStressTest verifies the index state is healthy while the cluster topology changes.
@@ -73,7 +73,8 @@
  * @author Sanne Grinovero
  * @since 4.0
  */
- at Test(groups = "profiling", testName = "lucene.DynamicClusterIndexStressTest")
+ at Test(groups = "profiling", testName = "lucene.DynamicClusterIndexStressTest", enabled = false,
+      description = "This is a 'manual' test and should only be enabled and run when attached to a profiler.")
 public class DynamicClusterIndexStressTest {
 
    private static final int TOTAL_NODES_TO_CREATE = 1000;
@@ -137,17 +138,15 @@
       Assert.assertTrue(!failed, failureMessage);
    }
    
-   @Test
-   public void testWihtoutRehashing() throws InterruptedException{
+   public void testWithoutRehashing() throws InterruptedException{
       ExecutorService executor = Executors.newFixedThreadPool(CONCURRENCY_LIMIT);
       Cache[] caches = new Cache[CONCURRENCY_LIMIT];
       for (int i=0; i<CONCURRENCY_LIMIT; i++){
          caches[i] = cacheFactory.createClusteredCacheWaitingForNodesView(i+1);
       }
       //TODO run the tests
-      //FIXME: some NPEs are logged here during cleanup
       for (int i=0; i<CONCURRENCY_LIMIT; i++){
-//         Thread.sleep(1000); Enabling sleep here "fixes" the NPEs
+         Thread.sleep(250); // there should be some sleep here
          cleanup(caches[i]);
       }
    }



More information about the infinispan-commits mailing list