You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@lucene.apache.org by er...@apache.org on 2015/01/23 19:36:20 UTC

svn commit: r1654300 [2/3] - in /lucene/dev/branches/branch_5x: ./ solr/ solr/contrib/ solr/contrib/clustering/src/test/org/apache/solr/handler/clustering/ solr/contrib/map-reduce/src/test/org/apache/solr/hadoop/ solr/contrib/morphlines-core/src/test/o...

Modified: lucene/dev/branches/branch_5x/solr/core/src/test/org/apache/solr/cloud/RecoveryZkTest.java
URL: http://svn.apache.org/viewvc/lucene/dev/branches/branch_5x/solr/core/src/test/org/apache/solr/cloud/RecoveryZkTest.java?rev=1654300&r1=1654299&r2=1654300&view=diff
==============================================================================
--- lucene/dev/branches/branch_5x/solr/core/src/test/org/apache/solr/cloud/RecoveryZkTest.java (original)
+++ lucene/dev/branches/branch_5x/solr/core/src/test/org/apache/solr/cloud/RecoveryZkTest.java Fri Jan 23 18:36:18 2015
@@ -25,6 +25,7 @@ import org.apache.solr.client.solrj.Solr
 import org.apache.solr.client.solrj.embedded.JettySolrRunner;
 import org.apache.solr.common.SolrInputDocument;
 import org.apache.solr.common.cloud.ZkStateReader;
+import org.junit.Test;
 import org.slf4j.Logger;
 import org.slf4j.LoggerFactory;
 
@@ -39,7 +40,7 @@ public class RecoveryZkTest extends Abst
   public RecoveryZkTest() {
     super();
     sliceCount = 1;
-    shardCount = 2;
+    fixShardCount(2);
     schemaString = "schema15.xml";      // we need a string id
   }
   
@@ -54,8 +55,8 @@ public class RecoveryZkTest extends Abst
     return randVals;
   }
 
-  @Override
-  public void doTest() throws Exception {
+  @Test
+  public void test() throws Exception {
     handle.clear();
     handle.put("timestamp", SKIPVAL);
     
@@ -148,7 +149,7 @@ public class RecoveryZkTest extends Abst
 
   
   @Override
-  public void tearDown() throws Exception {
+  public void distribTearDown() throws Exception {
     // make sure threads have been stopped...
     indexThread.safeStop();
     indexThread2.safeStop();
@@ -156,7 +157,7 @@ public class RecoveryZkTest extends Abst
     indexThread.join();
     indexThread2.join();
     
-    super.tearDown();
+    super.distribTearDown();
   }
   
   // skip the randoms - they can deadlock...

Modified: lucene/dev/branches/branch_5x/solr/core/src/test/org/apache/solr/cloud/RemoteQueryErrorTest.java
URL: http://svn.apache.org/viewvc/lucene/dev/branches/branch_5x/solr/core/src/test/org/apache/solr/cloud/RemoteQueryErrorTest.java?rev=1654300&r1=1654299&r2=1654300&view=diff
==============================================================================
--- lucene/dev/branches/branch_5x/solr/core/src/test/org/apache/solr/cloud/RemoteQueryErrorTest.java (original)
+++ lucene/dev/branches/branch_5x/solr/core/src/test/org/apache/solr/cloud/RemoteQueryErrorTest.java Fri Jan 23 18:36:18 2015
@@ -21,6 +21,7 @@ import org.apache.lucene.util.LuceneTest
 import org.apache.solr.client.solrj.SolrClient;
 import org.apache.solr.common.SolrException;
 import org.apache.solr.common.SolrInputDocument;
+import org.junit.Test;
 
 import java.util.ArrayList;
 import java.util.List;
@@ -36,11 +37,11 @@ public class RemoteQueryErrorTest extend
   public RemoteQueryErrorTest() {
     super();
     sliceCount = 1;
-    shardCount = random().nextBoolean() ? 3 : 4;
+    fixShardCount(random().nextBoolean() ? 3 : 4);
   }
 
-  @Override
-  public void doTest() throws Exception {
+  @Test
+  public void test() throws Exception {
     handle.clear();
     handle.put("timestamp", SKIPVAL);
     
@@ -70,4 +71,4 @@ public class RemoteQueryErrorTest extend
       }
     }
   }
-}
\ No newline at end of file
+}

Modified: lucene/dev/branches/branch_5x/solr/core/src/test/org/apache/solr/cloud/ReplicationFactorTest.java
URL: http://svn.apache.org/viewvc/lucene/dev/branches/branch_5x/solr/core/src/test/org/apache/solr/cloud/ReplicationFactorTest.java?rev=1654300&r1=1654299&r2=1654300&view=diff
==============================================================================
--- lucene/dev/branches/branch_5x/solr/core/src/test/org/apache/solr/cloud/ReplicationFactorTest.java (original)
+++ lucene/dev/branches/branch_5x/solr/core/src/test/org/apache/solr/cloud/ReplicationFactorTest.java Fri Jan 23 18:36:18 2015
@@ -19,15 +19,10 @@ package org.apache.solr.cloud;
 
 import java.io.File;
 import java.net.ServerSocket;
-import java.net.URI;
-import java.net.URL;
 import java.util.ArrayList;
-import java.util.HashMap;
 import java.util.List;
 import java.util.Locale;
-import java.util.Map;
 
-import org.apache.lucene.util.LuceneTestCase.AwaitsFix;
 import org.apache.lucene.util.LuceneTestCase.Slow;
 import org.apache.solr.SolrTestCaseJ4.SuppressSSL;
 import org.apache.solr.client.solrj.embedded.JettySolrRunner;
@@ -36,10 +31,8 @@ import org.apache.solr.client.solrj.requ
 import org.apache.solr.common.SolrInputDocument;
 import org.apache.solr.common.cloud.Replica;
 import org.apache.solr.common.cloud.ZkCoreNodeProps;
-import org.apache.solr.common.cloud.ZkStateReader;
 import org.apache.solr.common.util.NamedList;
-import org.junit.After;
-import org.junit.Before;
+import org.junit.Test;
 import org.slf4j.Logger;
 import org.slf4j.LoggerFactory;
 
@@ -59,31 +52,25 @@ public class ReplicationFactorTest exten
   public ReplicationFactorTest() {
     super();
     sliceCount = 3;
-    shardCount = 3;
+    fixShardCount(3);
   }
   
-  @Before
   @Override
-  public void setUp() throws Exception {
-    super.setUp();
+  public void distribSetUp() throws Exception {
+    super.distribSetUp();
     System.setProperty("numShards", Integer.toString(sliceCount));
   }
   
   @Override
-  @After
-  public void tearDown() throws Exception {
+  public void distribTearDown() throws Exception {
     
     log.info("tearing down replicationFactorTest!");
     
     System.clearProperty("numShards");
     
-    try {
-      super.tearDown();
-    } catch (Exception exc) {}
-    
-    resetExceptionIgnores();    
-    
-    log.info("super.tearDown complete, closing all socket proxies");
+    super.distribTearDown();
+
+    log.info("super.distribTearDown complete, closing all socket proxies");
     if (!proxies.isEmpty()) {
       for (SocketProxy proxy : proxies.values()) {
         proxy.close();
@@ -111,10 +98,10 @@ public class ReplicationFactorTest exten
       port = s.getLocalPort();
     }
     return port;
-  }  
-   
-  @Override
-  public void doTest() throws Exception {
+  }
+
+  @Test
+  public void test() throws Exception {
     log.info("replication factor test running");
     waitForThingsToLevelOut(30000);
     

Modified: lucene/dev/branches/branch_5x/solr/core/src/test/org/apache/solr/cloud/RollingRestartTest.java
URL: http://svn.apache.org/viewvc/lucene/dev/branches/branch_5x/solr/core/src/test/org/apache/solr/cloud/RollingRestartTest.java?rev=1654300&r1=1654299&r2=1654300&view=diff
==============================================================================
--- lucene/dev/branches/branch_5x/solr/core/src/test/org/apache/solr/cloud/RollingRestartTest.java (original)
+++ lucene/dev/branches/branch_5x/solr/core/src/test/org/apache/solr/cloud/RollingRestartTest.java Fri Jan 23 18:36:18 2015
@@ -21,8 +21,7 @@ import org.apache.commons.collections.Co
 import org.apache.solr.common.cloud.SolrZkClient;
 import org.apache.solr.common.params.CollectionParams;
 import org.apache.zookeeper.KeeperException;
-import org.junit.After;
-import org.junit.Before;
+import org.junit.Test;
 import org.slf4j.Logger;
 import org.slf4j.LoggerFactory;
 
@@ -36,29 +35,25 @@ public class RollingRestartTest extends
   private static final long MAX_WAIT_TIME = TimeUnit.NANOSECONDS.convert(300, TimeUnit.SECONDS);
 
   public RollingRestartTest() {
-    fixShardCount = true;
     sliceCount = 2;
-    shardCount = TEST_NIGHTLY ? 16 : 2;
+    fixShardCount(TEST_NIGHTLY ? 16 : 2);
   }
 
-  @Before
   @Override
-  public void setUp() throws Exception {
-    super.setUp();
+  public void distribSetUp() throws Exception {
+    super.distribSetUp();
     System.setProperty("numShards", Integer.toString(sliceCount));
     useFactory("solr.StandardDirectoryFactory");
   }
 
   @Override
-  @After
-  public void tearDown() throws Exception {
+  public void distribTearDown() throws Exception {
     System.clearProperty("numShards");
-    super.tearDown();
-    resetExceptionIgnores();
+    super.distribTearDown();
   }
 
-  @Override
-  public void doTest() throws Exception {
+  @Test
+  public void test() throws Exception {
     waitForRecoveriesToFinish(false);
 
     restartWithRolesTest();
@@ -75,11 +70,11 @@ public class RollingRestartTest extends
     cloudClient.getZkStateReader().getZkClient().printLayoutToStdOut();
 
     int numDesignateOverseers = TEST_NIGHTLY ? 16 : 2;
-    numDesignateOverseers = Math.max(shardCount, numDesignateOverseers);
+    numDesignateOverseers = Math.max(getShardCount(), numDesignateOverseers);
     List<String> designates = new ArrayList<>();
     List<CloudJettyRunner> designateJettys = new ArrayList<>();
     for (int i = 0; i < numDesignateOverseers; i++) {
-      int n = random().nextInt(shardCount);
+      int n = random().nextInt(getShardCount());
       String nodeName = cloudJettys.get(n).nodeName;
       log.info("Chose {} as overseer designate", nodeName);
       invokeCollectionApi(CollectionParams.ACTION, CollectionParams.CollectionAction.ADDROLE.toLower(), "role", "overseer", "node", nodeName);

Modified: lucene/dev/branches/branch_5x/solr/core/src/test/org/apache/solr/cloud/SSLMigrationTest.java
URL: http://svn.apache.org/viewvc/lucene/dev/branches/branch_5x/solr/core/src/test/org/apache/solr/cloud/SSLMigrationTest.java?rev=1654300&r1=1654299&r2=1654300&view=diff
==============================================================================
--- lucene/dev/branches/branch_5x/solr/core/src/test/org/apache/solr/cloud/SSLMigrationTest.java (original)
+++ lucene/dev/branches/branch_5x/solr/core/src/test/org/apache/solr/cloud/SSLMigrationTest.java Fri Jan 23 18:36:18 2015
@@ -41,6 +41,7 @@ import org.apache.solr.common.params.Sol
 import org.apache.solr.util.SSLTestConfig;
 import org.apache.solr.SolrTestCaseJ4.SuppressSSL;
 import org.apache.lucene.util.LuceneTestCase.Slow;
+import org.junit.Test;
 
 /**
  * We want to make sure that when migrating between http and https modes the
@@ -51,9 +52,9 @@ import org.apache.lucene.util.LuceneTest
 @SuppressSSL
 @BadApple(bugUrl = "https://issues.apache.org/jira/browse/SOLR-6213")
 public class SSLMigrationTest extends AbstractFullDistribZkTestBase {
-  
-  @Override
-  public void doTest() throws Exception {
+
+  @Test
+  public void test() throws Exception {
     //Migrate from HTTP -> HTTPS -> HTTP
     assertReplicaInformation("http");
     testMigrateSSL(new SSLTestConfig(true, false));
@@ -118,4 +119,4 @@ public class SSLMigrationTest extends Ab
     new LBHttpSolrClient(urls.toArray(new String[]{})).request(request);
   }
   
-}
\ No newline at end of file
+}

Modified: lucene/dev/branches/branch_5x/solr/core/src/test/org/apache/solr/cloud/ShardRoutingCustomTest.java
URL: http://svn.apache.org/viewvc/lucene/dev/branches/branch_5x/solr/core/src/test/org/apache/solr/cloud/ShardRoutingCustomTest.java?rev=1654300&r1=1654299&r2=1654300&view=diff
==============================================================================
--- lucene/dev/branches/branch_5x/solr/core/src/test/org/apache/solr/cloud/ShardRoutingCustomTest.java (original)
+++ lucene/dev/branches/branch_5x/solr/core/src/test/org/apache/solr/cloud/ShardRoutingCustomTest.java Fri Jan 23 18:36:18 2015
@@ -18,6 +18,7 @@ package org.apache.solr.cloud;
  */
 
 import org.junit.BeforeClass;
+import org.junit.Test;
 
 
 public class ShardRoutingCustomTest extends AbstractFullDistribZkTestBase {
@@ -34,8 +35,8 @@ public class ShardRoutingCustomTest exte
     sliceCount = 0;
   }
 
-  @Override
-  public void doTest() throws Exception {
+  @Test
+  public void test() throws Exception {
     boolean testFinished = false;
     try {
       doCustomSharding();

Modified: lucene/dev/branches/branch_5x/solr/core/src/test/org/apache/solr/cloud/ShardRoutingTest.java
URL: http://svn.apache.org/viewvc/lucene/dev/branches/branch_5x/solr/core/src/test/org/apache/solr/cloud/ShardRoutingTest.java?rev=1654300&r1=1654299&r2=1654300&view=diff
==============================================================================
--- lucene/dev/branches/branch_5x/solr/core/src/test/org/apache/solr/cloud/ShardRoutingTest.java (original)
+++ lucene/dev/branches/branch_5x/solr/core/src/test/org/apache/solr/cloud/ShardRoutingTest.java Fri Jan 23 18:36:18 2015
@@ -23,6 +23,7 @@ import org.apache.solr.client.solrj.requ
 import org.apache.solr.client.solrj.response.QueryResponse;
 import org.apache.solr.common.params.ShardParams;
 import org.junit.BeforeClass;
+import org.junit.Test;
 
 import java.util.List;
 import java.util.Map;
@@ -49,8 +50,6 @@ public class ShardRoutingTest extends Ab
   public ShardRoutingTest() {
     schemaString = "schema15.xml";      // we need a string id
     super.sliceCount = 4;
-    super.shardCount = 8;
-    super.fixShardCount = true;  // we only want to test with exactly 4 slices.
 
     // from negative to positive, the upper bits of the hash ranges should be
     // shard1: top bits:10  80000000:bfffffff
@@ -92,8 +91,9 @@ public class ShardRoutingTest extends Ab
      ***/
   }
 
-  @Override
-  public void doTest() throws Exception {
+  @Test
+  @ShardsFixed(num = 8)
+  public void test() throws Exception {
     boolean testFinished = false;
     try {
       handle.clear();

Modified: lucene/dev/branches/branch_5x/solr/core/src/test/org/apache/solr/cloud/ShardSplitTest.java
URL: http://svn.apache.org/viewvc/lucene/dev/branches/branch_5x/solr/core/src/test/org/apache/solr/cloud/ShardSplitTest.java?rev=1654300&r1=1654299&r2=1654300&view=diff
==============================================================================
--- lucene/dev/branches/branch_5x/solr/core/src/test/org/apache/solr/cloud/ShardSplitTest.java (original)
+++ lucene/dev/branches/branch_5x/solr/core/src/test/org/apache/solr/cloud/ShardSplitTest.java Fri Jan 23 18:36:18 2015
@@ -39,8 +39,7 @@ import org.apache.solr.common.cloud.ZkNo
 import org.apache.solr.common.cloud.ZkStateReader;
 import org.apache.solr.common.params.CollectionParams;
 import org.apache.solr.common.params.ModifiableSolrParams;
-import org.junit.After;
-import org.junit.Before;
+import org.junit.Test;
 
 import java.io.IOException;
 import java.util.ArrayList;
@@ -66,33 +65,14 @@ public class ShardSplitTest extends Basi
   }
 
   @Override
-  @Before
-  public void setUp() throws Exception {
-    super.setUp();
+  public void distribSetUp() throws Exception {
+    super.distribSetUp();
     System.setProperty("numShards", Integer.toString(sliceCount));
     System.setProperty("solr.xml.persist", "true");
   }
 
-  @Override
-  @After
-  public void tearDown() throws Exception {
-    if (VERBOSE || printLayoutOnTearDown) {
-      super.printLayout();
-    }
-    if (controlClient != null) {
-      controlClient.shutdown();
-    }
-    if (cloudClient != null) {
-      cloudClient.shutdown();
-    }
-    if (controlClientCloud != null) {
-      controlClientCloud.shutdown();
-    }
-    super.tearDown();
-  }
-
-  @Override
-  public void doTest() throws Exception {
+  @Test
+  public void test() throws Exception {
     waitForThingsToLevelOut(15);
 
     if (usually()) {

Modified: lucene/dev/branches/branch_5x/solr/core/src/test/org/apache/solr/cloud/SharedFSAutoReplicaFailoverTest.java
URL: http://svn.apache.org/viewvc/lucene/dev/branches/branch_5x/solr/core/src/test/org/apache/solr/cloud/SharedFSAutoReplicaFailoverTest.java?rev=1654300&r1=1654299&r2=1654300&view=diff
==============================================================================
--- lucene/dev/branches/branch_5x/solr/core/src/test/org/apache/solr/cloud/SharedFSAutoReplicaFailoverTest.java (original)
+++ lucene/dev/branches/branch_5x/solr/core/src/test/org/apache/solr/cloud/SharedFSAutoReplicaFailoverTest.java Fri Jan 23 18:36:18 2015
@@ -49,6 +49,7 @@ import org.apache.solr.util.DefaultSolrT
 import org.junit.AfterClass;
 import org.junit.Before;
 import org.junit.BeforeClass;
+import org.junit.Test;
 
 import static org.apache.solr.common.cloud.ZkNodeProps.makeMap;
 
@@ -80,10 +81,9 @@ public class SharedFSAutoReplicaFailover
     dfsCluster = null;
   }
   
-  @Before
   @Override
-  public void setUp() throws Exception {
-    super.setUp();
+  public void distribSetUp() throws Exception {
+    super.distribSetUp();
     useJettyDataDir = false;
     System.setProperty("solr.xml.persist", "true");
   }
@@ -94,18 +94,16 @@ public class SharedFSAutoReplicaFailover
 
   
   public SharedFSAutoReplicaFailoverTest() {
-    fixShardCount = true;
-    
     sliceCount = 2;
-    shardCount = 4;
     completionService = new ExecutorCompletionService<>(executor);
     pending = new HashSet<>();
     checkCreatedVsState = false;
     
   }
-  
-  @Override
-  public void doTest() throws Exception {
+
+  @Test
+  @ShardsFixed(num = 4)
+  public void test() throws Exception {
     try {
       testBasics();
     } finally {
@@ -238,8 +236,8 @@ public class SharedFSAutoReplicaFailover
   }
   
   @Override
-  public void tearDown() throws Exception {
-    super.tearDown();
+  public void distribTearDown() throws Exception {
+    super.distribTearDown();
     System.clearProperty("solr.xml.persist");
   }
 }

Modified: lucene/dev/branches/branch_5x/solr/core/src/test/org/apache/solr/cloud/SimpleCollectionCreateDeleteTest.java
URL: http://svn.apache.org/viewvc/lucene/dev/branches/branch_5x/solr/core/src/test/org/apache/solr/cloud/SimpleCollectionCreateDeleteTest.java?rev=1654300&r1=1654299&r2=1654300&view=diff
==============================================================================
--- lucene/dev/branches/branch_5x/solr/core/src/test/org/apache/solr/cloud/SimpleCollectionCreateDeleteTest.java (original)
+++ lucene/dev/branches/branch_5x/solr/core/src/test/org/apache/solr/cloud/SimpleCollectionCreateDeleteTest.java Fri Jan 23 18:36:18 2015
@@ -22,17 +22,17 @@ import org.apache.solr.client.solrj.requ
 import org.apache.solr.common.cloud.ZkStateReader;
 import org.apache.solr.common.params.ModifiableSolrParams;
 import org.apache.solr.common.util.NamedList;
+import org.junit.Test;
 
 public class SimpleCollectionCreateDeleteTest extends AbstractFullDistribZkTestBase {
 
   public SimpleCollectionCreateDeleteTest() {
-    fixShardCount = true;
     sliceCount = 1;
-    shardCount = 1;
   }
 
-  @Override
-  public void doTest() throws Exception {
+  @Test
+  @ShardsFixed(num = 1)
+  public void test() throws Exception {
     String overseerNode = OverseerCollectionProcessor.getLeaderNode(cloudClient.getZkStateReader().getZkClient());
     String notOverseerNode = null;
     for (CloudJettyRunner cloudJetty : cloudJettys) {

Modified: lucene/dev/branches/branch_5x/solr/core/src/test/org/apache/solr/cloud/SyncSliceTest.java
URL: http://svn.apache.org/viewvc/lucene/dev/branches/branch_5x/solr/core/src/test/org/apache/solr/cloud/SyncSliceTest.java?rev=1654300&r1=1654299&r2=1654300&view=diff
==============================================================================
--- lucene/dev/branches/branch_5x/solr/core/src/test/org/apache/solr/cloud/SyncSliceTest.java (original)
+++ lucene/dev/branches/branch_5x/solr/core/src/test/org/apache/solr/cloud/SyncSliceTest.java Fri Jan 23 18:36:18 2015
@@ -32,10 +32,9 @@ import org.apache.solr.common.cloud.Slic
 import org.apache.solr.common.cloud.ZkStateReader;
 import org.apache.solr.common.params.CollectionParams.CollectionAction;
 import org.apache.solr.common.params.ModifiableSolrParams;
-import org.junit.After;
 import org.junit.AfterClass;
-import org.junit.Before;
 import org.junit.BeforeClass;
+import org.junit.Test;
 
 import java.io.IOException;
 import java.util.ArrayList;
@@ -61,33 +60,30 @@ public class SyncSliceTest extends Abstr
     
   }
   
-  @Before
   @Override
-  public void setUp() throws Exception {
-    super.setUp();
+  public void distribSetUp() throws Exception {
+    super.distribSetUp();
     // we expect this time of exception as shards go up and down...
     //ignoreException(".*");
     System.setProperty("numShards", Integer.toString(sliceCount));
   }
   
   @Override
-  @After
-  public void tearDown() throws Exception {
+  public void distribTearDown() throws Exception {
     if (!success) {
       printLayoutOnTearDown = true;
     }
-    super.tearDown();
-    resetExceptionIgnores();
+    super.distribTearDown();
   }
   
   public SyncSliceTest() {
     super();
     sliceCount = 1;
-    shardCount = TEST_NIGHTLY ? 7 : 4;
+    fixShardCount(TEST_NIGHTLY ? 7 : 4);
   }
-  
-  @Override
-  public void doTest() throws Exception {
+
+  @Test
+  public void test() throws Exception {
     
     handle.clear();
     handle.put("timestamp", SKIPVAL);
@@ -160,7 +156,7 @@ public class SyncSliceTest extends Abstr
     Set<CloudJettyRunner> jetties = new HashSet<>();
     jetties.addAll(shardToJetty.get("shard1"));
     jetties.remove(leaderJetty);
-    assertEquals(shardCount - 1, jetties.size());
+    assertEquals(getShardCount() - 1, jetties.size());
     
     chaosMonkey.killJetty(leaderJetty);
     
@@ -224,7 +220,7 @@ public class SyncSliceTest extends Abstr
     jetties = new HashSet<>();
     jetties.addAll(shardToJetty.get("shard1"));
     jetties.remove(leaderJetty);
-    assertEquals(shardCount - 1, jetties.size());
+    assertEquals(getShardCount() - 1, jetties.size());
 
     
     // kill the current leader

Modified: lucene/dev/branches/branch_5x/solr/core/src/test/org/apache/solr/cloud/TestCloudPivotFacet.java
URL: http://svn.apache.org/viewvc/lucene/dev/branches/branch_5x/solr/core/src/test/org/apache/solr/cloud/TestCloudPivotFacet.java?rev=1654300&r1=1654299&r2=1654300&view=diff
==============================================================================
--- lucene/dev/branches/branch_5x/solr/core/src/test/org/apache/solr/cloud/TestCloudPivotFacet.java (original)
+++ lucene/dev/branches/branch_5x/solr/core/src/test/org/apache/solr/cloud/TestCloudPivotFacet.java Fri Jan 23 18:36:18 2015
@@ -16,8 +16,6 @@
  */
 package org.apache.solr.cloud;
 
-import org.apache.commons.collections.CollectionUtils;
-import org.apache.lucene.util.CollectionUtil;
 import org.apache.lucene.util.TestUtil;
 import org.apache.solr.SolrTestCaseJ4.SuppressSSL;
 import org.apache.solr.client.solrj.SolrServerException;
@@ -38,6 +36,7 @@ import org.apache.commons.lang.StringUti
 
 import org.junit.BeforeClass;
 
+import org.junit.Test;
 import org.slf4j.Logger;
 import org.slf4j.LoggerFactory;
 
@@ -95,8 +94,8 @@ public class TestCloudPivotFacet extends
     log.info("init'ing useFieldRandomizedFactor = {}", useFieldRandomizedFactor);
   }
 
-  @Override
-  public void doTest() throws Exception {
+  @Test
+  public void test() throws Exception {
 
     sanityCheckAssertDoubles();
 

Modified: lucene/dev/branches/branch_5x/solr/core/src/test/org/apache/solr/cloud/TestCollectionAPI.java
URL: http://svn.apache.org/viewvc/lucene/dev/branches/branch_5x/solr/core/src/test/org/apache/solr/cloud/TestCollectionAPI.java?rev=1654300&r1=1654299&r2=1654300&view=diff
==============================================================================
--- lucene/dev/branches/branch_5x/solr/core/src/test/org/apache/solr/cloud/TestCollectionAPI.java (original)
+++ lucene/dev/branches/branch_5x/solr/core/src/test/org/apache/solr/cloud/TestCollectionAPI.java Fri Jan 23 18:36:18 2015
@@ -33,7 +33,7 @@ import org.apache.solr.common.params.Mod
 import org.apache.solr.common.params.ShardParams;
 import org.apache.solr.common.util.NamedList;
 import org.apache.zookeeper.KeeperException;
-import org.junit.Before;
+import org.junit.Test;
 
 import static org.apache.solr.cloud.OverseerCollectionProcessor.SHARD_UNIQUE;
 
@@ -54,16 +54,14 @@ public class TestCollectionAPI extends R
   }
 
   @Override
-  @Before
-  public void setUp() throws Exception {
-    fixShardCount = true;
+  public void distribSetUp() throws Exception {
     sliceCount = 2;
-    shardCount = 2;
-    super.setUp();
+    super.distribSetUp();
   }
 
-  @Override
-  public void doTest() throws Exception {
+  @Test
+  @ShardsFixed(num = 2)
+  public void test() throws Exception {
     CloudSolrClient client = createCloudClient(null);
     try {
       createCollection(null, COLLECTION_NAME, 2, 2, 2, client, null, "conf1");

Modified: lucene/dev/branches/branch_5x/solr/core/src/test/org/apache/solr/cloud/TestDistribDocBasedVersion.java
URL: http://svn.apache.org/viewvc/lucene/dev/branches/branch_5x/solr/core/src/test/org/apache/solr/cloud/TestDistribDocBasedVersion.java?rev=1654300&r1=1654299&r2=1654300&view=diff
==============================================================================
--- lucene/dev/branches/branch_5x/solr/core/src/test/org/apache/solr/cloud/TestDistribDocBasedVersion.java (original)
+++ lucene/dev/branches/branch_5x/solr/core/src/test/org/apache/solr/cloud/TestDistribDocBasedVersion.java Fri Jan 23 18:36:18 2015
@@ -24,6 +24,7 @@ import org.apache.solr.common.SolrDocume
 import org.apache.solr.common.SolrException;
 import org.apache.solr.common.util.StrUtils;
 import org.junit.BeforeClass;
+import org.junit.Test;
 
 import java.util.HashMap;
 import java.util.HashSet;
@@ -53,8 +54,6 @@ public class TestDistribDocBasedVersion
   public TestDistribDocBasedVersion() {
     schemaString = "schema15.xml";      // we need a string id
     super.sliceCount = 2;
-    super.shardCount = 4;
-    super.fixShardCount = true;  // we only want to test with exactly 2 slices.
 
 
     /***
@@ -87,8 +86,9 @@ public class TestDistribDocBasedVersion
      ***/
   }
 
-  @Override
-  public void doTest() throws Exception {
+  @Test
+  @ShardsFixed(num = 4)
+  public void test() throws Exception {
     boolean testFinished = false;
     try {
       handle.clear();
@@ -346,10 +346,4 @@ public class TestDistribDocBasedVersion
     req.setParams(params(reqParams));
     req.process(cloudClient);
   }
-
-  @Override
-  public void tearDown() throws Exception {
-    super.tearDown();
-  }
-
 }

Modified: lucene/dev/branches/branch_5x/solr/core/src/test/org/apache/solr/cloud/TestRebalanceLeaders.java
URL: http://svn.apache.org/viewvc/lucene/dev/branches/branch_5x/solr/core/src/test/org/apache/solr/cloud/TestRebalanceLeaders.java?rev=1654300&r1=1654299&r2=1654300&view=diff
==============================================================================
--- lucene/dev/branches/branch_5x/solr/core/src/test/org/apache/solr/cloud/TestRebalanceLeaders.java (original)
+++ lucene/dev/branches/branch_5x/solr/core/src/test/org/apache/solr/cloud/TestRebalanceLeaders.java Fri Jan 23 18:36:18 2015
@@ -34,7 +34,7 @@ import org.apache.solr.common.params.Col
 import org.apache.solr.common.params.ModifiableSolrParams;
 import org.apache.solr.common.util.NamedList;
 import org.apache.zookeeper.KeeperException;
-import org.junit.Before;
+import org.junit.Test;
 
 
 public class TestRebalanceLeaders extends AbstractFullDistribZkTestBase {
@@ -43,15 +43,7 @@ public class TestRebalanceLeaders extend
 
   public TestRebalanceLeaders() {
     schemaString = "schema15.xml";      // we need a string id
-  }
-
-  @Override
-  @Before
-  public void setUp() throws Exception {
-    fixShardCount = true;
     sliceCount = 4;
-    shardCount = 4;
-    super.setUp();
   }
 
   int reps = 10;
@@ -61,8 +53,9 @@ public class TestRebalanceLeaders extend
   Map<String, Replica> expected = new HashMap<>();
 
 
-  @Override
-  public void doTest() throws Exception {
+  @Test
+  @ShardsFixed(num = 4)
+  public void test() throws Exception {
     CloudSolrClient client = createCloudClient(null);
     reps = random().nextInt(9) + 1; // make sure and do at least one.
     try {

Modified: lucene/dev/branches/branch_5x/solr/core/src/test/org/apache/solr/cloud/TestReplicaProperties.java
URL: http://svn.apache.org/viewvc/lucene/dev/branches/branch_5x/solr/core/src/test/org/apache/solr/cloud/TestReplicaProperties.java?rev=1654300&r1=1654299&r2=1654300&view=diff
==============================================================================
--- lucene/dev/branches/branch_5x/solr/core/src/test/org/apache/solr/cloud/TestReplicaProperties.java (original)
+++ lucene/dev/branches/branch_5x/solr/core/src/test/org/apache/solr/cloud/TestReplicaProperties.java Fri Jan 23 18:36:18 2015
@@ -36,7 +36,7 @@ import org.apache.solr.common.params.Col
 import org.apache.solr.common.params.ModifiableSolrParams;
 import org.apache.solr.common.util.NamedList;
 import org.apache.zookeeper.KeeperException;
-import org.junit.Before;
+import org.junit.Test;
 
 @Slow
 public class TestReplicaProperties extends ReplicaPropertiesBase {
@@ -45,19 +45,12 @@ public class TestReplicaProperties exten
 
   public TestReplicaProperties() {
     schemaString = "schema15.xml";      // we need a string id
-  }
-
-  @Override
-  @Before
-  public void setUp() throws Exception {
-    fixShardCount = true;
     sliceCount = 2;
-    shardCount = 4;
-    super.setUp();
   }
 
-  @Override
-  public void doTest() throws Exception {
+  @Test
+  @ShardsFixed(num = 4)
+  public void test() throws Exception {
     CloudSolrClient client = createCloudClient(null);
     try {
       // Mix up a bunch of different combinations of shards and replicas in order to exercise boundary cases.

Modified: lucene/dev/branches/branch_5x/solr/core/src/test/org/apache/solr/cloud/TestRequestStatusCollectionAPI.java
URL: http://svn.apache.org/viewvc/lucene/dev/branches/branch_5x/solr/core/src/test/org/apache/solr/cloud/TestRequestStatusCollectionAPI.java?rev=1654300&r1=1654299&r2=1654300&view=diff
==============================================================================
--- lucene/dev/branches/branch_5x/solr/core/src/test/org/apache/solr/cloud/TestRequestStatusCollectionAPI.java (original)
+++ lucene/dev/branches/branch_5x/solr/core/src/test/org/apache/solr/cloud/TestRequestStatusCollectionAPI.java Fri Jan 23 18:36:18 2015
@@ -24,7 +24,7 @@ import org.apache.solr.client.solrj.requ
 import org.apache.solr.common.params.CollectionParams;
 import org.apache.solr.common.params.ModifiableSolrParams;
 import org.apache.solr.common.util.NamedList;
-import org.junit.Before;
+import org.junit.Test;
 
 import java.io.IOException;
 
@@ -36,14 +36,8 @@ public class TestRequestStatusCollection
     schemaString = "schema15.xml";      // we need a string id
   }
 
-  @Override
-  @Before
-  public void setUp() throws Exception {
-    super.setUp();
-
-  }
-
-  public void doTest() {
+  @Test
+  public void test() throws Exception {
     ModifiableSolrParams params = new ModifiableSolrParams();
 
     params.set(CollectionParams.ACTION, CollectionParams.CollectionAction.CREATE.toString());

Modified: lucene/dev/branches/branch_5x/solr/core/src/test/org/apache/solr/cloud/TestShortCircuitedRequests.java
URL: http://svn.apache.org/viewvc/lucene/dev/branches/branch_5x/solr/core/src/test/org/apache/solr/cloud/TestShortCircuitedRequests.java?rev=1654300&r1=1654299&r2=1654300&view=diff
==============================================================================
--- lucene/dev/branches/branch_5x/solr/core/src/test/org/apache/solr/cloud/TestShortCircuitedRequests.java (original)
+++ lucene/dev/branches/branch_5x/solr/core/src/test/org/apache/solr/cloud/TestShortCircuitedRequests.java Fri Jan 23 18:36:18 2015
@@ -23,18 +23,18 @@ import org.apache.solr.client.solrj.resp
 import org.apache.solr.common.cloud.Replica;
 import org.apache.solr.common.params.ShardParams;
 import org.apache.solr.common.util.NamedList;
+import org.junit.Test;
 
 public class TestShortCircuitedRequests extends AbstractFullDistribZkTestBase {
 
   public TestShortCircuitedRequests() {
     schemaString = "schema15.xml";      // we need a string id
     super.sliceCount = 4;
-    super.shardCount = 4;
-    super.fixShardCount = true;  // we only want to test with exactly 4 slices.
   }
 
-  @Override
-  public void doTest() throws Exception {
+  @Test
+  @ShardsFixed(num = 4)
+  public void test() throws Exception {
     waitForRecoveriesToFinish(false);
     assertEquals(4, cloudClient.getZkStateReader().getClusterState().getCollection(DEFAULT_COLLECTION).getSlices().size());
     index("id", "a!doc1");  // shard3

Modified: lucene/dev/branches/branch_5x/solr/core/src/test/org/apache/solr/cloud/TriLevelCompositeIdRoutingTest.java
URL: http://svn.apache.org/viewvc/lucene/dev/branches/branch_5x/solr/core/src/test/org/apache/solr/cloud/TriLevelCompositeIdRoutingTest.java?rev=1654300&r1=1654299&r2=1654300&view=diff
==============================================================================
--- lucene/dev/branches/branch_5x/solr/core/src/test/org/apache/solr/cloud/TriLevelCompositeIdRoutingTest.java (original)
+++ lucene/dev/branches/branch_5x/solr/core/src/test/org/apache/solr/cloud/TriLevelCompositeIdRoutingTest.java Fri Jan 23 18:36:18 2015
@@ -21,6 +21,7 @@ import org.apache.lucene.util.LuceneTest
 import org.apache.solr.client.solrj.response.QueryResponse;
 import org.apache.solr.common.SolrDocument;
 import org.junit.BeforeClass;
+import org.junit.Test;
 
 import java.util.HashMap;
 import java.util.HashSet;
@@ -47,14 +48,12 @@ public class TriLevelCompositeIdRoutingT
 
   public TriLevelCompositeIdRoutingTest() {
     schemaString = "schema15.xml";      // we need a string id
-    super.sliceCount = TEST_NIGHTLY ? 12 : 2;             // a lot of slices for more ranges and buckets
-    super.shardCount = TEST_NIGHTLY ? 24 : 3;
-    super.fixShardCount = true;
-
+    sliceCount = TEST_NIGHTLY ? 12 : 2;             // a lot of slices for more ranges and buckets
+    fixShardCount(TEST_NIGHTLY ? 24 : 3);
   }
 
-  @Override
-  public void doTest() throws Exception {
+  @Test
+  public void test() throws Exception {
     boolean testFinished = false;
     try {
       handle.clear();
@@ -74,7 +73,6 @@ public class TriLevelCompositeIdRoutingT
     }
   }
 
-
   private void doTriLevelHashingTest() throws Exception {
     log.info("### STARTING doTriLevelHashingTest");
     // for now,  we know how ranges will be distributed to shards.
@@ -153,10 +151,4 @@ public class TriLevelCompositeIdRoutingT
   private String getKey(String id) {
     return id.substring(0, id.lastIndexOf('!'));
   }
-
-  @Override
-  public void tearDown() throws Exception {
-    super.tearDown();
-  }
-
 }

Modified: lucene/dev/branches/branch_5x/solr/core/src/test/org/apache/solr/cloud/UnloadDistributedZkTest.java
URL: http://svn.apache.org/viewvc/lucene/dev/branches/branch_5x/solr/core/src/test/org/apache/solr/cloud/UnloadDistributedZkTest.java?rev=1654300&r1=1654299&r2=1654300&view=diff
==============================================================================
--- lucene/dev/branches/branch_5x/solr/core/src/test/org/apache/solr/cloud/UnloadDistributedZkTest.java (original)
+++ lucene/dev/branches/branch_5x/solr/core/src/test/org/apache/solr/cloud/UnloadDistributedZkTest.java Fri Jan 23 18:36:18 2015
@@ -31,8 +31,7 @@ import org.apache.solr.common.cloud.ZkSt
 import org.apache.solr.common.params.ModifiableSolrParams;
 import org.apache.solr.update.DirectUpdateHandler2;
 import org.apache.solr.util.DefaultSolrThreadFactory;
-import org.junit.Before;
-import org.junit.BeforeClass;
+import org.junit.Test;
 
 import java.io.File;
 import java.io.IOException;
@@ -48,17 +47,6 @@ import java.util.concurrent.TimeUnit;
 @Slow
 @SuppressSSL(bugUrl = "https://issues.apache.org/jira/browse/SOLR-5776")
 public class UnloadDistributedZkTest extends BasicDistributedZkTest {
-  
-  @BeforeClass
-  public static void beforeThisClass3() throws Exception {
- 
-  }
-  
-  @Before
-  @Override
-  public void setUp() throws Exception {
-    super.setUp();
-  }
 
   protected String getSolrXml() {
     return "solr-no-core.xml";
@@ -68,9 +56,9 @@ public class UnloadDistributedZkTest ext
     super();
     checkCreatedVsState = false;
   }
-  
-  @Override
-  public void doTest() throws Exception {
+
+  @Test
+  public void test() throws Exception {
     
     testCoreUnloadAndLeaders(); // long
     testUnloadLotsOfCores(); // long
@@ -427,13 +415,4 @@ public class UnloadDistributedZkTest ext
     executor.awaitTermination(120, TimeUnit.SECONDS);
     adminClient.shutdown();
   }
-
-
-
-
-  
-  @Override
-  public void tearDown() throws Exception {
-    super.tearDown();
-  }
 }

Modified: lucene/dev/branches/branch_5x/solr/core/src/test/org/apache/solr/cloud/hdfs/HdfsChaosMonkeySafeLeaderTest.java
URL: http://svn.apache.org/viewvc/lucene/dev/branches/branch_5x/solr/core/src/test/org/apache/solr/cloud/hdfs/HdfsChaosMonkeySafeLeaderTest.java?rev=1654300&r1=1654299&r2=1654300&view=diff
==============================================================================
--- lucene/dev/branches/branch_5x/solr/core/src/test/org/apache/solr/cloud/hdfs/HdfsChaosMonkeySafeLeaderTest.java (original)
+++ lucene/dev/branches/branch_5x/solr/core/src/test/org/apache/solr/cloud/hdfs/HdfsChaosMonkeySafeLeaderTest.java Fri Jan 23 18:36:18 2015
@@ -23,7 +23,6 @@ import org.apache.hadoop.hdfs.MiniDFSClu
 import org.apache.lucene.util.LuceneTestCase.Slow;
 import org.apache.solr.cloud.ChaosMonkeySafeLeaderTest;
 import org.junit.AfterClass;
-import org.junit.Before;
 import org.junit.BeforeClass;
 
 import com.carrotsearch.randomizedtesting.annotations.Nightly;
@@ -47,10 +46,9 @@ public class HdfsChaosMonkeySafeLeaderTe
     dfsCluster = null;
   }
   
-  @Before
   @Override
-  public void setUp() throws Exception {
-    super.setUp();
+  public void distribSetUp() throws Exception {
+    super.distribSetUp();
     
     // super class may hard code directory
     useFactory("org.apache.solr.core.HdfsDirectoryFactory");

Modified: lucene/dev/branches/branch_5x/solr/core/src/test/org/apache/solr/cloud/hdfs/HdfsSyncSliceTest.java
URL: http://svn.apache.org/viewvc/lucene/dev/branches/branch_5x/solr/core/src/test/org/apache/solr/cloud/hdfs/HdfsSyncSliceTest.java?rev=1654300&r1=1654299&r2=1654300&view=diff
==============================================================================
--- lucene/dev/branches/branch_5x/solr/core/src/test/org/apache/solr/cloud/hdfs/HdfsSyncSliceTest.java (original)
+++ lucene/dev/branches/branch_5x/solr/core/src/test/org/apache/solr/cloud/hdfs/HdfsSyncSliceTest.java Fri Jan 23 18:36:18 2015
@@ -23,7 +23,6 @@ import org.apache.hadoop.hdfs.MiniDFSClu
 import org.apache.lucene.util.LuceneTestCase.Slow;
 import org.apache.solr.cloud.SyncSliceTest;
 import org.junit.AfterClass;
-import org.junit.Before;
 import org.junit.BeforeClass;
 
 import com.carrotsearch.randomizedtesting.annotations.Nightly;
@@ -46,14 +45,7 @@ public class HdfsSyncSliceTest extends S
     HdfsTestUtil.teardownClass(dfsCluster);
     dfsCluster = null;
   }
-  
-  @Before
-  @Override
-  public void setUp() throws Exception {
-    super.setUp();
-  }
 
-  
   @Override
   protected String getDataDir(String dataDir) throws IOException {
     return HdfsTestUtil.getDataDir(dfsCluster, dataDir);

Modified: lucene/dev/branches/branch_5x/solr/core/src/test/org/apache/solr/cloud/hdfs/HdfsWriteToMultipleCollectionsTest.java
URL: http://svn.apache.org/viewvc/lucene/dev/branches/branch_5x/solr/core/src/test/org/apache/solr/cloud/hdfs/HdfsWriteToMultipleCollectionsTest.java?rev=1654300&r1=1654299&r2=1654300&view=diff
==============================================================================
--- lucene/dev/branches/branch_5x/solr/core/src/test/org/apache/solr/cloud/hdfs/HdfsWriteToMultipleCollectionsTest.java (original)
+++ lucene/dev/branches/branch_5x/solr/core/src/test/org/apache/solr/cloud/hdfs/HdfsWriteToMultipleCollectionsTest.java Fri Jan 23 18:36:18 2015
@@ -40,6 +40,7 @@ import org.apache.solr.store.blockcache.
 import org.apache.solr.util.RefCounted;
 import org.junit.AfterClass;
 import org.junit.BeforeClass;
+import org.junit.Test;
 
 import java.io.IOException;
 import java.util.ArrayList;
@@ -77,15 +78,15 @@ public class HdfsWriteToMultipleCollecti
   public HdfsWriteToMultipleCollectionsTest() {
     super();
     sliceCount = 1;
-    shardCount = 3;
+    fixShardCount(3);
   }
   
   protected String getSolrXml() {
     return "solr-no-core.xml";
   }
-  
-  @Override
-  public void doTest() throws Exception {
+
+  @Test
+  public void test() throws Exception {
     int docCount = random().nextInt(1313) + 1;
     int cnt = random().nextInt(4) + 1;
     for (int i = 0; i < cnt; i++) {

Modified: lucene/dev/branches/branch_5x/solr/core/src/test/org/apache/solr/cloud/hdfs/StressHdfsTest.java
URL: http://svn.apache.org/viewvc/lucene/dev/branches/branch_5x/solr/core/src/test/org/apache/solr/cloud/hdfs/StressHdfsTest.java?rev=1654300&r1=1654299&r2=1654300&view=diff
==============================================================================
--- lucene/dev/branches/branch_5x/solr/core/src/test/org/apache/solr/cloud/hdfs/StressHdfsTest.java (original)
+++ lucene/dev/branches/branch_5x/solr/core/src/test/org/apache/solr/cloud/hdfs/StressHdfsTest.java Fri Jan 23 18:36:18 2015
@@ -48,6 +48,7 @@ import org.junit.BeforeClass;
 
 import com.carrotsearch.randomizedtesting.annotations.ThreadLeakScope;
 import com.carrotsearch.randomizedtesting.annotations.ThreadLeakScope.Scope;
+import org.junit.Test;
 
 @Slow
 @ThreadLeakScope(Scope.NONE) // hdfs client currently leaks thread(s)
@@ -80,16 +81,16 @@ public class StressHdfsTest extends Basi
   public StressHdfsTest() {
     super();
     sliceCount = 1;
-    shardCount = TEST_NIGHTLY ? 7 : random().nextInt(2) + 1;
+    fixShardCount(TEST_NIGHTLY ? 7 : random().nextInt(2) + 1);
     testRestartIntoSafeMode = random().nextBoolean();
   }
   
   protected String getSolrXml() {
     return "solr-no-core.xml";
   }
-  
-  @Override
-  public void doTest() throws Exception {
+
+  @Test
+  public void test() throws Exception {
     randomlyEnableAutoSoftCommit();
     
     int cnt = random().nextInt(2) + 1;
@@ -138,11 +139,11 @@ public class StressHdfsTest extends Basi
     int nShards;
     int maxReplicasPerNode;
     if (overshard) {
-      nShards = shardCount * 2;
+      nShards = getShardCount() * 2;
       maxReplicasPerNode = 8;
       rep = 1;
     } else {
-      nShards = shardCount / 2;
+      nShards = getShardCount() / 2;
       maxReplicasPerNode = 1;
       rep = 2;
       if (nShards == 0) nShards = 1;

Modified: lucene/dev/branches/branch_5x/solr/core/src/test/org/apache/solr/core/TestDynamicLoading.java
URL: http://svn.apache.org/viewvc/lucene/dev/branches/branch_5x/solr/core/src/test/org/apache/solr/core/TestDynamicLoading.java?rev=1654300&r1=1654299&r2=1654300&view=diff
==============================================================================
--- lucene/dev/branches/branch_5x/solr/core/src/test/org/apache/solr/core/TestDynamicLoading.java (original)
+++ lucene/dev/branches/branch_5x/solr/core/src/test/org/apache/solr/core/TestDynamicLoading.java Fri Jan 23 18:36:18 2015
@@ -26,7 +26,7 @@ import org.apache.solr.handler.TestBlobH
 import org.apache.solr.util.RESTfulServerProvider;
 import org.apache.solr.util.RestTestHarness;
 import org.apache.solr.util.SimplePostTool;
-import org.junit.After;
+import org.junit.Test;
 import org.slf4j.Logger;
 import org.slf4j.LoggerFactory;
 
@@ -57,21 +57,17 @@ public class TestDynamicLoading extends
     }
   }
 
-  @After
-  public void testDown() throws Exception {
-    super.tearDown();
+  @Override
+  public void distribTearDown() throws Exception {
+    super.distribTearDown();
     for (RestTestHarness r : restTestHarnesses) {
       r.close();
     }
   }
 
-  @Override
-  public void doTest() throws Exception {
-   setupHarnesses();
-   dynamicLoading();
-  }
-
-  private void dynamicLoading() throws Exception {
+  @Test
+  public void testDynamicLoading() throws Exception {
+    setupHarnesses();
     String payload = "{\n" +
         "'create-requesthandler' : { 'name' : '/test1', 'class': 'org.apache.solr.core.BlobStoreTestRequestHandler' , 'lib':'test','version':'1'}\n" +
         "}";

Modified: lucene/dev/branches/branch_5x/solr/core/src/test/org/apache/solr/handler/TestBlobHandler.java
URL: http://svn.apache.org/viewvc/lucene/dev/branches/branch_5x/solr/core/src/test/org/apache/solr/handler/TestBlobHandler.java?rev=1654300&r1=1654299&r2=1654300&view=diff
==============================================================================
--- lucene/dev/branches/branch_5x/solr/core/src/test/org/apache/solr/handler/TestBlobHandler.java (original)
+++ lucene/dev/branches/branch_5x/solr/core/src/test/org/apache/solr/handler/TestBlobHandler.java Fri Jan 23 18:36:18 2015
@@ -37,6 +37,7 @@ import org.apache.solr.common.cloud.ZkSt
 import org.apache.solr.core.ConfigOverlay;
 import org.apache.solr.update.DirectUpdateHandler2;
 import org.apache.solr.util.SimplePostTool;
+import org.junit.Test;
 import org.noggit.JSONParser;
 import org.noggit.ObjectBuilder;
 import org.slf4j.Logger;
@@ -48,17 +49,16 @@ import java.nio.ByteBuffer;
 import java.nio.charset.StandardCharsets;
 import java.text.MessageFormat;
 import java.util.Arrays;
-import java.util.Collections;
 import java.util.List;
 import java.util.Map;
-import java.util.concurrent.TimeUnit;
 
 import static org.apache.solr.core.ConfigOverlay.getObjectByPath;
 
 public class TestBlobHandler extends AbstractFullDistribZkTestBase {
   static final Logger log =  LoggerFactory.getLogger(TestBlobHandler.class);
 
-  private void doBlobHandlerTest() throws Exception {
+  @Test
+  public void doBlobHandlerTest() throws Exception {
     SolrClient client = createNewSolrClient("", getBaseUrl((HttpSolrClient) clients.get(0)));
     try {
       CollectionAdminResponse response1;
@@ -116,8 +116,8 @@ public class TestBlobHandler extends Abs
   }
 
   @Override
-  public void tearDown() throws Exception {
-    super.tearDown();
+  public void distribTearDown() throws Exception {
+    super.distribTearDown();
     System.clearProperty("numShards");
     System.clearProperty("zkHost");
 
@@ -194,10 +194,4 @@ public class TestBlobHandler extends Abs
       httpPost.releaseConnection();
     }
   }
-
-  @Override
-  public void doTest() throws Exception {
-    doBlobHandlerTest();
-
-  }
 }

Modified: lucene/dev/branches/branch_5x/solr/core/src/test/org/apache/solr/handler/TestConfigReload.java
URL: http://svn.apache.org/viewvc/lucene/dev/branches/branch_5x/solr/core/src/test/org/apache/solr/handler/TestConfigReload.java?rev=1654300&r1=1654299&r2=1654300&view=diff
==============================================================================
--- lucene/dev/branches/branch_5x/solr/core/src/test/org/apache/solr/handler/TestConfigReload.java (original)
+++ lucene/dev/branches/branch_5x/solr/core/src/test/org/apache/solr/handler/TestConfigReload.java Fri Jan 23 18:36:18 2015
@@ -47,7 +47,7 @@ import org.apache.solr.util.RestTestHarn
 import org.apache.zookeeper.CreateMode;
 import org.apache.zookeeper.KeeperException;
 import org.apache.zookeeper.data.Stat;
-import org.junit.After;
+import org.junit.Test;
 import org.noggit.JSONParser;
 import org.noggit.ObjectBuilder;
 import org.slf4j.Logger;
@@ -71,16 +71,16 @@ public class TestConfigReload extends Ab
     }
   }
   
-  @After
-  public void tearDown() throws Exception {
-    super.tearDown();
+  @Override
+  public void distribTearDown() throws Exception {
+    super.distribTearDown();
     for (RestTestHarness h : restTestHarnesses) {
       h.close();
     }
   }
 
-  @Override
-  public void doTest() throws Exception {
+  @Test
+  public void test() throws Exception {
     setupHarnesses();
     try {
       reloadTest();

Modified: lucene/dev/branches/branch_5x/solr/core/src/test/org/apache/solr/handler/TestSolrConfigHandlerCloud.java
URL: http://svn.apache.org/viewvc/lucene/dev/branches/branch_5x/solr/core/src/test/org/apache/solr/handler/TestSolrConfigHandlerCloud.java?rev=1654300&r1=1654299&r2=1654300&view=diff
==============================================================================
--- lucene/dev/branches/branch_5x/solr/core/src/test/org/apache/solr/handler/TestSolrConfigHandlerCloud.java (original)
+++ lucene/dev/branches/branch_5x/solr/core/src/test/org/apache/solr/handler/TestSolrConfigHandlerCloud.java Fri Jan 23 18:36:18 2015
@@ -20,7 +20,6 @@ package org.apache.solr.handler;
 
 import java.text.MessageFormat;
 import java.util.ArrayList;
-import java.util.Arrays;
 import java.util.List;
 import java.util.Map;
 import java.util.Objects;
@@ -37,7 +36,7 @@ import org.apache.solr.core.RequestParam
 import org.apache.solr.core.TestSolrConfigHandler;
 import org.apache.solr.util.RESTfulServerProvider;
 import org.apache.solr.util.RestTestHarness;
-import org.junit.After;
+import org.junit.Test;
 import org.slf4j.Logger;
 import org.slf4j.LoggerFactory;
 
@@ -59,17 +58,17 @@ public class TestSolrConfigHandlerCloud
       restTestHarnesses.add(harness);
     }
   }
-  
-  @After
-  public void tearDown() throws Exception {
-    super.tearDown();
+
+  @Override
+  public void distribTearDown() throws Exception {
+    super.distribTearDown();
     for (RestTestHarness r : restTestHarnesses) {
       r.close();
     }
   }
 
-  @Override
-  public void doTest() throws Exception {
+  @Test
+  public void test() throws Exception {
     setupHarnesses();
     testReqHandlerAPIs();
     testReqParams();

Modified: lucene/dev/branches/branch_5x/solr/core/src/test/org/apache/solr/handler/TestSolrConfigHandlerConcurrent.java
URL: http://svn.apache.org/viewvc/lucene/dev/branches/branch_5x/solr/core/src/test/org/apache/solr/handler/TestSolrConfigHandlerConcurrent.java?rev=1654300&r1=1654299&r2=1654300&view=diff
==============================================================================
--- lucene/dev/branches/branch_5x/solr/core/src/test/org/apache/solr/handler/TestSolrConfigHandlerConcurrent.java (original)
+++ lucene/dev/branches/branch_5x/solr/core/src/test/org/apache/solr/handler/TestSolrConfigHandlerConcurrent.java Fri Jan 23 18:36:18 2015
@@ -47,7 +47,7 @@ import org.apache.solr.common.cloud.ZkSt
 import org.apache.solr.core.ConfigOverlay;
 import org.apache.solr.util.RESTfulServerProvider;
 import org.apache.solr.util.RestTestHarness;
-import org.junit.After;
+import org.junit.Test;
 import org.noggit.JSONParser;
 import org.noggit.ObjectBuilder;
 import org.slf4j.Logger;
@@ -71,17 +71,17 @@ public class TestSolrConfigHandlerConcur
       restTestHarnesses.add(harness);
     }
   }
-  
-  @After
-  public void tearDown() throws Exception {
-    super.tearDown();
+
+  @Override
+  public void distribTearDown() throws Exception {
+    super.distribTearDown();
     for (RestTestHarness h : restTestHarnesses) {
       h.close();
     }
   }
 
-  @Override
-  public void doTest() throws Exception {
+  @Test
+  public void test() throws Exception {
     Map editable_prop_map = (Map) new ObjectBuilder(new JSONParser(new StringReader(
         ConfigOverlay.MAPPING))).getObject();
     Map caches = (Map) editable_prop_map.get("query");

Modified: lucene/dev/branches/branch_5x/solr/core/src/test/org/apache/solr/handler/component/DistributedExpandComponentTest.java
URL: http://svn.apache.org/viewvc/lucene/dev/branches/branch_5x/solr/core/src/test/org/apache/solr/handler/component/DistributedExpandComponentTest.java?rev=1654300&r1=1654299&r2=1654300&view=diff
==============================================================================
--- lucene/dev/branches/branch_5x/solr/core/src/test/org/apache/solr/handler/component/DistributedExpandComponentTest.java (original)
+++ lucene/dev/branches/branch_5x/solr/core/src/test/org/apache/solr/handler/component/DistributedExpandComponentTest.java Fri Jan 23 18:36:18 2015
@@ -21,12 +21,10 @@ import org.apache.solr.BaseDistributedSe
 import org.apache.solr.client.solrj.response.QueryResponse;
 import org.apache.solr.common.SolrDocument;
 import org.apache.solr.common.SolrDocumentList;
-import org.apache.solr.common.params.CommonParams;
 import org.apache.solr.common.params.ModifiableSolrParams;
-import org.apache.solr.common.util.NamedList;
 import org.junit.BeforeClass;
+import org.junit.Test;
 
-import java.nio.ByteBuffer;
 import java.util.Map;
 import java.util.Iterator;
 
@@ -38,8 +36,6 @@ import java.util.Iterator;
 public class DistributedExpandComponentTest extends BaseDistributedSearchTestCase {
 
   public DistributedExpandComponentTest() {
-    fixShardCount = true;
-    shardCount = 3;
     stress = 0;
   }
 
@@ -48,8 +44,9 @@ public class DistributedExpandComponentT
     initCore("solrconfig-collapseqparser.xml", "schema11.xml");
   }
 
-  @Override
-  public void doTest() throws Exception {
+  @Test
+  @ShardsFixed(num = 3)
+  public void test() throws Exception {
     final String group = (random().nextBoolean() ? "group_s" : "group_s_dv");
     
     del("*:*");

Modified: lucene/dev/branches/branch_5x/solr/core/src/test/org/apache/solr/handler/component/DistributedFacetPivotLargeTest.java
URL: http://svn.apache.org/viewvc/lucene/dev/branches/branch_5x/solr/core/src/test/org/apache/solr/handler/component/DistributedFacetPivotLargeTest.java?rev=1654300&r1=1654299&r2=1654300&view=diff
==============================================================================
--- lucene/dev/branches/branch_5x/solr/core/src/test/org/apache/solr/handler/component/DistributedFacetPivotLargeTest.java (original)
+++ lucene/dev/branches/branch_5x/solr/core/src/test/org/apache/solr/handler/component/DistributedFacetPivotLargeTest.java Fri Jan 23 18:36:18 2015
@@ -32,18 +32,15 @@ import org.apache.solr.common.params.Fac
 import org.apache.solr.common.params.SolrParams;
 
 import junit.framework.AssertionFailedError;
+import org.junit.Test;
 
 public class DistributedFacetPivotLargeTest extends BaseDistributedSearchTestCase {
   
   public static final String SPECIAL = ""; 
 
-  public DistributedFacetPivotLargeTest() {
-    this.fixShardCount = true;
-    this.shardCount = 4; // we leave one empty as an edge case
-  }
-  
-  @Override
-  public void doTest() throws Exception {
+  @Test
+  @ShardsFixed(num = 4)
+  public void test() throws Exception {
     this.stress = 0 ;
     handle.clear();
     handle.put("QTime", SKIPVAL);

Modified: lucene/dev/branches/branch_5x/solr/core/src/test/org/apache/solr/handler/component/DistributedFacetPivotLongTailTest.java
URL: http://svn.apache.org/viewvc/lucene/dev/branches/branch_5x/solr/core/src/test/org/apache/solr/handler/component/DistributedFacetPivotLongTailTest.java?rev=1654300&r1=1654299&r2=1654300&view=diff
==============================================================================
--- lucene/dev/branches/branch_5x/solr/core/src/test/org/apache/solr/handler/component/DistributedFacetPivotLongTailTest.java (original)
+++ lucene/dev/branches/branch_5x/solr/core/src/test/org/apache/solr/handler/component/DistributedFacetPivotLongTailTest.java Fri Jan 23 18:36:18 2015
@@ -26,6 +26,7 @@ import org.apache.solr.client.solrj.resp
 import org.apache.solr.common.params.FacetParams;
 import org.apache.solr.common.params.SolrParams;
 import org.apache.solr.common.params.ModifiableSolrParams;
+import org.junit.Test;
 
 /**
  * test demonstrating how overrequesting helps finds top-terms in the "long tail" 
@@ -39,11 +40,6 @@ import org.apache.solr.common.params.Mod
  */
 public class DistributedFacetPivotLongTailTest extends BaseDistributedSearchTestCase {
   
-  public DistributedFacetPivotLongTailTest(){
-    this.fixShardCount = true;
-    this.shardCount = 3;
-  }
-
   private int docNumber = 0;
   
   public int getDocNum() {
@@ -51,8 +47,9 @@ public class DistributedFacetPivotLongTa
     return docNumber;
   }
 
-  @Override
-  public void doTest() throws Exception {
+  @Test
+  @ShardsFixed(num = 3)
+  public void test() throws Exception {
 
     final SolrClient shard0 = clients.get(0);
     final SolrClient shard1 = clients.get(1);

Modified: lucene/dev/branches/branch_5x/solr/core/src/test/org/apache/solr/handler/component/DistributedFacetPivotSmallAdvancedTest.java
URL: http://svn.apache.org/viewvc/lucene/dev/branches/branch_5x/solr/core/src/test/org/apache/solr/handler/component/DistributedFacetPivotSmallAdvancedTest.java?rev=1654300&r1=1654299&r2=1654300&view=diff
==============================================================================
--- lucene/dev/branches/branch_5x/solr/core/src/test/org/apache/solr/handler/component/DistributedFacetPivotSmallAdvancedTest.java (original)
+++ lucene/dev/branches/branch_5x/solr/core/src/test/org/apache/solr/handler/component/DistributedFacetPivotSmallAdvancedTest.java Fri Jan 23 18:36:18 2015
@@ -25,6 +25,7 @@ import org.apache.solr.client.solrj.resp
 import org.apache.solr.common.params.FacetParams;
 import org.apache.solr.common.params.ModifiableSolrParams;
 import org.apache.solr.common.params.SolrParams;
+import org.junit.Test;
 
 import java.util.List;
 
@@ -37,13 +38,9 @@ import java.util.List;
  */
 public class DistributedFacetPivotSmallAdvancedTest extends BaseDistributedSearchTestCase {
 
-  public DistributedFacetPivotSmallAdvancedTest() {
-    this.fixShardCount = true;
-    this.shardCount = 2;
-  }
-
-  @Override
-  public void doTest() throws Exception {
+  @Test
+  @ShardsFixed(num = 2)
+  public void test() throws Exception {
 
     del("*:*");
     final SolrClient shard0 = clients.get(0);

Modified: lucene/dev/branches/branch_5x/solr/core/src/test/org/apache/solr/handler/component/DistributedFacetPivotSmallTest.java
URL: http://svn.apache.org/viewvc/lucene/dev/branches/branch_5x/solr/core/src/test/org/apache/solr/handler/component/DistributedFacetPivotSmallTest.java?rev=1654300&r1=1654299&r2=1654300&view=diff
==============================================================================
--- lucene/dev/branches/branch_5x/solr/core/src/test/org/apache/solr/handler/component/DistributedFacetPivotSmallTest.java (original)
+++ lucene/dev/branches/branch_5x/solr/core/src/test/org/apache/solr/handler/component/DistributedFacetPivotSmallTest.java Fri Jan 23 18:36:18 2015
@@ -32,16 +32,13 @@ import org.apache.solr.common.params.Sol
 import org.apache.solr.common.params.ModifiableSolrParams;
 
 import junit.framework.AssertionFailedError;
+import org.junit.Test;
 
 public class DistributedFacetPivotSmallTest extends BaseDistributedSearchTestCase {
-  
-  public DistributedFacetPivotSmallTest() {
-    this.fixShardCount = true;
-    this.shardCount = 4;
-  }
-  
-  @Override
-  public void doTest() throws Exception {
+
+  @Test
+  @ShardsFixed(num = 4)
+  public void test() throws Exception {
     
     del("*:*");
 

Modified: lucene/dev/branches/branch_5x/solr/core/src/test/org/apache/solr/handler/component/DistributedFacetPivotWhiteBoxTest.java
URL: http://svn.apache.org/viewvc/lucene/dev/branches/branch_5x/solr/core/src/test/org/apache/solr/handler/component/DistributedFacetPivotWhiteBoxTest.java?rev=1654300&r1=1654299&r2=1654300&view=diff
==============================================================================
--- lucene/dev/branches/branch_5x/solr/core/src/test/org/apache/solr/handler/component/DistributedFacetPivotWhiteBoxTest.java (original)
+++ lucene/dev/branches/branch_5x/solr/core/src/test/org/apache/solr/handler/component/DistributedFacetPivotWhiteBoxTest.java Fri Jan 23 18:36:18 2015
@@ -22,18 +22,15 @@ import org.apache.solr.client.solrj.resp
 import org.apache.solr.client.solrj.response.QueryResponse;
 import org.apache.solr.common.params.ModifiableSolrParams;
 import org.apache.solr.common.params.SolrParams;
+import org.junit.Test;
 
 import java.util.List;
 
 public class DistributedFacetPivotWhiteBoxTest extends BaseDistributedSearchTestCase {
 
-  public DistributedFacetPivotWhiteBoxTest() {
-    this.fixShardCount = true;
-    this.shardCount = 4;
-  }
-
-  @Override
-  public void doTest() throws Exception {
+  @Test
+  @ShardsFixed(num = 4)
+  public void test() throws Exception {
 
     del("*:*");
 

Modified: lucene/dev/branches/branch_5x/solr/core/src/test/org/apache/solr/handler/component/DistributedMLTComponentTest.java
URL: http://svn.apache.org/viewvc/lucene/dev/branches/branch_5x/solr/core/src/test/org/apache/solr/handler/component/DistributedMLTComponentTest.java?rev=1654300&r1=1654299&r2=1654300&view=diff
==============================================================================
--- lucene/dev/branches/branch_5x/solr/core/src/test/org/apache/solr/handler/component/DistributedMLTComponentTest.java (original)
+++ lucene/dev/branches/branch_5x/solr/core/src/test/org/apache/solr/handler/component/DistributedMLTComponentTest.java Fri Jan 23 18:36:18 2015
@@ -20,8 +20,8 @@ package org.apache.solr.handler.componen
 import org.apache.lucene.util.LuceneTestCase.Slow;
 import org.apache.solr.BaseDistributedSearchTestCase;
 import org.apache.solr.common.params.MoreLikeThisParams;
-import org.junit.BeforeClass;
 import org.junit.Ignore;
+import org.junit.Test;
 
 /**
  * Test for distributed MoreLikeThisComponent's 
@@ -38,29 +38,18 @@ public class DistributedMLTComponentTest
 
   public DistributedMLTComponentTest()
   {
-    fixShardCount=true;
-    shardCount=3;
     stress=0;
   }
 
-  @BeforeClass
-  public static void beforeClass() throws Exception {
-
-  }
-
   @Override
-  public void setUp() throws Exception {
+  public void distribSetUp() throws Exception {
     requestHandlerName = "mltrh";
-    super.setUp();
+    super.distribSetUp();
   }
   
-  @Override
-  public void tearDown() throws Exception {
-    super.tearDown();
-  }
-  
-  @Override
-  public void doTest() throws Exception {
+  @Test
+  @ShardsFixed(num = 3)
+  public void test() throws Exception {
     del("*:*");
     index(id, "1", "lowerfilt", "toyota");
     index(id, "2", "lowerfilt", "chevrolet");

Modified: lucene/dev/branches/branch_5x/solr/core/src/test/org/apache/solr/handler/component/DistributedQueryComponentCustomSortTest.java
URL: http://svn.apache.org/viewvc/lucene/dev/branches/branch_5x/solr/core/src/test/org/apache/solr/handler/component/DistributedQueryComponentCustomSortTest.java?rev=1654300&r1=1654299&r2=1654300&view=diff
==============================================================================
--- lucene/dev/branches/branch_5x/solr/core/src/test/org/apache/solr/handler/component/DistributedQueryComponentCustomSortTest.java (original)
+++ lucene/dev/branches/branch_5x/solr/core/src/test/org/apache/solr/handler/component/DistributedQueryComponentCustomSortTest.java Fri Jan 23 18:36:18 2015
@@ -19,9 +19,8 @@ package org.apache.solr.handler.componen
 
 import org.apache.solr.BaseDistributedSearchTestCase;
 import org.apache.solr.client.solrj.response.QueryResponse;
-import org.apache.solr.common.SolrDocument;
-import org.apache.solr.common.SolrDocumentList;
 import org.junit.BeforeClass;
+import org.junit.Test;
 
 import java.nio.ByteBuffer;
 
@@ -33,8 +32,6 @@ import java.nio.ByteBuffer;
 public class DistributedQueryComponentCustomSortTest extends BaseDistributedSearchTestCase {
 
   public DistributedQueryComponentCustomSortTest() {
-    fixShardCount = true;
-    shardCount = 3;
     stress = 0;
   }
 
@@ -43,8 +40,9 @@ public class DistributedQueryComponentCu
     initCore("solrconfig.xml", "schema-custom-field.xml");
   }
 
-  @Override
-  public void doTest() throws Exception {
+  @Test
+  @ShardsFixed(num = 3)
+  public void test() throws Exception {
     del("*:*");
 
     index(id, "1", "text", "a", "payload", ByteBuffer.wrap(new byte[] { 0x12, 0x62, 0x15 }),                     //  2 

Modified: lucene/dev/branches/branch_5x/solr/core/src/test/org/apache/solr/handler/component/DistributedQueryComponentOptimizationTest.java
URL: http://svn.apache.org/viewvc/lucene/dev/branches/branch_5x/solr/core/src/test/org/apache/solr/handler/component/DistributedQueryComponentOptimizationTest.java?rev=1654300&r1=1654299&r2=1654300&view=diff
==============================================================================
--- lucene/dev/branches/branch_5x/solr/core/src/test/org/apache/solr/handler/component/DistributedQueryComponentOptimizationTest.java (original)
+++ lucene/dev/branches/branch_5x/solr/core/src/test/org/apache/solr/handler/component/DistributedQueryComponentOptimizationTest.java Fri Jan 23 18:36:18 2015
@@ -20,11 +20,11 @@ package org.apache.solr.handler.componen
 import org.apache.solr.BaseDistributedSearchTestCase;
 import org.apache.solr.client.solrj.SolrServerException;
 import org.apache.solr.client.solrj.response.QueryResponse;
-import org.apache.solr.cloud.AbstractFullDistribZkTestBase;
 import org.apache.solr.common.params.ModifiableSolrParams;
 import org.apache.solr.common.params.ShardParams;
 import org.apache.solr.common.util.SimpleOrderedMap;
 import org.junit.BeforeClass;
+import org.junit.Test;
 
 import java.nio.ByteBuffer;
 import java.util.Map;
@@ -40,8 +40,6 @@ import java.util.Map;
 public class DistributedQueryComponentOptimizationTest extends BaseDistributedSearchTestCase {
 
   public DistributedQueryComponentOptimizationTest() {
-    fixShardCount = true;
-    shardCount = 3;
     stress = 0;
   }
 
@@ -50,8 +48,9 @@ public class DistributedQueryComponentOp
     initCore("solrconfig.xml", "schema-custom-field.xml");
   }
 
-  @Override
-  public void doTest() throws Exception {
+  @Test
+  @ShardsFixed(num = 3)
+  public void test() throws Exception {
     del("*:*");
 
     index(id, "1", "text", "a", "test_sS", "21", "payload", ByteBuffer.wrap(new byte[] { 0x12, 0x62, 0x15 }),                     //  2

Modified: lucene/dev/branches/branch_5x/solr/core/src/test/org/apache/solr/handler/component/DistributedQueryElevationComponentTest.java
URL: http://svn.apache.org/viewvc/lucene/dev/branches/branch_5x/solr/core/src/test/org/apache/solr/handler/component/DistributedQueryElevationComponentTest.java?rev=1654300&r1=1654299&r2=1654300&view=diff
==============================================================================
--- lucene/dev/branches/branch_5x/solr/core/src/test/org/apache/solr/handler/component/DistributedQueryElevationComponentTest.java (original)
+++ lucene/dev/branches/branch_5x/solr/core/src/test/org/apache/solr/handler/component/DistributedQueryElevationComponentTest.java Fri Jan 23 18:36:18 2015
@@ -26,6 +26,7 @@ import org.apache.solr.common.SolrInputD
 import org.apache.solr.common.params.CommonParams;
 import org.junit.AfterClass;
 import org.junit.BeforeClass;
+import org.junit.Test;
 
 /**
  * 
@@ -39,8 +40,6 @@ public class DistributedQueryElevationCo
   }
 
   public DistributedQueryElevationComponentTest() {
-    fixShardCount = true;
-    shardCount = 3;
     stress = 0;
 
     // TODO: a better way to do this?
@@ -59,8 +58,9 @@ public class DistributedQueryElevationCo
     System.clearProperty("elevate.data.file");
   }
 
-  @Override
-  public void doTest() throws Exception {
+  @Test
+  @ShardsFixed(num = 3)
+  public void test() throws Exception {
     
     
     del("*:*");

Modified: lucene/dev/branches/branch_5x/solr/core/src/test/org/apache/solr/handler/component/DistributedSpellCheckComponentTest.java
URL: http://svn.apache.org/viewvc/lucene/dev/branches/branch_5x/solr/core/src/test/org/apache/solr/handler/component/DistributedSpellCheckComponentTest.java?rev=1654300&r1=1654299&r2=1654300&view=diff
==============================================================================
--- lucene/dev/branches/branch_5x/solr/core/src/test/org/apache/solr/handler/component/DistributedSpellCheckComponentTest.java (original)
+++ lucene/dev/branches/branch_5x/solr/core/src/test/org/apache/solr/handler/component/DistributedSpellCheckComponentTest.java Fri Jan 23 18:36:18 2015
@@ -32,6 +32,7 @@ import org.apache.solr.common.params.Mod
 import org.apache.solr.common.params.SpellingParams;
 import org.apache.solr.common.util.NamedList;
 import org.junit.BeforeClass;
+import org.junit.Test;
 
 /**
  * Test for SpellCheckComponent's distributed querying
@@ -57,16 +58,6 @@ public class DistributedSpellCheckCompon
     useFactory(null); // need an FS factory
   }
 
-  @Override
-  public void setUp() throws Exception {
-    super.setUp();
-  }
-  
-  @Override
-  public void tearDown() throws Exception {
-    super.tearDown();
-  }
-  
   private void q(Object... q) throws Exception {
     final ModifiableSolrParams params = new ModifiableSolrParams();
 
@@ -95,9 +86,9 @@ public class DistributedSpellCheckCompon
       Assert.fail("Control data did not return any suggestions.");
     }
   }
-  
-  @Override
-  public void doTest() throws Exception {
+
+  @Test
+  public void test() throws Exception {
     del("*:*");
     index(id, "1", "lowerfilt", "toyota");
     index(id, "2", "lowerfilt", "chevrolet");

Modified: lucene/dev/branches/branch_5x/solr/core/src/test/org/apache/solr/handler/component/DistributedSuggestComponentTest.java
URL: http://svn.apache.org/viewvc/lucene/dev/branches/branch_5x/solr/core/src/test/org/apache/solr/handler/component/DistributedSuggestComponentTest.java?rev=1654300&r1=1654299&r2=1654300&view=diff
==============================================================================
--- lucene/dev/branches/branch_5x/solr/core/src/test/org/apache/solr/handler/component/DistributedSuggestComponentTest.java (original)
+++ lucene/dev/branches/branch_5x/solr/core/src/test/org/apache/solr/handler/component/DistributedSuggestComponentTest.java Fri Jan 23 18:36:18 2015
@@ -31,6 +31,7 @@ import org.apache.solr.common.util.Named
 import org.apache.solr.common.util.SimpleOrderedMap;
 import org.apache.solr.spelling.suggest.SuggesterParams;
 import org.junit.BeforeClass;
+import org.junit.Test;
 
 /**
  * Test for SuggestComponent's distributed querying
@@ -55,16 +56,6 @@ public class DistributedSuggestComponent
   }
 
   @Override
-  public void setUp() throws Exception {
-    super.setUp();
-  }
-  
-  @Override
-  public void tearDown() throws Exception {
-    super.tearDown();
-  }
-  
-  @Override
   public void validateControlData(QueryResponse control) throws Exception
   {    
     NamedList<Object> nl = control.getResponse();
@@ -74,10 +65,10 @@ public class DistributedSuggestComponent
     if(sc.size() == 0 && command == null) {
       Assert.fail("Control data did not return any suggestions or execute any command");
     }
-  } 
-  
-  @Override
-  public void doTest() throws Exception {
+  }
+
+  @Test
+  public void test() throws Exception {
     del("*:*");
     index(id, "1", "cat", "This is another title", "price", "10", "weight", "10");
     index(id, "2", "cat", "Yet another", "price", "15", "weight", "10");

Modified: lucene/dev/branches/branch_5x/solr/core/src/test/org/apache/solr/handler/component/DistributedTermsComponentTest.java
URL: http://svn.apache.org/viewvc/lucene/dev/branches/branch_5x/solr/core/src/test/org/apache/solr/handler/component/DistributedTermsComponentTest.java?rev=1654300&r1=1654299&r2=1654300&view=diff
==============================================================================
--- lucene/dev/branches/branch_5x/solr/core/src/test/org/apache/solr/handler/component/DistributedTermsComponentTest.java (original)
+++ lucene/dev/branches/branch_5x/solr/core/src/test/org/apache/solr/handler/component/DistributedTermsComponentTest.java Fri Jan 23 18:36:18 2015
@@ -18,6 +18,7 @@ package org.apache.solr.handler.componen
  */
 
 import org.apache.solr.BaseDistributedSearchTestCase;
+import org.junit.Test;
 
 /**
  * Test for TermsComponent distributed querying
@@ -27,8 +28,8 @@ import org.apache.solr.BaseDistributedSe
  */
 public class DistributedTermsComponentTest extends BaseDistributedSearchTestCase {
 
-  @Override
-  public void doTest() throws Exception {
+  @Test
+  public void test() throws Exception {
     del("*:*");
     index(id, 18, "b_t", "snake spider shark snail slug seal");
     index(id, 19, "b_t", "snake spider shark snail slug");

Modified: lucene/dev/branches/branch_5x/solr/core/src/test/org/apache/solr/handler/component/TermVectorComponentDistributedTest.java
URL: http://svn.apache.org/viewvc/lucene/dev/branches/branch_5x/solr/core/src/test/org/apache/solr/handler/component/TermVectorComponentDistributedTest.java?rev=1654300&r1=1654299&r2=1654300&view=diff
==============================================================================
--- lucene/dev/branches/branch_5x/solr/core/src/test/org/apache/solr/handler/component/TermVectorComponentDistributedTest.java (original)
+++ lucene/dev/branches/branch_5x/solr/core/src/test/org/apache/solr/handler/component/TermVectorComponentDistributedTest.java Fri Jan 23 18:36:18 2015
@@ -22,6 +22,7 @@ import org.apache.lucene.util.Constants;
 import org.apache.solr.BaseDistributedSearchTestCase;
 import org.apache.solr.common.params.TermVectorParams;
 import org.junit.BeforeClass;
+import org.junit.Test;
 
 public class TermVectorComponentDistributedTest extends BaseDistributedSearchTestCase {
   @BeforeClass
@@ -30,8 +31,8 @@ public class TermVectorComponentDistribu
                 Constants.JAVA_VENDOR.startsWith("IBM"));
   }
 
-  @Override
-  public void doTest() throws Exception {
+  @Test
+  public void test() throws Exception {
 
     handle.clear();
     handle.put("timestamp", SKIPVAL);

Modified: lucene/dev/branches/branch_5x/solr/core/src/test/org/apache/solr/schema/TestBulkSchemaConcurrent.java
URL: http://svn.apache.org/viewvc/lucene/dev/branches/branch_5x/solr/core/src/test/org/apache/solr/schema/TestBulkSchemaConcurrent.java?rev=1654300&r1=1654299&r2=1654300&view=diff
==============================================================================
--- lucene/dev/branches/branch_5x/solr/core/src/test/org/apache/solr/schema/TestBulkSchemaConcurrent.java (original)
+++ lucene/dev/branches/branch_5x/solr/core/src/test/org/apache/solr/schema/TestBulkSchemaConcurrent.java Fri Jan 23 18:36:18 2015
@@ -38,8 +38,8 @@ import org.apache.solr.cloud.AbstractFul
 import org.apache.solr.common.cloud.ZkStateReader;
 import org.apache.solr.util.RESTfulServerProvider;
 import org.apache.solr.util.RestTestHarness;
-import org.junit.After;
 import org.junit.BeforeClass;
+import org.junit.Test;
 import org.noggit.JSONParser;
 import org.noggit.ObjectBuilder;
 import org.slf4j.Logger;
@@ -70,17 +70,17 @@ public class TestBulkSchemaConcurrent  e
       restTestHarnesses.add(harness);
     }
   }
-  
-  @After
-  public void tearDown() throws Exception {
-    super.tearDown();
+
+  @Override
+  public void distribTearDown() throws Exception {
+    super.distribTearDown();
     for (RestTestHarness r : restTestHarnesses) {
       r.close();
     }
   }
-  
-  @Override
-  public void doTest() throws Exception {
+
+  @Test
+  public void test() throws Exception {
 
     final int threadCount = 5;
     setupHarnesses();

Modified: lucene/dev/branches/branch_5x/solr/core/src/test/org/apache/solr/schema/TestCloudManagedSchema.java
URL: http://svn.apache.org/viewvc/lucene/dev/branches/branch_5x/solr/core/src/test/org/apache/solr/schema/TestCloudManagedSchema.java?rev=1654300&r1=1654299&r2=1654300&view=diff
==============================================================================
--- lucene/dev/branches/branch_5x/solr/core/src/test/org/apache/solr/schema/TestCloudManagedSchema.java (original)
+++ lucene/dev/branches/branch_5x/solr/core/src/test/org/apache/solr/schema/TestCloudManagedSchema.java Fri Jan 23 18:36:18 2015
@@ -26,6 +26,7 @@ import org.apache.solr.common.params.Mod
 import org.apache.solr.common.util.NamedList;
 import org.apache.zookeeper.KeeperException;
 import org.junit.BeforeClass;
+import org.junit.Test;
 
 import java.io.IOException;
 import java.nio.charset.StandardCharsets;
@@ -47,9 +48,9 @@ public class TestCloudManagedSchema exte
   protected String getCloudSolrConfig() {
     return "solrconfig-managed-schema.xml";
   }
-      
-  @Override
-  public void doTest() throws Exception {
+
+  @Test
+  public void test() throws Exception {
     ModifiableSolrParams params = new ModifiableSolrParams();
     params.set(CoreAdminParams.ACTION, CoreAdminParams.CoreAdminAction.STATUS.toString());
     QueryRequest request = new QueryRequest(params);

Modified: lucene/dev/branches/branch_5x/solr/core/src/test/org/apache/solr/schema/TestCloudManagedSchemaConcurrent.java
URL: http://svn.apache.org/viewvc/lucene/dev/branches/branch_5x/solr/core/src/test/org/apache/solr/schema/TestCloudManagedSchemaConcurrent.java?rev=1654300&r1=1654299&r2=1654300&view=diff
==============================================================================
--- lucene/dev/branches/branch_5x/solr/core/src/test/org/apache/solr/schema/TestCloudManagedSchemaConcurrent.java (original)
+++ lucene/dev/branches/branch_5x/solr/core/src/test/org/apache/solr/schema/TestCloudManagedSchemaConcurrent.java Fri Jan 23 18:36:18 2015
@@ -36,8 +36,8 @@ import org.apache.solr.util.RESTfulServe
 import org.apache.solr.util.RestTestHarness;
 import org.apache.zookeeper.data.Stat;
 import org.eclipse.jetty.servlet.ServletHolder;
-import org.junit.After;
 import org.junit.BeforeClass;
+import org.junit.Test;
 import org.restlet.ext.servlet.ServerServlet;
 import org.slf4j.Logger;
 import org.slf4j.LoggerFactory;
@@ -54,10 +54,7 @@ public class TestCloudManagedSchemaConcu
 
   public TestCloudManagedSchemaConcurrent() {
     super();
-    fixShardCount = true;
-
     sliceCount = 4;
-    shardCount = 8;
   }
 
   @BeforeClass
@@ -65,10 +62,10 @@ public class TestCloudManagedSchemaConcu
     System.setProperty("managed.schema.mutable", "true");
     System.setProperty("enable.update.log", "true");
   }
-  
-  @After
-  public void tearDown() throws Exception {
-    super.tearDown();
+
+  @Override
+  public void distribTearDown() throws Exception {
+    super.distribTearDown();
     for (RestTestHarness h : restTestHarnesses) {
       h.close();
     }
@@ -245,10 +242,11 @@ public class TestCloudManagedSchemaConcu
 
     return expectedAddFieldTypes;
   }
-  
 
-  @Override
-  public void doTest() throws Exception {
+
+  @Test
+  @ShardsFixed(num = 8)
+  public void test() throws Exception {
     verifyWaitForSchemaUpdateToPropagate();
     setupHarnesses();
     concurrentOperationsTest();

Modified: lucene/dev/branches/branch_5x/solr/core/src/test/org/apache/solr/schema/TestCloudSchemaless.java
URL: http://svn.apache.org/viewvc/lucene/dev/branches/branch_5x/solr/core/src/test/org/apache/solr/schema/TestCloudSchemaless.java?rev=1654300&r1=1654299&r2=1654300&view=diff
==============================================================================
--- lucene/dev/branches/branch_5x/solr/core/src/test/org/apache/solr/schema/TestCloudSchemaless.java (original)
+++ lucene/dev/branches/branch_5x/solr/core/src/test/org/apache/solr/schema/TestCloudSchemaless.java Fri Jan 23 18:36:18 2015
@@ -29,7 +29,7 @@ import org.apache.solr.util.RestTestHarn
 import org.eclipse.jetty.servlet.ServletHolder;
 import org.junit.After;
 import org.junit.BeforeClass;
-import org.junit.Before;
+import org.junit.Test;
 import org.restlet.ext.servlet.ServerServlet;
 import org.slf4j.Logger;
 import org.slf4j.LoggerFactory;
@@ -49,11 +49,10 @@ public class TestCloudSchemaless extends
   private static final Logger log = LoggerFactory.getLogger(TestCloudManagedSchemaConcurrent.class);
   private static final String SUCCESS_XPATH = "/response/lst[@name='responseHeader']/int[@name='status'][.='0']";
 
-  @Before
   @Override
-  public void setUp() throws Exception {
+  public void distribSetUp() throws Exception {
 
-    super.setUp();
+    super.distribSetUp();
 
     useJettyDataDir = false;
 
@@ -70,10 +69,7 @@ public class TestCloudSchemaless extends
 
   public TestCloudSchemaless() {
     schemaString = "schema-add-schema-fields-update-processor.xml";
-    fixShardCount = true;
-
     sliceCount = 4;
-    shardCount = 8;
   }
 
   @BeforeClass
@@ -122,8 +118,9 @@ public class TestCloudSchemaless extends
     return expectedAddFields;
   }
 
-  @Override
-  public void doTest() throws Exception {
+  @Test
+  @ShardsFixed(num = 8)
+  public void test() throws Exception {
     setupHarnesses();
 
     // First, add a bunch of documents in a single update with the same new field.

Modified: lucene/dev/branches/branch_5x/solr/core/src/test/org/apache/solr/search/AnalyticsMergeStrategyTest.java
URL: http://svn.apache.org/viewvc/lucene/dev/branches/branch_5x/solr/core/src/test/org/apache/solr/search/AnalyticsMergeStrategyTest.java?rev=1654300&r1=1654299&r2=1654300&view=diff
==============================================================================
--- lucene/dev/branches/branch_5x/solr/core/src/test/org/apache/solr/search/AnalyticsMergeStrategyTest.java (original)
+++ lucene/dev/branches/branch_5x/solr/core/src/test/org/apache/solr/search/AnalyticsMergeStrategyTest.java Fri Jan 23 18:36:18 2015
@@ -22,6 +22,7 @@ import org.apache.solr.client.solrj.resp
 import org.apache.solr.common.params.ModifiableSolrParams;
 import org.apache.solr.common.util.NamedList;
 import org.junit.BeforeClass;
+import org.junit.Test;
 
 /**
  * Test for QueryComponent's distributed querying
@@ -31,8 +32,6 @@ import org.junit.BeforeClass;
 public class AnalyticsMergeStrategyTest extends BaseDistributedSearchTestCase {
 
   public AnalyticsMergeStrategyTest() {
-    fixShardCount = true;
-    shardCount = 3;
     stress = 0;
   }
 
@@ -41,8 +40,9 @@ public class AnalyticsMergeStrategyTest
     initCore("solrconfig-analytics-query.xml", "schema15.xml");
   }
 
-  @Override
-  public void doTest() throws Exception {
+  @Test
+  @ShardsFixed(num = 3)
+  public void test() throws Exception {
     del("*:*");
 
     index_specific(0,"id","1", "sort_i", "5");

Modified: lucene/dev/branches/branch_5x/solr/core/src/test/org/apache/solr/search/MergeStrategyTest.java
URL: http://svn.apache.org/viewvc/lucene/dev/branches/branch_5x/solr/core/src/test/org/apache/solr/search/MergeStrategyTest.java?rev=1654300&r1=1654299&r2=1654300&view=diff
==============================================================================
--- lucene/dev/branches/branch_5x/solr/core/src/test/org/apache/solr/search/MergeStrategyTest.java (original)
+++ lucene/dev/branches/branch_5x/solr/core/src/test/org/apache/solr/search/MergeStrategyTest.java Fri Jan 23 18:36:18 2015
@@ -21,13 +21,12 @@ import org.apache.solr.BaseDistributedSe
 import org.apache.solr.client.solrj.response.QueryResponse;
 import org.apache.solr.common.SolrDocument;
 import org.apache.solr.common.SolrDocumentList;
-import org.apache.solr.common.params.CommonParams;
 import org.apache.solr.common.params.ModifiableSolrParams;
-import org.apache.solr.common.util.NamedList;
 import org.apache.solr.handler.component.MergeStrategy;
 import org.apache.solr.handler.component.ResponseBuilder;
 import org.apache.solr.handler.component.ShardRequest;
 import org.junit.BeforeClass;
+import org.junit.Test;
 
 import java.util.Arrays;
 
@@ -39,8 +38,6 @@ import java.util.Arrays;
 public class MergeStrategyTest extends BaseDistributedSearchTestCase {
 
   public MergeStrategyTest() {
-    fixShardCount = true;
-    shardCount = 3;
     stress = 0;
   }
 
@@ -49,8 +46,9 @@ public class MergeStrategyTest extends B
     initCore("solrconfig-plugcollector.xml", "schema15.xml");
   }
 
-  @Override
-  public void doTest() throws Exception {
+  @Test
+  @ShardsFixed(num = 3)
+  public void test() throws Exception {
     del("*:*");
 
     index_specific(0,"id","1", "sort_i", "5");

Modified: lucene/dev/branches/branch_5x/solr/core/src/test/org/apache/solr/search/mlt/CloudMLTQParserTest.java
URL: http://svn.apache.org/viewvc/lucene/dev/branches/branch_5x/solr/core/src/test/org/apache/solr/search/mlt/CloudMLTQParserTest.java?rev=1654300&r1=1654299&r2=1654300&view=diff
==============================================================================
--- lucene/dev/branches/branch_5x/solr/core/src/test/org/apache/solr/search/mlt/CloudMLTQParserTest.java (original)
+++ lucene/dev/branches/branch_5x/solr/core/src/test/org/apache/solr/search/mlt/CloudMLTQParserTest.java Fri Jan 23 18:36:18 2015
@@ -23,6 +23,7 @@ import org.apache.solr.common.SolrDocume
 import org.apache.solr.common.SolrDocumentList;
 import org.apache.solr.common.params.CommonParams;
 import org.apache.solr.common.params.ModifiableSolrParams;
+import org.junit.Test;
 import org.slf4j.Logger;
 import org.slf4j.LoggerFactory;
 
@@ -35,8 +36,6 @@ public class CloudMLTQParserTest extends
   static Logger log = LoggerFactory.getLogger(CloudMLTQParserTest.class);
   
   public CloudMLTQParserTest() {
-    fixShardCount = true;
-    shardCount = 2;
     sliceCount = 2;
     
     configString = "solrconfig.xml";
@@ -47,8 +46,10 @@ public class CloudMLTQParserTest extends
   protected String getCloudSolrConfig() {
     return configString;
   }
-  
-  public void doTest() throws Exception {
+
+  @Test
+  @ShardsFixed(num = 2)
+  public void test() throws Exception {
     
     waitForRecoveriesToFinish(false);
 

Modified: lucene/dev/branches/branch_5x/solr/core/src/test/org/apache/solr/search/stats/TestBaseStatsCache.java
URL: http://svn.apache.org/viewvc/lucene/dev/branches/branch_5x/solr/core/src/test/org/apache/solr/search/stats/TestBaseStatsCache.java?rev=1654300&r1=1654299&r2=1654300&view=diff
==============================================================================
--- lucene/dev/branches/branch_5x/solr/core/src/test/org/apache/solr/search/stats/TestBaseStatsCache.java (original)
+++ lucene/dev/branches/branch_5x/solr/core/src/test/org/apache/solr/search/stats/TestBaseStatsCache.java Fri Jan 23 18:36:18 2015
@@ -30,13 +30,13 @@ public abstract class TestBaseStatsCache
   protected abstract String getStatsCacheClassName();
 
   @Override
-  public void setUp() throws Exception {
-    super.setUp();
+  public void distribSetUp() throws Exception {
+    super.distribSetUp();
     System.setProperty("solr.statsCache", getStatsCacheClassName());
   }
 
-  public void tearDown() throws Exception {
-    super.tearDown();
+  public void distribTearDown() throws Exception {
+    super.distribTearDown();
     System.clearProperty("solr.statsCache");
   }
   

Modified: lucene/dev/branches/branch_5x/solr/core/src/test/org/apache/solr/search/stats/TestDefaultStatsCache.java
URL: http://svn.apache.org/viewvc/lucene/dev/branches/branch_5x/solr/core/src/test/org/apache/solr/search/stats/TestDefaultStatsCache.java?rev=1654300&r1=1654299&r2=1654300&view=diff
==============================================================================
--- lucene/dev/branches/branch_5x/solr/core/src/test/org/apache/solr/search/stats/TestDefaultStatsCache.java (original)
+++ lucene/dev/branches/branch_5x/solr/core/src/test/org/apache/solr/search/stats/TestDefaultStatsCache.java Fri Jan 23 18:36:18 2015
@@ -22,23 +22,24 @@ import org.apache.solr.client.solrj.Solr
 import org.apache.solr.client.solrj.response.QueryResponse;
 import org.apache.solr.common.SolrDocumentList;
 import org.apache.solr.common.params.ModifiableSolrParams;
+import org.junit.Test;
 
 public class TestDefaultStatsCache extends BaseDistributedSearchTestCase {
   private int docId = 0;
   
   @Override
-  public void setUp() throws Exception {
-    super.setUp();
+  public void distribSetUp() throws Exception {
+    super.distribSetUp();
     System.setProperty("solr.statsCache", LocalStatsCache.class.getName());
   }
   
-  public void tearDown() throws Exception {
-    super.tearDown();
+  public void distribTearDown() throws Exception {
+    super.distribTearDown();
     System.clearProperty("solr.statsCache");
   }
-  
-  @Override
-  public void doTest() throws Exception {
+
+  @Test
+  public void test() throws Exception {
     del("*:*");
     for (int i = 0; i < clients.size(); i++) {
       int shard = i + 1;

Modified: lucene/dev/branches/branch_5x/solr/core/src/test/org/apache/solr/update/PeerSyncTest.java
URL: http://svn.apache.org/viewvc/lucene/dev/branches/branch_5x/solr/core/src/test/org/apache/solr/update/PeerSyncTest.java?rev=1654300&r1=1654299&r2=1654300&view=diff
==============================================================================
--- lucene/dev/branches/branch_5x/solr/core/src/test/org/apache/solr/update/PeerSyncTest.java (original)
+++ lucene/dev/branches/branch_5x/solr/core/src/test/org/apache/solr/update/PeerSyncTest.java Fri Jan 23 18:36:18 2015
@@ -25,6 +25,7 @@ import org.apache.solr.client.solrj.requ
 import org.apache.solr.common.params.ModifiableSolrParams;
 import org.apache.solr.common.util.NamedList;
 import org.apache.solr.common.util.StrUtils;
+import org.junit.Test;
 
 import java.io.IOException;
 import java.util.Arrays;
@@ -41,18 +42,16 @@ public class PeerSyncTest extends BaseDi
     params(DISTRIB_UPDATE_PARAM, FROM_LEADER);
   
   public PeerSyncTest() {
-    fixShardCount = true;
-    shardCount = 3;
     stress = 0;
 
     // TODO: a better way to do this?
     configString = "solrconfig-tlog.xml";
     schemaString = "schema.xml";
   }
-  
-  
-  @Override
-  public void doTest() throws Exception {
+
+  @Test
+  @ShardsFixed(num = 3)
+  public void test() throws Exception {
     handle.clear();
     handle.put("timestamp", SKIPVAL);
     handle.put("score", SKIPVAL);