lucene-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From mikemcc...@apache.org
Subject svn commit: r1721134 [35/48] - in /lucene/dev/branches/lucene6835: ./ dev-tools/ dev-tools/eclipse/dot.settings/ dev-tools/idea/.idea/libraries/ dev-tools/maven/ dev-tools/maven/lucene/analysis/morfologik/ dev-tools/scripts/ lucene/ lucene/analysis/ lu...
Date Mon, 21 Dec 2015 11:40:14 GMT
Modified: lucene/dev/branches/lucene6835/solr/core/src/test/org/apache/solr/cloud/BaseCdcrDistributedZkTest.java
URL: http://svn.apache.org/viewvc/lucene/dev/branches/lucene6835/solr/core/src/test/org/apache/solr/cloud/BaseCdcrDistributedZkTest.java?rev=1721134&r1=1721133&r2=1721134&view=diff
==============================================================================
--- lucene/dev/branches/lucene6835/solr/core/src/test/org/apache/solr/cloud/BaseCdcrDistributedZkTest.java (original)
+++ lucene/dev/branches/lucene6835/solr/core/src/test/org/apache/solr/cloud/BaseCdcrDistributedZkTest.java Mon Dec 21 11:39:57 2015
@@ -17,6 +17,18 @@ package org.apache.solr.cloud;
  * limitations under the License.
  */
 
+import java.io.File;
+import java.io.IOException;
+import java.lang.invoke.MethodHandles;
+import java.util.ArrayList;
+import java.util.Collections;
+import java.util.HashMap;
+import java.util.HashSet;
+import java.util.List;
+import java.util.Locale;
+import java.util.Map;
+import java.util.Set;
+
 import org.apache.http.params.CoreConnectionPNames;
 import org.apache.solr.client.solrj.SolrClient;
 import org.apache.solr.client.solrj.SolrQuery;
@@ -28,7 +40,13 @@ import org.apache.solr.client.solrj.impl
 import org.apache.solr.client.solrj.request.QueryRequest;
 import org.apache.solr.client.solrj.response.CollectionAdminResponse;
 import org.apache.solr.common.SolrInputDocument;
-import org.apache.solr.common.cloud.*;
+import org.apache.solr.common.cloud.ClusterState;
+import org.apache.solr.common.cloud.DocCollection;
+import org.apache.solr.common.cloud.Replica;
+import org.apache.solr.common.cloud.Slice;
+import org.apache.solr.common.cloud.SolrZkClient;
+import org.apache.solr.common.cloud.ZkCoreNodeProps;
+import org.apache.solr.common.cloud.ZkStateReader;
 import org.apache.solr.common.params.CollectionParams;
 import org.apache.solr.common.params.CommonParams;
 import org.apache.solr.common.params.ModifiableSolrParams;
@@ -37,15 +55,17 @@ import org.apache.solr.common.util.StrUt
 import org.apache.solr.common.util.Utils;
 import org.apache.solr.core.SolrCore;
 import org.apache.solr.handler.CdcrParams;
-import org.apache.solr.servlet.SolrDispatchFilter;
 import org.apache.zookeeper.CreateMode;
-import org.junit.*;
-
-import java.io.File;
-import java.io.IOException;
-import java.util.*;
-
-import static org.apache.solr.cloud.OverseerCollectionMessageHandler.*;
+import org.junit.After;
+import org.junit.AfterClass;
+import org.junit.Before;
+import org.junit.BeforeClass;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+
+import static org.apache.solr.cloud.OverseerCollectionMessageHandler.CREATE_NODE_SET;
+import static org.apache.solr.cloud.OverseerCollectionMessageHandler.NUM_SLICES;
+import static org.apache.solr.cloud.OverseerCollectionMessageHandler.SHARDS_PROP;
 import static org.apache.solr.common.cloud.ZkStateReader.MAX_SHARDS_PER_NODE;
 import static org.apache.solr.common.cloud.ZkStateReader.REPLICATION_FACTOR;
 
@@ -80,6 +100,8 @@ import static org.apache.solr.common.clo
  */
 public class BaseCdcrDistributedZkTest extends AbstractDistribZkTestBase {
 
+  private static final Logger log = LoggerFactory.getLogger(MethodHandles.lookup().lookupClass());
+
   protected int shardCount = 2;
   protected int replicationFactor = 2;
   protected boolean createTargetCollection = true;
@@ -221,12 +243,26 @@ public class BaseCdcrDistributedZkTest e
   }
 
   /**
-   * Returns the number of documents in a given collection
+   * Assert the number of documents in a given collection
    */
-  protected long getNumDocs(String collection) throws SolrServerException, IOException {
+  protected void assertNumDocs(int expectedNumDocs, String collection)
+  throws SolrServerException, IOException, InterruptedException {
     CloudSolrClient client = createCloudClient(collection);
     try {
-      return client.query(new SolrQuery("*:*")).getResults().getNumFound();
+      int cnt = 30; // timeout after 15 seconds
+      AssertionError lastAssertionError = null;
+      while (cnt > 0) {
+        try {
+          assertEquals(expectedNumDocs, client.query(new SolrQuery("*:*")).getResults().getNumFound());
+          return;
+        }
+        catch (AssertionError e) {
+          lastAssertionError = e;
+          cnt--;
+          Thread.sleep(500);
+        }
+      }
+      throw new AssertionError("Timeout while trying to assert number of documents @ " + collection, lastAssertionError);
     } finally {
       client.close();
     }
@@ -533,9 +569,7 @@ public class BaseCdcrDistributedZkTest e
       jettys.add(jetty);
     }
 
-    ZkStateReader zkStateReader = ((SolrDispatchFilter) jettys.get(0)
-        .getDispatchFilter().getFilter()).getCores().getZkController()
-        .getZkStateReader();
+    ZkStateReader zkStateReader = jettys.get(0).getCoreContainer().getZkController().getZkStateReader();
 
     // now wait till we see the leader for each shard
     for (int i = 1; i <= shardCount; i++) {
@@ -553,6 +587,7 @@ public class BaseCdcrDistributedZkTest e
 
     // delete the temporary collection - we will create our own collections later
     this.deleteCollection(temporaryCollection);
+    this.waitForCollectionToDisappear(temporaryCollection);
     System.clearProperty("collection");
 
     return nodeNames;
@@ -744,8 +779,7 @@ public class BaseCdcrDistributedZkTest e
     for (String shard : shardToJetty.get(collection).keySet()) {
       List<CloudJettyRunner> jettyRunners = shardToJetty.get(collection).get(shard);
       for (CloudJettyRunner jettyRunner : jettyRunners) {
-        SolrDispatchFilter filter = (SolrDispatchFilter) jettyRunner.jetty.getDispatchFilter().getFilter();
-        for (SolrCore core : filter.getCores().getCores()) {
+        for (SolrCore core : jettyRunner.jetty.getCoreContainer().getCores()) {
           info.addCore(core, shard, shardToLeaderJetty.get(collection).containsValue(jettyRunner));
         }
       }

Modified: lucene/dev/branches/lucene6835/solr/core/src/test/org/apache/solr/cloud/BasicDistributedZkTest.java
URL: http://svn.apache.org/viewvc/lucene/dev/branches/lucene6835/solr/core/src/test/org/apache/solr/cloud/BasicDistributedZkTest.java?rev=1721134&r1=1721133&r2=1721134&view=diff
==============================================================================
--- lucene/dev/branches/lucene6835/solr/core/src/test/org/apache/solr/cloud/BasicDistributedZkTest.java (original)
+++ lucene/dev/branches/lucene6835/solr/core/src/test/org/apache/solr/cloud/BasicDistributedZkTest.java Mon Dec 21 11:39:57 2015
@@ -55,12 +55,16 @@ import org.apache.solr.util.DefaultSolrT
 import org.apache.solr.util.TimeOut;
 import org.junit.BeforeClass;
 import org.junit.Test;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
 
 import java.io.IOException;
+import java.lang.invoke.MethodHandles;
 import java.util.ArrayList;
 import java.util.Collections;
 import java.util.HashMap;
 import java.util.HashSet;
+import java.util.Iterator;
 import java.util.List;
 import java.util.Map;
 import java.util.Set;
@@ -81,7 +85,9 @@ import java.util.concurrent.atomic.Atomi
 @Slow 
 @SuppressSSL(bugUrl = "https://issues.apache.org/jira/browse/SOLR-5776")
 public class BasicDistributedZkTest extends AbstractFullDistribZkTestBase {
-  
+
+  private static final Logger log = LoggerFactory.getLogger(MethodHandles.lookup().lookupClass());
+
   private static final String DEFAULT_COLLECTION = "collection1";
   protected static final boolean DEBUG = false;
   String t1="a_t";
@@ -317,21 +323,28 @@ public class BasicDistributedZkTest exte
 
     // try commitWithin
     long before = cloudClient.query(new SolrQuery("*:*")).getResults().getNumFound();
+    for (SolrClient client : clients) {
+      assertEquals("unexpected pre-commitWithin document count on node: " + ((HttpSolrClient)client).getBaseURL(), before, client.query(new SolrQuery("*:*")).getResults().getNumFound());
+    }
+
     ModifiableSolrParams params = new ModifiableSolrParams();
     params.set("commitWithin", 10);
     add(cloudClient, params, getDoc("id", 300));
 
+    final List<SolrClient> clientsToCheck = new ArrayList<>(clients);
     TimeOut timeout = new TimeOut(45, TimeUnit.SECONDS);
-    while (cloudClient.query(new SolrQuery("*:*")).getResults().getNumFound() != before + 1) {
-      if (timeout.hasTimedOut()) {
-        fail("commitWithin did not work");
+    do {
+      final Iterator<SolrClient> it = clientsToCheck.iterator();
+      while (it.hasNext()) {
+        final SolrClient sc = it.next();
+        if ((before + 1) == sc.query(new SolrQuery("*:*")).getResults().getNumFound()) {
+          it.remove();
+        }
       }
       Thread.sleep(100);
-    }
+    } while (!clientsToCheck.isEmpty() && !timeout.hasTimedOut());
     
-    for (SolrClient client : clients) {
-      assertEquals("commitWithin did not work on node: " + ((HttpSolrClient)client).getBaseURL(), before + 1, client.query(new SolrQuery("*:*")).getResults().getNumFound());
-    }
+    assertTrue("commitWithin did not work on some nodes: "+clientsToCheck, clientsToCheck.isEmpty());
     
     // TODO: This test currently fails because debug info is obtained only
     // on shards with matches.

Modified: lucene/dev/branches/lucene6835/solr/core/src/test/org/apache/solr/cloud/CdcrReplicationDistributedZkTest.java
URL: http://svn.apache.org/viewvc/lucene/dev/branches/lucene6835/solr/core/src/test/org/apache/solr/cloud/CdcrReplicationDistributedZkTest.java?rev=1721134&r1=1721133&r2=1721134&view=diff
==============================================================================
--- lucene/dev/branches/lucene6835/solr/core/src/test/org/apache/solr/cloud/CdcrReplicationDistributedZkTest.java (original)
+++ lucene/dev/branches/lucene6835/solr/core/src/test/org/apache/solr/cloud/CdcrReplicationDistributedZkTest.java Mon Dec 21 11:39:57 2015
@@ -17,52 +17,38 @@ package org.apache.solr.cloud;
  * limitations under the License.
  */
 
-import org.apache.lucene.util.LuceneTestCase.Slow;
 import org.apache.lucene.util.LuceneTestCase.Nightly;
 import org.apache.solr.common.SolrInputDocument;
 import org.apache.solr.common.util.NamedList;
 import org.apache.solr.handler.CdcrParams;
 import org.junit.Test;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
 
 import java.io.File;
+import java.lang.invoke.MethodHandles;
 import java.util.ArrayList;
-import java.util.Collections;
 import java.util.List;
-import java.util.Locale;
 import java.util.Map;
 
-@Slow
 @Nightly
 public class CdcrReplicationDistributedZkTest extends BaseCdcrDistributedZkTest {
 
+  private static final Logger log = LoggerFactory.getLogger(MethodHandles.lookup().lookupClass());
+
   @Override
   public void distribSetUp() throws Exception {
     schemaString = "schema15.xml";      // we need a string id
     super.distribSetUp();
   }
 
-  @Test
-  @ShardsFixed(num = 4)
-  public void doTests() throws Exception {
-    this.doTestDeleteCreateSourceCollection();
-    this.doTestTargetCollectionNotAvailable();
-    this.doTestReplicationStartStop();
-    this.doTestReplicationAfterRestart();
-    this.doTestReplicationAfterLeaderChange();
-    this.doTestUpdateLogSynchronisation();
-    this.doTestBufferOnNonLeader();
-    this.doTestOps();
-    this.doTestBatchAddsWithDelete();
-    this.doTestBatchBoundaries();
-    this.doTestResilienceWithDeleteByQueryOnTarget();
-  }
   /**
    * Checks that the test framework handles properly the creation and deletion of collections and the
    * restart of servers.
    */
-  public void doTestDeleteCreateSourceCollection() throws Exception {
-    this.clearSourceCollection();
-    this.clearTargetCollection();
+  @Test
+  @ShardsFixed(num = 4)
+  public void testDeleteCreateSourceCollection() throws Exception {
     log.info("Indexing documents");
 
     List<SolrInputDocument> docs = new ArrayList<>();
@@ -72,45 +58,44 @@ public class CdcrReplicationDistributedZ
     index(SOURCE_COLLECTION, docs);
     index(TARGET_COLLECTION, docs);
 
-    assertEquals(10, getNumDocs(SOURCE_COLLECTION));
-    assertEquals(10, getNumDocs(TARGET_COLLECTION));
+    assertNumDocs(10, SOURCE_COLLECTION);
+    assertNumDocs(10, TARGET_COLLECTION);
 
     log.info("Restarting leader @ source_collection:shard1");
 
     this.restartServer(shardToLeaderJetty.get(SOURCE_COLLECTION).get(SHARD1));
 
-    assertEquals(10, getNumDocs(SOURCE_COLLECTION));
-    assertEquals(10, getNumDocs(TARGET_COLLECTION));
+    assertNumDocs(10, SOURCE_COLLECTION);
+    assertNumDocs(10, TARGET_COLLECTION);
 
     log.info("Clearing source_collection");
 
     this.clearSourceCollection();
 
-    assertEquals(0, getNumDocs(SOURCE_COLLECTION));
-    assertEquals(10, getNumDocs(TARGET_COLLECTION));
+    assertNumDocs(0, SOURCE_COLLECTION);
+    assertNumDocs(10, TARGET_COLLECTION);
 
     log.info("Restarting leader @ target_collection:shard1");
 
     this.restartServer(shardToLeaderJetty.get(TARGET_COLLECTION).get(SHARD1));
 
-    assertEquals(0, getNumDocs(SOURCE_COLLECTION));
-    assertEquals(10, getNumDocs(TARGET_COLLECTION));
+    assertNumDocs(0, SOURCE_COLLECTION);
+    assertNumDocs(10, TARGET_COLLECTION);
 
     log.info("Clearing target_collection");
 
     this.clearTargetCollection();
 
-    assertEquals(0, getNumDocs(SOURCE_COLLECTION));
-    assertEquals(0, getNumDocs(TARGET_COLLECTION));
+    assertNumDocs(0, SOURCE_COLLECTION);
+    assertNumDocs(0, TARGET_COLLECTION);
 
     assertCollectionExpectations(SOURCE_COLLECTION);
     assertCollectionExpectations(TARGET_COLLECTION);
   }
 
-  public void doTestTargetCollectionNotAvailable() throws Exception {
-    this.clearSourceCollection();
-    this.clearTargetCollection();
-
+  @Test
+  @ShardsFixed(num = 4)
+  public void testTargetCollectionNotAvailable() throws Exception {
     // send start action to first shard
     NamedList rsp = invokeCdcrAction(shardToLeaderJetty.get(SOURCE_COLLECTION).get(SHARD1), CdcrParams.CdcrAction.START);
     NamedList status = (NamedList) rsp.get(CdcrParams.CdcrAction.STATUS.toLower());
@@ -130,23 +115,35 @@ public class CdcrReplicationDistributedZ
     index(SOURCE_COLLECTION, getDoc(id, "e"));
     index(SOURCE_COLLECTION, getDoc(id, "f"));
 
-    assertEquals(6, getNumDocs(SOURCE_COLLECTION));
+    assertNumDocs(6, SOURCE_COLLECTION);
 
-    Thread.sleep(1000); // wait a bit for the replicator thread to be triggered
+    // we need to wait until the replicator thread is triggered
+    int cnt = 15; // timeout after 15 seconds
+    AssertionError lastAssertionError = null;
+    while (cnt > 0) {
+      try {
+        rsp = invokeCdcrAction(shardToLeaderJetty.get(SOURCE_COLLECTION).get(SHARD2), CdcrParams.CdcrAction.ERRORS);
+        NamedList collections = (NamedList) ((NamedList) rsp.get(CdcrParams.ERRORS)).getVal(0);
+        NamedList errors = (NamedList) collections.get(TARGET_COLLECTION);
+        assertTrue(0 < (Long) errors.get(CdcrParams.CONSECUTIVE_ERRORS));
+        NamedList lastErrors = (NamedList) errors.get(CdcrParams.LAST);
+        assertNotNull(lastErrors);
+        assertTrue(0 < lastErrors.size());
+        return;
+      }
+      catch (AssertionError e) {
+        lastAssertionError = e;
+        cnt--;
+        Thread.sleep(1000);
+      }
+    }
 
-    rsp = invokeCdcrAction(shardToLeaderJetty.get(SOURCE_COLLECTION).get(SHARD2), CdcrParams.CdcrAction.ERRORS);
-    NamedList collections = (NamedList) ((NamedList) rsp.get(CdcrParams.ERRORS)).getVal(0);
-    NamedList errors = (NamedList) collections.get(TARGET_COLLECTION);
-    assertTrue(0 < (Long) errors.get(CdcrParams.CONSECUTIVE_ERRORS));
-    NamedList lastErrors = (NamedList) errors.get(CdcrParams.LAST);
-    assertNotNull(lastErrors);
-    assertTrue(0 < lastErrors.size());
+    throw new AssertionError("Timeout while trying to assert replication errors", lastAssertionError);
   }
 
-  public void doTestReplicationStartStop() throws Exception {
-    this.clearSourceCollection();
-    this.clearTargetCollection(); // this might log a warning to indicate he was not able to delete the collection (collection was deleted in the previous test)
-
+  @Test
+  @ShardsFixed(num = 4)
+  public void testReplicationStartStop() throws Exception {
     int start = 0;
     List<SolrInputDocument> docs = new ArrayList<>();
     for (; start < 10; start++) {
@@ -154,8 +151,8 @@ public class CdcrReplicationDistributedZ
     }
     index(SOURCE_COLLECTION, docs);
 
-    assertEquals(10, getNumDocs(SOURCE_COLLECTION));
-    assertEquals(0, getNumDocs(TARGET_COLLECTION));
+    assertNumDocs(10, SOURCE_COLLECTION);
+    assertNumDocs(0, TARGET_COLLECTION);
 
     this.invokeCdcrAction(shardToLeaderJetty.get(SOURCE_COLLECTION).get(SHARD1), CdcrParams.CdcrAction.START);
     this.waitForCdcrStateReplication(SOURCE_COLLECTION);
@@ -165,8 +162,8 @@ public class CdcrReplicationDistributedZ
 
     commit(TARGET_COLLECTION);
 
-    assertEquals(10, getNumDocs(SOURCE_COLLECTION));
-    assertEquals(10, getNumDocs(TARGET_COLLECTION));
+    assertNumDocs(10, SOURCE_COLLECTION);
+    assertNumDocs(10, TARGET_COLLECTION);
 
     this.invokeCdcrAction(shardToLeaderJetty.get(SOURCE_COLLECTION).get(SHARD1), CdcrParams.CdcrAction.STOP);
     this.waitForCdcrStateReplication(SOURCE_COLLECTION);
@@ -177,8 +174,8 @@ public class CdcrReplicationDistributedZ
     }
     index(SOURCE_COLLECTION, docs);
 
-    assertEquals(110, getNumDocs(SOURCE_COLLECTION));
-    assertEquals(10, getNumDocs(TARGET_COLLECTION));
+    assertNumDocs(110, SOURCE_COLLECTION);
+    assertNumDocs(10, TARGET_COLLECTION);
 
     // Start again CDCR, the source cluster should reinitialise its log readers
     // with the latest checkpoints
@@ -191,17 +188,16 @@ public class CdcrReplicationDistributedZ
 
     commit(TARGET_COLLECTION);
 
-    assertEquals(110, getNumDocs(SOURCE_COLLECTION));
-    assertEquals(110, getNumDocs(TARGET_COLLECTION));
+    assertNumDocs(110, SOURCE_COLLECTION);
+    assertNumDocs(110, TARGET_COLLECTION);
   }
 
   /**
    * Check that the replication manager is properly restarted after a node failure.
    */
-  public void doTestReplicationAfterRestart() throws Exception {
-    this.clearSourceCollection();
-    this.clearTargetCollection();
-
+  @Test
+  @ShardsFixed(num = 4)
+  public void testReplicationAfterRestart() throws Exception {
     log.info("Starting CDCR");
 
     // send start action to first shard
@@ -219,7 +215,7 @@ public class CdcrReplicationDistributedZ
 
     log.info("Querying source collection");
 
-    assertEquals(10, getNumDocs(SOURCE_COLLECTION));
+    assertNumDocs(10, SOURCE_COLLECTION);
 
     log.info("Waiting for replication");
 
@@ -229,7 +225,7 @@ public class CdcrReplicationDistributedZ
     log.info("Querying target collection");
 
     commit(TARGET_COLLECTION);
-    assertEquals(10, getNumDocs(TARGET_COLLECTION));
+    assertNumDocs(10, TARGET_COLLECTION);
 
     log.info("Restarting shard1");
 
@@ -245,7 +241,7 @@ public class CdcrReplicationDistributedZ
 
     log.info("Querying source collection");
 
-    assertEquals(110, getNumDocs(SOURCE_COLLECTION));
+    assertNumDocs(110, SOURCE_COLLECTION);
 
     log.info("Waiting for replication");
 
@@ -255,7 +251,7 @@ public class CdcrReplicationDistributedZ
     log.info("Querying target collection");
 
     commit(TARGET_COLLECTION);
-    assertEquals(110, getNumDocs(TARGET_COLLECTION));
+    assertNumDocs(110, TARGET_COLLECTION);
   }
 
   /**
@@ -263,10 +259,9 @@ public class CdcrReplicationDistributedZ
    * This test also checks that the log readers on the new leaders are initialised with
    * the target's checkpoint.
    */
-  public void doTestReplicationAfterLeaderChange() throws Exception {
-    this.clearSourceCollection();
-    this.clearTargetCollection();
-
+  @Test
+  @ShardsFixed(num = 4)
+  public void testReplicationAfterLeaderChange() throws Exception {
     log.info("Starting CDCR");
 
     // send start action to first shard
@@ -284,7 +279,7 @@ public class CdcrReplicationDistributedZ
 
     log.info("Querying source collection");
 
-    assertEquals(10, getNumDocs(SOURCE_COLLECTION));
+    assertNumDocs(10, SOURCE_COLLECTION);
 
     log.info("Waiting for replication");
 
@@ -294,7 +289,7 @@ public class CdcrReplicationDistributedZ
     log.info("Querying target collection");
 
     commit(TARGET_COLLECTION);
-    assertEquals(10, getNumDocs(TARGET_COLLECTION));
+    assertNumDocs(10, TARGET_COLLECTION);
 
     log.info("Restarting target leaders");
 
@@ -327,7 +322,7 @@ public class CdcrReplicationDistributedZ
 
     log.info("Querying source collection");
 
-    assertEquals(110, getNumDocs(SOURCE_COLLECTION));
+    assertNumDocs(110, SOURCE_COLLECTION);
 
     log.info("Waiting for replication");
 
@@ -337,24 +332,20 @@ public class CdcrReplicationDistributedZ
     log.info("Querying target collection");
 
     commit(TARGET_COLLECTION);
-    assertEquals(110, getNumDocs(TARGET_COLLECTION));
+    assertNumDocs(110, TARGET_COLLECTION);
   }
 
   /**
    * Check that the update logs are synchronised between leader and non-leader nodes
+   * when CDCR is on and buffer is disabled
    */
-  public void doTestUpdateLogSynchronisation() throws Exception {
-    this.clearSourceCollection();
-    this.clearTargetCollection();
-
-    // buffering is enabled by default, so disable it
-    this.invokeCdcrAction(shardToLeaderJetty.get(SOURCE_COLLECTION).get(SHARD1), CdcrParams.CdcrAction.DISABLEBUFFER);
-    this.waitForCdcrStateReplication(SOURCE_COLLECTION);
-
+  @Test
+  @ShardsFixed(num = 4)
+  public void testUpdateLogSynchronisation() throws Exception {
     this.invokeCdcrAction(shardToLeaderJetty.get(SOURCE_COLLECTION).get(SHARD1), CdcrParams.CdcrAction.START);
     this.waitForCdcrStateReplication(SOURCE_COLLECTION);
 
-    for (int i = 0; i < 50; i++) {
+    for (int i = 0; i < 100; i++) {
       // will perform a commit for every document and will create one tlog file per commit
       index(SOURCE_COLLECTION, getDoc(id, Integer.toString(i)));
     }
@@ -365,34 +356,39 @@ public class CdcrReplicationDistributedZ
 
     commit(TARGET_COLLECTION);
 
-    // Stop CDCR
-    this.invokeCdcrAction(shardToLeaderJetty.get(SOURCE_COLLECTION).get(SHARD1), CdcrParams.CdcrAction.STOP);
+    // Check that the replication was done properly
+    assertNumDocs(100, SOURCE_COLLECTION);
+    assertNumDocs(100, TARGET_COLLECTION);
+
+    // Get the number of tlog files on the replicas (should be equal to the number of documents indexed)
+    int nTlogs = getNumberOfTlogFilesOnReplicas(SOURCE_COLLECTION);
+
+    // Disable the buffer - ulog synch should start on non-leader nodes
+    this.invokeCdcrAction(shardToLeaderJetty.get(SOURCE_COLLECTION).get(SHARD1), CdcrParams.CdcrAction.DISABLEBUFFER);
     this.waitForCdcrStateReplication(SOURCE_COLLECTION);
 
-    assertEquals(50, getNumDocs(SOURCE_COLLECTION));
-    assertEquals(50, getNumDocs(TARGET_COLLECTION));
+    int cnt = 15; // timeout after 15 seconds
+    while (cnt > 0) {
+      // Index a new document with a commit to trigger update log cleaning
+      index(SOURCE_COLLECTION, getDoc(id, Integer.toString(50)));
 
-    // some of the tlogs should be trimmed, we must have less than 50 tlog files on both leader and non-leader
-    assertNumberOfTlogFiles(SOURCE_COLLECTION, 50);
+      // Check the update logs on non-leader nodes, the number of tlog files should decrease
+      int n = getNumberOfTlogFilesOnReplicas(SOURCE_COLLECTION);
+      if (n < nTlogs) return;
 
-    for (int i = 50; i < 100; i++) {
-      index(SOURCE_COLLECTION, getDoc(id, Integer.toString(i)));
+      cnt--;
+      Thread.sleep(1000);
     }
 
-    // at this stage, we should have created one tlog file per document, and some of them must have been cleaned on the
-    // leader since we are not buffering and replication is stopped, (we should have exactly 10 tlog files on the leader
-    // and 11 on the non-leader)
-    // the non-leader must have synchronised its update log with its leader
-    assertNumberOfTlogFiles(SOURCE_COLLECTION, 50);
+    throw new AssertionError("Timeout while trying to assert update logs @ source_collection");
   }
 
   /**
    * Check that the buffer is always activated on non-leader nodes.
    */
-  public void doTestBufferOnNonLeader() throws Exception {
-    this.clearSourceCollection();
-    this.clearTargetCollection();
-
+  @Test
+  @ShardsFixed(num = 4)
+  public void testBufferOnNonLeader() throws Exception {
     // buffering is enabled by default, so disable it
     this.invokeCdcrAction(shardToLeaderJetty.get(SOURCE_COLLECTION).get(SHARD1), CdcrParams.CdcrAction.DISABLEBUFFER);
     this.waitForCdcrStateReplication(SOURCE_COLLECTION);
@@ -416,20 +412,20 @@ public class CdcrReplicationDistributedZ
     this.waitForReplicationToComplete(SOURCE_COLLECTION, SHARD1);
     this.waitForReplicationToComplete(SOURCE_COLLECTION, SHARD2);
 
+    // Commit to make the documents visible on the target
     commit(TARGET_COLLECTION);
 
     // If the non-leader node were buffering updates, then the replication must be complete
-    assertEquals(200, getNumDocs(SOURCE_COLLECTION));
-    assertEquals(200, getNumDocs(TARGET_COLLECTION));
+    assertNumDocs(200, SOURCE_COLLECTION);
+    assertNumDocs(200, TARGET_COLLECTION);
   }
 
   /**
    * Check the ops statistics.
    */
-  public void doTestOps() throws Exception {
-    this.clearSourceCollection();
-    this.clearTargetCollection();
-
+  @Test
+  @ShardsFixed(num = 4)
+  public void testOps() throws Exception {
     // Index documents
     List<SolrInputDocument> docs = new ArrayList<>();
     for (int i = 0; i < 200; i++) {
@@ -460,10 +456,9 @@ public class CdcrReplicationDistributedZ
   /**
    * Check that batch updates with deletes
    */
-  public void doTestBatchAddsWithDelete() throws Exception {
-    this.clearSourceCollection();
-    this.clearTargetCollection();
-
+  @Test
+  @ShardsFixed(num = 4)
+  public void testBatchAddsWithDelete() throws Exception {
     // Index 50 documents
     int start = 0;
     List<SolrInputDocument> docs = new ArrayList<>();
@@ -509,14 +504,16 @@ public class CdcrReplicationDistributedZ
     commit(TARGET_COLLECTION);
 
     // If the non-leader node were buffering updates, then the replication must be complete
-    assertEquals(59, getNumDocs(SOURCE_COLLECTION));
-    assertEquals(59, getNumDocs(TARGET_COLLECTION));
+    assertNumDocs(59, SOURCE_COLLECTION);
+    assertNumDocs(59, TARGET_COLLECTION);
   }
 
   /**
    * Checks that batches are correctly constructed when batch boundaries are reached.
    */
-  public void doTestBatchBoundaries() throws Exception {
+  @Test
+  @ShardsFixed(num = 4)
+  public void testBatchBoundaries() throws Exception {
     this.invokeCdcrAction(shardToLeaderJetty.get(SOURCE_COLLECTION).get(SHARD1), CdcrParams.CdcrAction.START);
     this.waitForCdcrStateReplication(SOURCE_COLLECTION);
 
@@ -528,24 +525,23 @@ public class CdcrReplicationDistributedZ
     }
     index(SOURCE_COLLECTION, docs);
 
-    assertEquals(128, getNumDocs(SOURCE_COLLECTION));
+    assertNumDocs(128, SOURCE_COLLECTION);
 
     this.waitForReplicationToComplete(SOURCE_COLLECTION, SHARD1);
     this.waitForReplicationToComplete(SOURCE_COLLECTION, SHARD2);
 
     commit(TARGET_COLLECTION);
 
-    assertEquals(128, getNumDocs(SOURCE_COLLECTION));
-    assertEquals(128, getNumDocs(TARGET_COLLECTION));
+    assertNumDocs(128, SOURCE_COLLECTION);
+    assertNumDocs(128, TARGET_COLLECTION);
   }
 
   /**
    * Check resilience of replication with delete by query executed on targets
    */
-  public void doTestResilienceWithDeleteByQueryOnTarget() throws Exception {
-    this.clearSourceCollection();
-    this.clearTargetCollection();
-
+  @Test
+  @ShardsFixed(num = 4)
+  public void testResilienceWithDeleteByQueryOnTarget() throws Exception {
     // Index 50 documents
     int start = 0;
     List<SolrInputDocument> docs = new ArrayList<>();
@@ -565,14 +561,14 @@ public class CdcrReplicationDistributedZ
     commit(TARGET_COLLECTION);
 
     // If the non-leader node were buffering updates, then the replication must be complete
-    assertEquals(50, getNumDocs(SOURCE_COLLECTION));
-    assertEquals(50, getNumDocs(TARGET_COLLECTION));
+    assertNumDocs(50, SOURCE_COLLECTION);
+    assertNumDocs(50, TARGET_COLLECTION);
 
     deleteByQuery(SOURCE_COLLECTION, "*:*");
     deleteByQuery(TARGET_COLLECTION, "*:*");
 
-    assertEquals(0, getNumDocs(SOURCE_COLLECTION));
-    assertEquals(0, getNumDocs(TARGET_COLLECTION));
+    assertNumDocs(0, SOURCE_COLLECTION);
+    assertNumDocs(0, TARGET_COLLECTION);
 
     docs.clear();
     for (; start < 100; start++) {
@@ -586,13 +582,13 @@ public class CdcrReplicationDistributedZ
 
     commit(TARGET_COLLECTION);
 
-    assertEquals(50, getNumDocs(SOURCE_COLLECTION));
-    assertEquals(50, getNumDocs(TARGET_COLLECTION));
+    assertNumDocs(50, SOURCE_COLLECTION);
+    assertNumDocs(50, TARGET_COLLECTION);
 
     deleteByQuery(TARGET_COLLECTION, "*:*");
 
-    assertEquals(50, getNumDocs(SOURCE_COLLECTION));
-    assertEquals(0, getNumDocs(TARGET_COLLECTION));
+    assertNumDocs(50, SOURCE_COLLECTION);
+    assertNumDocs(0, TARGET_COLLECTION);
 
     // Restart CDCR
     this.invokeCdcrAction(shardToLeaderJetty.get(SOURCE_COLLECTION).get(SHARD1), CdcrParams.CdcrAction.STOP);
@@ -612,79 +608,32 @@ public class CdcrReplicationDistributedZ
 
     commit(TARGET_COLLECTION);
 
-    assertEquals(100, getNumDocs(SOURCE_COLLECTION));
-    assertEquals(50, getNumDocs(TARGET_COLLECTION));
+    assertNumDocs(100, SOURCE_COLLECTION);
+    assertNumDocs(50, TARGET_COLLECTION);
   }
 
-  /**
-   * Asserts the number of transaction logs across all the shards. Since the cleaning of the update logs
-   * is not immediate on the slave nodes (it relies on the update log synchronizer that is executed every second),
-   * it will retry until the assert is successful or until the timeout.
-   */
-  protected void assertNumberOfTlogFiles(String collection, int maxNumberOfTLogs) throws Exception {
-    int cnt = 15; // timeout after 15 seconds
-    AssertionError lastAssertionError = null;
-
-    while (cnt > 0) {
-      try {
-        // Fire a DeleteById query with a commit to trigger update log cleaning on the non-leader nodes
-        List<String> ids = new ArrayList<>();
-        ids.add("_NON_EXISTING_ID_");
-        deleteById(collection, ids);
-
-        // Check the update logs
-        this._assertNumberOfTlogFiles(collection, maxNumberOfTLogs);
-        return;
-      }
-      catch (AssertionError e) {
-        lastAssertionError = e;
-        cnt--;
-        Thread.sleep(1000);
-      }
+  private int numberOfFiles(String dir) {
+    File file = new File(dir);
+    if (!file.isDirectory()) {
+      assertTrue("Path to tlog " + dir + " does not exists or it's not a directory.", false);
     }
-
-    throw new AssertionError("Timeout while trying to assert update logs @ collection="+collection, lastAssertionError);
+    log.debug("Update log dir {} contains: {}", dir, file.listFiles());
+    return file.listFiles().length;
   }
 
-  /**
-   * Asserts the number of transaction logs across all the shards
-   */
-  private void _assertNumberOfTlogFiles(String collection, int maxNumberOfTLogs) throws Exception {
+  private int getNumberOfTlogFilesOnReplicas(String collection) throws Exception {
     CollectionInfo info = collectInfo(collection);
     Map<String, List<CollectionInfo.CoreInfo>> shardToCoresMap = info.getShardToCoresMap();
 
-    int leaderLogs = 0;
-    ArrayList<Integer> replicasLogs = new ArrayList<>(Collections.nCopies(replicationFactor - 1, 0));
+    int count = 0;
 
     for (String shard : shardToCoresMap.keySet()) {
-      leaderLogs += numberOfFiles(info.getLeader(shard).ulogDir);
       for (int i = 0; i < replicationFactor - 1; i++) {
-        replicasLogs.set(i, replicasLogs.get(i) + numberOfFiles(info.getReplicas(shard).get(i).ulogDir));
+        count += numberOfFiles(info.getReplicas(shard).get(i).ulogDir);
       }
     }
 
-    for (Integer replicaLogs : replicasLogs) {
-      log.info("Number of logs in update log on leader {} and on replica {}", leaderLogs, replicaLogs);
-
-      // replica logs must be always equal or superior to leader logs
-      assertTrue(String.format(Locale.ENGLISH, "Number of tlogs on replica: %d is different than on leader: %d.",
-          replicaLogs, leaderLogs), leaderLogs <= replicaLogs);
-
-      assertTrue(String.format(Locale.ENGLISH, "Number of tlogs on leader: %d is superior to: %d.",
-          leaderLogs, maxNumberOfTLogs), maxNumberOfTLogs >= leaderLogs);
-
-      assertTrue(String.format(Locale.ENGLISH, "Number of tlogs on replica: %d is superior to: %d.",
-          replicaLogs, maxNumberOfTLogs), maxNumberOfTLogs >= replicaLogs);
-    }
-  }
-
-  private int numberOfFiles(String dir) {
-    File file = new File(dir);
-    if (!file.isDirectory()) {
-      assertTrue("Path to tlog " + dir + " does not exists or it's not a directory.", false);
-    }
-    log.debug("Update log dir {} contains: {}", dir, file.listFiles());
-    return file.listFiles().length;
+    return count;
   }
 
 }

Modified: lucene/dev/branches/lucene6835/solr/core/src/test/org/apache/solr/cloud/CdcrReplicationHandlerTest.java
URL: http://svn.apache.org/viewvc/lucene/dev/branches/lucene6835/solr/core/src/test/org/apache/solr/cloud/CdcrReplicationHandlerTest.java?rev=1721134&r1=1721133&r2=1721134&view=diff
==============================================================================
--- lucene/dev/branches/lucene6835/solr/core/src/test/org/apache/solr/cloud/CdcrReplicationHandlerTest.java (original)
+++ lucene/dev/branches/lucene6835/solr/core/src/test/org/apache/solr/cloud/CdcrReplicationHandlerTest.java Mon Dec 21 11:39:57 2015
@@ -1,6 +1,3 @@
-/*
- * Copyright (c) 2015 Renaud Delbru. All Rights Reserved.
- */
 package org.apache.solr.cloud;
 
 /*
@@ -20,20 +17,38 @@ package org.apache.solr.cloud;
  * limitations under the License.
  */
 
-import org.apache.lucene.util.LuceneTestCase.Slow;
+import org.apache.lucene.util.LuceneTestCase.Nightly;
+import org.apache.solr.client.solrj.SolrClient;
+import org.apache.solr.client.solrj.SolrQuery;
+import org.apache.solr.client.solrj.SolrServerException;
 import org.apache.solr.client.solrj.impl.CloudSolrClient;
 import org.apache.solr.common.SolrInputDocument;
+import org.apache.solr.util.DefaultSolrThreadFactory;
 import org.junit.Test;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
 
 import java.io.File;
+import java.io.IOException;
+import java.lang.invoke.MethodHandles;
 import java.util.ArrayList;
 import java.util.HashMap;
 import java.util.List;
 import java.util.Map;
-
-@Slow
+import java.util.concurrent.Executors;
+import java.util.concurrent.ScheduledExecutorService;
+import java.util.concurrent.TimeUnit;
+import java.util.concurrent.atomic.AtomicInteger;
+
+/**
+ * This class is testing the cdcr extension to the {@link org.apache.solr.handler.ReplicationHandler} and
+ * {@link org.apache.solr.handler.IndexFetcher}.
+ */
+@Nightly
 public class CdcrReplicationHandlerTest extends BaseCdcrDistributedZkTest {
 
+  private static final Logger log = LoggerFactory.getLogger(MethodHandles.lookup().lookupClass());
+
   @Override
   public void distribSetUp() throws Exception {
     schemaString = "schema15.xml";      // we need a string id
@@ -44,21 +59,13 @@ public class CdcrReplicationHandlerTest
     super.distribSetUp();
   }
 
-  @Test
-  @ShardsFixed(num = 2)
-  public void doTest() throws Exception {
-    this.doTestFullReplication();
-    this.doTestPartialReplication();
-    this.doTestPartialReplicationWithTruncatedTlog();
-    this.doTestPartialReplicationAfterPeerSync();
-  }
-
   /**
    * Test the scenario where the slave is killed from the start. The replication
    * strategy should fetch all the missing tlog files from the leader.
    */
-  public void doTestFullReplication() throws Exception {
-    this.clearSourceCollection();
+  @Test
+  @ShardsFixed(num = 2)
+  public void testFullReplication() throws Exception {
     List<CloudJettyRunner> slaves = this.getShardToSlaveJetty(SOURCE_COLLECTION, SHARD1);
     ChaosMonkey.stop(slaves.get(0).jetty);
 
@@ -70,7 +77,7 @@ public class CdcrReplicationHandlerTest
       index(SOURCE_COLLECTION, docs);
     }
 
-    assertEquals(100, getNumDocs(SOURCE_COLLECTION));
+    assertNumDocs(100, SOURCE_COLLECTION);
 
     // Restart the slave node to trigger Replication strategy
     this.restartServer(slaves.get(0));
@@ -82,8 +89,9 @@ public class CdcrReplicationHandlerTest
    * Test the scenario where the slave is killed before receiving all the documents. The replication
    * strategy should fetch all the missing tlog files from the leader.
    */
-  public void doTestPartialReplication() throws Exception {
-    this.clearSourceCollection();
+  @Test
+  @ShardsFixed(num = 2)
+  public void testPartialReplication() throws Exception {
     for (int i = 0; i < 5; i++) {
       List<SolrInputDocument> docs = new ArrayList<>();
       for (int j = i * 20; j < (i * 20) + 20; j++) {
@@ -103,7 +111,7 @@ public class CdcrReplicationHandlerTest
       index(SOURCE_COLLECTION, docs);
     }
 
-    assertEquals(200, getNumDocs(SOURCE_COLLECTION));
+    assertNumDocs(200, SOURCE_COLLECTION);
 
     // Restart the slave node to trigger Replication strategy
     this.restartServer(slaves.get(0));
@@ -117,8 +125,9 @@ public class CdcrReplicationHandlerTest
    * file on the slave node. The replication strategy should detect this truncated file, and fetch the
    * non-truncated file from the leader.
    */
-  public void doTestPartialReplicationWithTruncatedTlog() throws Exception {
-    this.clearSourceCollection();
+  @Test
+  @ShardsFixed(num = 2)
+  public void testPartialReplicationWithTruncatedTlog() throws Exception {
     CloudSolrClient client = createCloudClient(SOURCE_COLLECTION);
     List<CloudJettyRunner> slaves = this.getShardToSlaveJetty(SOURCE_COLLECTION, SHARD1);
 
@@ -139,7 +148,7 @@ public class CdcrReplicationHandlerTest
       client.close();
     }
 
-    assertEquals(200, getNumDocs(SOURCE_COLLECTION));
+    assertNumDocs(200, SOURCE_COLLECTION);
 
     // Restart the slave node to trigger Replication recovery
     this.restartServer(slaves.get(0));
@@ -154,8 +163,9 @@ public class CdcrReplicationHandlerTest
    * If a Replication strategy occurs at a later stage, it should remove this tlog file generated by PeerSync
    * and fetch the corresponding tlog files from the leader.
    */
-  public void doTestPartialReplicationAfterPeerSync() throws Exception {
-    this.clearSourceCollection();
+  @Test
+  @ShardsFixed(num = 2)
+  public void testPartialReplicationAfterPeerSync() throws Exception {
     for (int i = 0; i < 5; i++) {
       List<SolrInputDocument> docs = new ArrayList<>();
       for (int j = i * 10; j < (i * 10) + 10; j++) {
@@ -175,7 +185,7 @@ public class CdcrReplicationHandlerTest
       index(SOURCE_COLLECTION, docs);
     }
 
-    assertEquals(100, getNumDocs(SOURCE_COLLECTION));
+    assertNumDocs(100, SOURCE_COLLECTION);
 
     // Restart the slave node to trigger PeerSync recovery
     // (the update windows between leader and slave is small enough)
@@ -198,6 +208,84 @@ public class CdcrReplicationHandlerTest
     this.assertUpdateLogsEquals(SOURCE_COLLECTION, 15);
   }
 
+  /**
+   * Test the scenario where the slave is killed while the leader is still receiving updates.
+   * The slave should buffer updates while in recovery, then replay them at the end of the recovery.
+   * If updates were properly buffered and replayed, then the slave should have the same number of documents
+   * than the leader. This checks if cdcr tlog replication interferes with buffered updates - SOLR-8263.
+   */
+  @Test
+  @ShardsFixed(num = 2)
+  public void testReplicationWithBufferedUpdates() throws Exception {
+    List<CloudJettyRunner> slaves = this.getShardToSlaveJetty(SOURCE_COLLECTION, SHARD1);
+
+    AtomicInteger numDocs = new AtomicInteger(0);
+    ScheduledExecutorService executor = Executors.newSingleThreadScheduledExecutor(new DefaultSolrThreadFactory("cdcr-test-update-scheduler"));
+    executor.scheduleWithFixedDelay(new UpdateThread(numDocs), 10, 10, TimeUnit.MILLISECONDS);
+
+    // Restart the slave node to trigger Replication strategy
+    this.restartServer(slaves.get(0));
+
+    // shutdown the update thread and wait for its completion
+    executor.shutdown();
+    executor.awaitTermination(500, TimeUnit.MILLISECONDS);
+
+    // check that we have the expected number of documents in the cluster
+    assertNumDocs(numDocs.get(), SOURCE_COLLECTION);
+
+    // check that we have the expected number of documents on the slave
+    assertNumDocs(numDocs.get(), slaves.get(0));
+  }
+
+  private void assertNumDocs(int expectedNumDocs, CloudJettyRunner jetty)
+  throws InterruptedException, IOException, SolrServerException {
+    SolrClient client = createNewSolrServer(jetty.url);
+    try {
+      int cnt = 30; // timeout after 15 seconds
+      AssertionError lastAssertionError = null;
+      while (cnt > 0) {
+        try {
+          assertEquals(expectedNumDocs, client.query(new SolrQuery("*:*")).getResults().getNumFound());
+          return;
+        }
+        catch (AssertionError e) {
+          lastAssertionError = e;
+          cnt--;
+          Thread.sleep(500);
+        }
+      }
+      throw new AssertionError("Timeout while trying to assert number of documents @ " + jetty.url, lastAssertionError);
+    } finally {
+      client.close();
+    }
+  }
+
+  private class UpdateThread implements Runnable {
+
+    private AtomicInteger numDocs;
+
+    private UpdateThread(AtomicInteger numDocs) {
+      this.numDocs = numDocs;
+    }
+
+    @Override
+    public void run() {
+      try {
+        List<SolrInputDocument> docs = new ArrayList<>();
+        for (int j = numDocs.get(); j < (numDocs.get() + 10); j++) {
+          docs.add(getDoc(id, Integer.toString(j)));
+        }
+        index(SOURCE_COLLECTION, docs);
+        numDocs.getAndAdd(10);
+        log.info("Sent batch of {} updates - numDocs:{}", docs.size(), numDocs);
+      }
+      catch (Exception e) {
+        throw new RuntimeException(e);
+      }
+    }
+
+  }
+
   private List<CloudJettyRunner> getShardToSlaveJetty(String collection, String shard) {
     List<CloudJettyRunner> jetties = new ArrayList<>(shardToJetty.get(collection).get(shard));
     CloudJettyRunner leader = shardToLeaderJetty.get(collection).get(shard);

Modified: lucene/dev/branches/lucene6835/solr/core/src/test/org/apache/solr/cloud/CdcrRequestHandlerTest.java
URL: http://svn.apache.org/viewvc/lucene/dev/branches/lucene6835/solr/core/src/test/org/apache/solr/cloud/CdcrRequestHandlerTest.java?rev=1721134&r1=1721133&r2=1721134&view=diff
==============================================================================
--- lucene/dev/branches/lucene6835/solr/core/src/test/org/apache/solr/cloud/CdcrRequestHandlerTest.java (original)
+++ lucene/dev/branches/lucene6835/solr/core/src/test/org/apache/solr/cloud/CdcrRequestHandlerTest.java Mon Dec 21 11:39:57 2015
@@ -17,12 +17,12 @@ package org.apache.solr.cloud;
  * limitations under the License.
  */
 
-import org.apache.lucene.util.LuceneTestCase.Slow;
+import org.apache.lucene.util.LuceneTestCase.Nightly;
 import org.apache.solr.common.util.NamedList;
 import org.apache.solr.handler.CdcrParams;
 import org.junit.Test;
 
-@Slow
+@Nightly
 public class CdcrRequestHandlerTest extends BaseCdcrDistributedZkTest {
 
   @Override
@@ -32,16 +32,10 @@ public class CdcrRequestHandlerTest exte
     super.distribSetUp();
   }
 
+  // check that the life-cycle state is properly synchronised across nodes
   @Test
   @ShardsFixed(num = 2)
-  public void doTest() throws Exception {
-    this.doTestLifeCycleActions();
-    this.doTestCheckpointActions();
-    this.doTestBufferActions();
-  }
-
-  // check that the life-cycle state is properly synchronised across nodes
-  public void doTestLifeCycleActions() throws Exception {
+  public void testLifeCycleActions() throws Exception {
     // check initial status
     this.assertState(SOURCE_COLLECTION, CdcrParams.ProcessState.STOPPED, CdcrParams.BufferState.ENABLED);
 
@@ -69,7 +63,9 @@ public class CdcrRequestHandlerTest exte
   }
 
   // check the checkpoint API
-  public void doTestCheckpointActions() throws Exception {
+  @Test
+  @ShardsFixed(num = 2)
+  public void testCheckpointActions() throws Exception {
     // initial request on an empty index, must return -1
     NamedList rsp = invokeCdcrAction(shardToLeaderJetty.get(SOURCE_COLLECTION).get(SHARD1), CdcrParams.CdcrAction.COLLECTIONCHECKPOINT);
     assertEquals(-1l, rsp.get(CdcrParams.CHECKPOINT));
@@ -125,7 +121,9 @@ public class CdcrRequestHandlerTest exte
   }
 
   // check that the buffer state is properly synchronised across nodes
-  public void doTestBufferActions() throws Exception {
+  @Test
+  @ShardsFixed(num = 2)
+  public void testBufferActions() throws Exception {
     // check initial status
     this.assertState(SOURCE_COLLECTION, CdcrParams.ProcessState.STOPPED, CdcrParams.BufferState.ENABLED);
 

Modified: lucene/dev/branches/lucene6835/solr/core/src/test/org/apache/solr/cloud/CdcrVersionReplicationTest.java
URL: http://svn.apache.org/viewvc/lucene/dev/branches/lucene6835/solr/core/src/test/org/apache/solr/cloud/CdcrVersionReplicationTest.java?rev=1721134&r1=1721133&r2=1721134&view=diff
==============================================================================
--- lucene/dev/branches/lucene6835/solr/core/src/test/org/apache/solr/cloud/CdcrVersionReplicationTest.java (original)
+++ lucene/dev/branches/lucene6835/solr/core/src/test/org/apache/solr/cloud/CdcrVersionReplicationTest.java Mon Dec 21 11:39:57 2015
@@ -28,7 +28,10 @@ import org.apache.solr.common.util.StrUt
 import org.apache.solr.update.processor.CdcrUpdateProcessor;
 import org.apache.solr.update.processor.DistributedUpdateProcessor;
 import org.junit.Test;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
 
+import java.lang.invoke.MethodHandles;
 import java.util.HashMap;
 import java.util.List;
 import java.util.Map;
@@ -36,6 +39,8 @@ import java.util.Map;
 
 public class CdcrVersionReplicationTest extends BaseCdcrDistributedZkTest {
 
+  private static final Logger log = LoggerFactory.getLogger(MethodHandles.lookup().lookupClass());
+
   private static final String vfield = DistributedUpdateProcessor.VERSION_FIELD;
   SolrClient solrServer;
 

Modified: lucene/dev/branches/lucene6835/solr/core/src/test/org/apache/solr/cloud/ChaosMonkeyNothingIsSafeTest.java
URL: http://svn.apache.org/viewvc/lucene/dev/branches/lucene6835/solr/core/src/test/org/apache/solr/cloud/ChaosMonkeyNothingIsSafeTest.java?rev=1721134&r1=1721133&r2=1721134&view=diff
==============================================================================
--- lucene/dev/branches/lucene6835/solr/core/src/test/org/apache/solr/cloud/ChaosMonkeyNothingIsSafeTest.java (original)
+++ lucene/dev/branches/lucene6835/solr/core/src/test/org/apache/solr/cloud/ChaosMonkeyNothingIsSafeTest.java Mon Dec 21 11:39:57 2015
@@ -38,6 +38,7 @@ import org.junit.Test;
 import org.slf4j.Logger;
 import org.slf4j.LoggerFactory;
 
+import java.lang.invoke.MethodHandles;
 import java.net.ConnectException;
 import java.util.ArrayList;
 import java.util.HashSet;
@@ -51,13 +52,14 @@ import java.util.concurrent.atomic.Atomi
 public class ChaosMonkeyNothingIsSafeTest extends AbstractFullDistribZkTestBase {
   private static final int FAIL_TOLERANCE = 60;
 
-  public static Logger log = LoggerFactory.getLogger(ChaosMonkeyNothingIsSafeTest.class);
+  private static final Logger log = LoggerFactory.getLogger(MethodHandles.lookup().lookupClass());
   
   private static final Integer RUN_LENGTH = Integer.parseInt(System.getProperty("solr.tests.cloud.cm.runlength", "-1"));
 
   @BeforeClass
   public static void beforeSuperClass() {
     schemaString = "schema15.xml";      // we need a string id
+    System.setProperty("solr.autoCommit.maxTime", "15000");
     SolrCmdDistributor.testing_errorHook = new Diagnostics.Callable() {
       @Override
       public void call(Object... data) {
@@ -72,6 +74,7 @@ public class ChaosMonkeyNothingIsSafeTes
   
   @AfterClass
   public static void afterSuperClass() {
+    System.clearProperty("solr.autoCommit.maxTime");
     SolrCmdDistributor.testing_errorHook = null;
   }
   

Modified: lucene/dev/branches/lucene6835/solr/core/src/test/org/apache/solr/cloud/ChaosMonkeySafeLeaderTest.java
URL: http://svn.apache.org/viewvc/lucene/dev/branches/lucene6835/solr/core/src/test/org/apache/solr/cloud/ChaosMonkeySafeLeaderTest.java?rev=1721134&r1=1721133&r2=1721134&view=diff
==============================================================================
--- lucene/dev/branches/lucene6835/solr/core/src/test/org/apache/solr/cloud/ChaosMonkeySafeLeaderTest.java (original)
+++ lucene/dev/branches/lucene6835/solr/core/src/test/org/apache/solr/cloud/ChaosMonkeySafeLeaderTest.java Mon Dec 21 11:39:57 2015
@@ -40,6 +40,7 @@ public class ChaosMonkeySafeLeaderTest e
   @BeforeClass
   public static void beforeSuperClass() {
     schemaString = "schema15.xml";      // we need a string id
+    System.setProperty("solr.autoCommit.maxTime", "15000");
     SolrCmdDistributor.testing_errorHook = new Diagnostics.Callable() {
       @Override
       public void call(Object... data) {
@@ -54,6 +55,7 @@ public class ChaosMonkeySafeLeaderTest e
   
   @AfterClass
   public static void afterSuperClass() {
+    System.clearProperty("solr.autoCommit.maxTime");
     SolrCmdDistributor.testing_errorHook = null;
   }
   

Modified: lucene/dev/branches/lucene6835/solr/core/src/test/org/apache/solr/cloud/ChaosMonkeyShardSplitTest.java
URL: http://svn.apache.org/viewvc/lucene/dev/branches/lucene6835/solr/core/src/test/org/apache/solr/cloud/ChaosMonkeyShardSplitTest.java?rev=1721134&r1=1721133&r2=1721134&view=diff
==============================================================================
--- lucene/dev/branches/lucene6835/solr/core/src/test/org/apache/solr/cloud/ChaosMonkeyShardSplitTest.java (original)
+++ lucene/dev/branches/lucene6835/solr/core/src/test/org/apache/solr/cloud/ChaosMonkeyShardSplitTest.java Mon Dec 21 11:39:57 2015
@@ -34,8 +34,11 @@ import org.apache.solr.update.UpdateShar
 import org.apache.zookeeper.KeeperException;
 import org.junit.Ignore;
 import org.junit.Test;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
 
 import java.io.IOException;
+import java.lang.invoke.MethodHandles;
 import java.util.Collection;
 import java.util.List;
 import java.util.concurrent.atomic.AtomicInteger;
@@ -47,6 +50,8 @@ import java.util.concurrent.atomic.Atomi
 @Ignore("SOLR-4944")
 public class ChaosMonkeyShardSplitTest extends ShardSplitTest {
 
+  private static final Logger log = LoggerFactory.getLogger(MethodHandles.lookup().lookupClass());
+
   static final int TIMEOUT = 10000;
   private AtomicInteger killCounter = new AtomicInteger();
 

Modified: lucene/dev/branches/lucene6835/solr/core/src/test/org/apache/solr/cloud/CleanupOldIndexTest.java
URL: http://svn.apache.org/viewvc/lucene/dev/branches/lucene6835/solr/core/src/test/org/apache/solr/cloud/CleanupOldIndexTest.java?rev=1721134&r1=1721133&r2=1721134&view=diff
==============================================================================
--- lucene/dev/branches/lucene6835/solr/core/src/test/org/apache/solr/cloud/CleanupOldIndexTest.java (original)
+++ lucene/dev/branches/lucene6835/solr/core/src/test/org/apache/solr/cloud/CleanupOldIndexTest.java Mon Dec 21 11:39:57 2015
@@ -33,15 +33,11 @@ import org.apache.solr.common.cloud.ZkSt
 import org.apache.solr.core.CoreContainer;
 import org.apache.solr.core.SolrCore;
 import org.apache.solr.handler.SnapShooter;
-import org.apache.solr.servlet.SolrDispatchFilter;
 import org.junit.Test;
-import org.slf4j.Logger;
-import org.slf4j.LoggerFactory;
 
 @Slow
 public class CleanupOldIndexTest extends AbstractFullDistribZkTestBase {
 
-  private static Logger log = LoggerFactory.getLogger(CleanupOldIndexTest.class);
   private StoppableIndexingThread indexThread;
 
   public CleanupOldIndexTest() {
@@ -79,8 +75,7 @@ public class CleanupOldIndexTest extends
 
     // create some "old" index directories
     JettySolrRunner jetty = chaosMonkey.getShard("shard1", 1);
-    SolrDispatchFilter filter = (SolrDispatchFilter)jetty.getDispatchFilter().getFilter();
-    CoreContainer coreContainer = filter.getCores();
+    CoreContainer coreContainer = jetty.getCoreContainer();
     File dataDir = null;
     try (SolrCore solrCore = coreContainer.getCore("collection1")) {
       dataDir = new File(solrCore.getDataDir());

Modified: lucene/dev/branches/lucene6835/solr/core/src/test/org/apache/solr/cloud/CloudExitableDirectoryReaderTest.java
URL: http://svn.apache.org/viewvc/lucene/dev/branches/lucene6835/solr/core/src/test/org/apache/solr/cloud/CloudExitableDirectoryReaderTest.java?rev=1721134&r1=1721133&r2=1721134&view=diff
==============================================================================
--- lucene/dev/branches/lucene6835/solr/core/src/test/org/apache/solr/cloud/CloudExitableDirectoryReaderTest.java (original)
+++ lucene/dev/branches/lucene6835/solr/core/src/test/org/apache/solr/cloud/CloudExitableDirectoryReaderTest.java Mon Dec 21 11:39:57 2015
@@ -19,19 +19,18 @@ package org.apache.solr.cloud;
 
 
 import org.apache.lucene.util.LuceneTestCase.Slow;
+
+
 import org.apache.lucene.util.TestUtil;
 import org.apache.solr.client.solrj.response.QueryResponse;
 import org.apache.solr.common.params.ModifiableSolrParams;
 import org.junit.Test;
-import org.slf4j.Logger;
-import org.slf4j.LoggerFactory;
 
 /**
 * Distributed test for {@link org.apache.lucene.index.ExitableDirectoryReader} 
 */
 @Slow
 public class CloudExitableDirectoryReaderTest extends AbstractFullDistribZkTestBase {
-  public static Logger log = LoggerFactory.getLogger(CloudExitableDirectoryReaderTest.class);
   private static final int NUM_DOCS_PER_TYPE = 20;
   private static final String sleep = "2";
   

Modified: lucene/dev/branches/lucene6835/solr/core/src/test/org/apache/solr/cloud/ClusterStateUpdateTest.java
URL: http://svn.apache.org/viewvc/lucene/dev/branches/lucene6835/solr/core/src/test/org/apache/solr/cloud/ClusterStateUpdateTest.java?rev=1721134&r1=1721133&r2=1721134&view=diff
==============================================================================
--- lucene/dev/branches/lucene6835/solr/core/src/test/org/apache/solr/cloud/ClusterStateUpdateTest.java (original)
+++ lucene/dev/branches/lucene6835/solr/core/src/test/org/apache/solr/cloud/ClusterStateUpdateTest.java Mon Dec 21 11:39:57 2015
@@ -17,6 +17,14 @@ package org.apache.solr.cloud;
  * limitations under the License.
  */
 
+import java.io.File;
+import java.io.IOException;
+import java.lang.invoke.MethodHandles;
+import java.util.HashMap;
+import java.util.Map;
+import java.util.Set;
+
+import com.google.common.collect.ImmutableMap;
 import org.apache.lucene.util.LuceneTestCase.Slow;
 import org.apache.solr.SolrTestCaseJ4;
 import org.apache.solr.common.cloud.ClusterState;
@@ -27,8 +35,6 @@ import org.apache.solr.common.cloud.ZkNo
 import org.apache.solr.common.cloud.ZkStateReader;
 import org.apache.solr.common.util.Utils;
 import org.apache.solr.core.CoreContainer;
-import org.apache.solr.core.CoreDescriptor;
-import org.apache.solr.core.SolrCore;
 import org.apache.zookeeper.CreateMode;
 import org.junit.AfterClass;
 import org.junit.BeforeClass;
@@ -36,16 +42,9 @@ import org.junit.Test;
 import org.slf4j.Logger;
 import org.slf4j.LoggerFactory;
 
-import java.io.File;
-import java.io.IOException;
-import java.util.HashMap;
-import java.util.Map;
-import java.util.Set;
-
 @Slow
 public class ClusterStateUpdateTest extends SolrTestCaseJ4  {
-  protected static Logger log = LoggerFactory
-      .getLogger(AbstractZkTestCase.class);
+  private static final Logger log = LoggerFactory.getLogger(MethodHandles.lookup().lookupClass());
 
   private static final boolean VERBOSE = false;
 
@@ -157,10 +156,7 @@ public class ClusterStateUpdateTest exte
         CreateMode.PERSISTENT, true);
     zkClient.close();
 
-    CoreDescriptor dcore = buildCoreDescriptor(container1, "testcore", "testcore")
-                              .withDataDir(dataDir4.getAbsolutePath()).build();
-
-    SolrCore core = container1.create(dcore);
+    container1.create("testcore", ImmutableMap.of("dataDir", dataDir4.getAbsolutePath()));
     
     ZkController zkController2 = container2.getZkController();
 

Modified: lucene/dev/branches/lucene6835/solr/core/src/test/org/apache/solr/cloud/CollectionReloadTest.java
URL: http://svn.apache.org/viewvc/lucene/dev/branches/lucene6835/solr/core/src/test/org/apache/solr/cloud/CollectionReloadTest.java?rev=1721134&r1=1721133&r2=1721134&view=diff
==============================================================================
--- lucene/dev/branches/lucene6835/solr/core/src/test/org/apache/solr/cloud/CollectionReloadTest.java (original)
+++ lucene/dev/branches/lucene6835/solr/core/src/test/org/apache/solr/cloud/CollectionReloadTest.java Mon Dec 21 11:39:57 2015
@@ -18,6 +18,7 @@ package org.apache.solr.cloud;
  */
 
 import java.io.IOException;
+import java.lang.invoke.MethodHandles;
 import java.util.concurrent.TimeUnit;
 
 import org.apache.lucene.util.LuceneTestCase.Slow;
@@ -47,7 +48,7 @@ import org.slf4j.LoggerFactory;
 @SuppressSSL(bugUrl = "https://issues.apache.org/jira/browse/SOLR-5776")
 public class CollectionReloadTest extends AbstractFullDistribZkTestBase {
 
-  protected static final transient Logger log = LoggerFactory.getLogger(CollectionReloadTest.class);
+  private static final Logger log = LoggerFactory.getLogger(MethodHandles.lookup().lookupClass());
 
   public CollectionReloadTest() {
     super();

Modified: lucene/dev/branches/lucene6835/solr/core/src/test/org/apache/solr/cloud/CollectionsAPIDistributedZkTest.java
URL: http://svn.apache.org/viewvc/lucene/dev/branches/lucene6835/solr/core/src/test/org/apache/solr/cloud/CollectionsAPIDistributedZkTest.java?rev=1721134&r1=1721133&r2=1721134&view=diff
==============================================================================
--- lucene/dev/branches/lucene6835/solr/core/src/test/org/apache/solr/cloud/CollectionsAPIDistributedZkTest.java (original)
+++ lucene/dev/branches/lucene6835/solr/core/src/test/org/apache/solr/cloud/CollectionsAPIDistributedZkTest.java Mon Dec 21 11:39:57 2015
@@ -22,23 +22,13 @@ import javax.management.MBeanServerFacto
 import javax.management.ObjectName;
 import java.io.File;
 import java.io.IOException;
+import java.lang.invoke.MethodHandles;
 import java.lang.management.ManagementFactory;
 import java.nio.file.Files;
 import java.nio.file.Path;
 import java.nio.file.Paths;
-import java.util.ArrayList;
-import java.util.Collection;
-import java.util.Collections;
-import java.util.HashMap;
-import java.util.HashSet;
-import java.util.Iterator;
-import java.util.LinkedList;
-import java.util.List;
-import java.util.Map;
+import java.util.*;
 import java.util.Map.Entry;
-import java.util.Objects;
-import java.util.Properties;
-import java.util.Set;
 import java.util.concurrent.TimeUnit;
 
 import org.apache.lucene.util.LuceneTestCase.Slow;
@@ -79,15 +69,16 @@ import org.apache.solr.common.util.StrUt
 import org.apache.solr.core.CoreContainer;
 import org.apache.solr.core.SolrCore;
 import org.apache.solr.core.SolrInfoMBean.Category;
-import org.apache.solr.servlet.SolrDispatchFilter;
 import org.apache.solr.util.TimeOut;
 import org.junit.Test;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
 
 import static org.apache.solr.cloud.OverseerCollectionMessageHandler.NUM_SLICES;
-import static org.apache.solr.common.util.Utils.makeMap;
 import static org.apache.solr.common.cloud.ZkStateReader.CORE_NAME_PROP;
 import static org.apache.solr.common.cloud.ZkStateReader.MAX_SHARDS_PER_NODE;
 import static org.apache.solr.common.cloud.ZkStateReader.REPLICATION_FACTOR;
+import static org.apache.solr.common.util.Utils.makeMap;
 
 /**
  * Tests the Cloud Collections API.
@@ -95,6 +86,8 @@ import static org.apache.solr.common.clo
 @Slow
 public class CollectionsAPIDistributedZkTest extends AbstractFullDistribZkTestBase {
 
+  private static final Logger log = LoggerFactory.getLogger(MethodHandles.lookup().lookupClass());
+
   private static final String DEFAULT_COLLECTION = "collection1";
 
   // we randomly use a second config set rather than just one
@@ -440,8 +433,8 @@ public class CollectionsAPIDistributedZk
       params.set("collection.configName", "conf1");
     }
     
-    String nn1 = ((SolrDispatchFilter) jettys.get(0).getDispatchFilter().getFilter()).getCores().getZkController().getNodeName();
-    String nn2 =  ((SolrDispatchFilter) jettys.get(1).getDispatchFilter().getFilter()).getCores().getZkController().getNodeName();
+    String nn1 = jettys.get(0).getCoreContainer().getZkController().getNodeName();
+    String nn2 =  jettys.get(1).getCoreContainer().getZkController().getNodeName();
     
     params.set(OverseerCollectionMessageHandler.CREATE_NODE_SET, nn1 + "," + nn2);
     request = new QueryRequest(params);
@@ -916,20 +909,17 @@ public class CollectionsAPIDistributedZk
   }
 
   private void checkInstanceDirs(JettySolrRunner jetty) throws IOException {
-    CoreContainer cores = ((SolrDispatchFilter) jetty.getDispatchFilter()
-        .getFilter()).getCores();
+    CoreContainer cores = jetty.getCoreContainer();
     Collection<SolrCore> theCores = cores.getCores();
     for (SolrCore core : theCores) {
 
       // look for core props file
-      assertTrue("Could not find expected core.properties file",
-          new File((String) core.getStatistics().get("instanceDir"),
-              "core.properties").exists());
+      Path instancedir = (Path) core.getStatistics().get("instanceDir");
+      assertTrue("Could not find expected core.properties file", Files.exists(instancedir.resolve("core.properties")));
 
       Path expected = Paths.get(jetty.getSolrHome()).toAbsolutePath().resolve("cores").resolve(core.getName());
-      Path reported = Paths.get((String) core.getStatistics().get("instanceDir"));
 
-      assertTrue("Expected: " + expected + "\nFrom core stats: " + reported, Files.isSameFile(expected, reported));
+      assertTrue("Expected: " + expected + "\nFrom core stats: " + instancedir, Files.isSameFile(expected, instancedir));
 
     }
   }

Modified: lucene/dev/branches/lucene6835/solr/core/src/test/org/apache/solr/cloud/CollectionsAPISolrJTests.java
URL: http://svn.apache.org/viewvc/lucene/dev/branches/lucene6835/solr/core/src/test/org/apache/solr/cloud/CollectionsAPISolrJTests.java?rev=1721134&r1=1721133&r2=1721134&view=diff
==============================================================================
--- lucene/dev/branches/lucene6835/solr/core/src/test/org/apache/solr/cloud/CollectionsAPISolrJTests.java (original)
+++ lucene/dev/branches/lucene6835/solr/core/src/test/org/apache/solr/cloud/CollectionsAPISolrJTests.java Mon Dec 21 11:39:57 2015
@@ -17,6 +17,17 @@ package org.apache.solr.cloud;
  * limitations under the License.
  */
 
+import java.io.File;
+import java.io.IOException;
+import java.util.ArrayList;
+import java.util.Collection;
+import java.util.Collections;
+import java.util.List;
+import java.util.Map;
+import java.util.Objects;
+import java.util.Properties;
+import java.util.concurrent.TimeUnit;
+
 import org.apache.commons.codec.binary.StringUtils;
 import org.apache.lucene.util.LuceneTestCase;
 import org.apache.lucene.util.TestUtil;
@@ -37,17 +48,6 @@ import org.apache.solr.util.TimeOut;
 import org.apache.zookeeper.KeeperException;
 import org.junit.Test;
 
-import java.io.File;
-import java.io.IOException;
-import java.util.ArrayList;
-import java.util.Collection;
-import java.util.Collections;
-import java.util.List;
-import java.util.Map;
-import java.util.Objects;
-import java.util.Properties;
-import java.util.concurrent.TimeUnit;
-
 import static org.apache.solr.cloud.ReplicaPropertiesBase.verifyUniqueAcrossCollection;
 
 @LuceneTestCase.Slow
@@ -232,12 +232,10 @@ public class CollectionsAPISolrJTests ex
     String collectionName = "solrj_test_core_props";
     
     File tmpDir = createTempDir("testPropertyParamsForCreate").toFile();
-    File instanceDir = new File(tmpDir, "instanceDir-" + TestUtil.randomSimpleString(random(), 1, 5));
     File dataDir = new File(tmpDir, "dataDir-" + TestUtil.randomSimpleString(random(), 1, 5));
     File ulogDir = new File(tmpDir, "ulogDir-" + TestUtil.randomSimpleString(random(), 1, 5));
 
     Properties properties = new Properties();
-    properties.put(CoreAdminParams.INSTANCE_DIR, instanceDir.getAbsolutePath());
     properties.put(CoreAdminParams.DATA_DIR, dataDir.getAbsolutePath());
     properties.put(CoreAdminParams.ULOG_DIR, ulogDir.getAbsolutePath());
 
@@ -262,9 +260,6 @@ public class CollectionsAPISolrJTests ex
       CoreAdminResponse status = CoreAdminRequest.getStatus(replica1.getStr("core"), client);
       NamedList<Object> coreStatus = status.getCoreStatus(replica1.getStr("core"));
       String dataDirStr = (String) coreStatus.get("dataDir");
-      String instanceDirStr = (String) coreStatus.get("instanceDir");
-      assertEquals("Instance dir does not match param passed in property.instanceDir syntax",
-          new File(instanceDirStr).getAbsolutePath(), instanceDir.getAbsolutePath());
       assertEquals("Data dir does not match param given in property.dataDir syntax",
           new File(dataDirStr).getAbsolutePath(), dataDir.getAbsolutePath());
     }

Modified: lucene/dev/branches/lucene6835/solr/core/src/test/org/apache/solr/cloud/ConcurrentDeleteAndCreateCollectionTest.java
URL: http://svn.apache.org/viewvc/lucene/dev/branches/lucene6835/solr/core/src/test/org/apache/solr/cloud/ConcurrentDeleteAndCreateCollectionTest.java?rev=1721134&r1=1721133&r2=1721134&view=diff
==============================================================================
--- lucene/dev/branches/lucene6835/solr/core/src/test/org/apache/solr/cloud/ConcurrentDeleteAndCreateCollectionTest.java (original)
+++ lucene/dev/branches/lucene6835/solr/core/src/test/org/apache/solr/cloud/ConcurrentDeleteAndCreateCollectionTest.java Mon Dec 21 11:39:57 2015
@@ -43,8 +43,7 @@ public class ConcurrentDeleteAndCreateCo
   @Before
   public void setUp() throws Exception {
     super.setUp();
-    final File solrXml = getFile("solr").toPath().resolve("solr.xml").toFile();
-    solrCluster = new MiniSolrCloudCluster(1, createTempDir().toFile(), solrXml, buildJettyConfig("/solr"));
+    solrCluster = new MiniSolrCloudCluster(1, createTempDir(), buildJettyConfig("/solr"));
   }
   
   @Override

Modified: lucene/dev/branches/lucene6835/solr/core/src/test/org/apache/solr/cloud/CustomCollectionTest.java
URL: http://svn.apache.org/viewvc/lucene/dev/branches/lucene6835/solr/core/src/test/org/apache/solr/cloud/CustomCollectionTest.java?rev=1721134&r1=1721133&r2=1721134&view=diff
==============================================================================
--- lucene/dev/branches/lucene6835/solr/core/src/test/org/apache/solr/cloud/CustomCollectionTest.java (original)
+++ lucene/dev/branches/lucene6835/solr/core/src/test/org/apache/solr/cloud/CustomCollectionTest.java Mon Dec 21 11:39:57 2015
@@ -38,8 +38,11 @@ import org.apache.solr.common.params.Col
 import org.apache.solr.common.params.ModifiableSolrParams;
 import org.apache.solr.common.util.Utils;
 import org.junit.Test;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
 
 import java.io.IOException;
+import java.lang.invoke.MethodHandles;
 import java.util.ArrayList;
 import java.util.HashMap;
 import java.util.List;
@@ -61,6 +64,8 @@ import static org.apache.solr.common.par
 @SuppressSSL(bugUrl = "https://issues.apache.org/jira/browse/SOLR-5776")
 public class CustomCollectionTest extends AbstractFullDistribZkTestBase {
 
+  private static final Logger log = LoggerFactory.getLogger(MethodHandles.lookup().lookupClass());
+
   private static final boolean DEBUG = false;
 
   protected String getSolrXml() {

Modified: lucene/dev/branches/lucene6835/solr/core/src/test/org/apache/solr/cloud/DeleteInactiveReplicaTest.java
URL: http://svn.apache.org/viewvc/lucene/dev/branches/lucene6835/solr/core/src/test/org/apache/solr/cloud/DeleteInactiveReplicaTest.java?rev=1721134&r1=1721133&r2=1721134&view=diff
==============================================================================
--- lucene/dev/branches/lucene6835/solr/core/src/test/org/apache/solr/cloud/DeleteInactiveReplicaTest.java (original)
+++ lucene/dev/branches/lucene6835/solr/core/src/test/org/apache/solr/cloud/DeleteInactiveReplicaTest.java Mon Dec 21 11:39:57 2015
@@ -19,6 +19,7 @@ package org.apache.solr.cloud;
 
 import static org.apache.solr.cloud.CollectionsAPIDistributedZkTest.*;
 
+import java.lang.invoke.MethodHandles;
 import java.net.URL;
 import java.util.HashMap;
 import java.util.List;
@@ -40,9 +41,13 @@ import org.apache.solr.common.util.Named
 import org.apache.solr.common.util.Utils;
 import org.apache.solr.util.TimeOut;
 import org.junit.Test;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
 
 public class DeleteInactiveReplicaTest extends AbstractFullDistribZkTestBase{
 
+  private static final Logger log = LoggerFactory.getLogger(MethodHandles.lookup().lookupClass());
+
   @Test
   public void deleteInactiveReplicaTest() throws Exception {
     try (CloudSolrClient client = createCloudClient(null)) {

Modified: lucene/dev/branches/lucene6835/solr/core/src/test/org/apache/solr/cloud/DeleteLastCustomShardedReplicaTest.java
URL: http://svn.apache.org/viewvc/lucene/dev/branches/lucene6835/solr/core/src/test/org/apache/solr/cloud/DeleteLastCustomShardedReplicaTest.java?rev=1721134&r1=1721133&r2=1721134&view=diff
==============================================================================
--- lucene/dev/branches/lucene6835/solr/core/src/test/org/apache/solr/cloud/DeleteLastCustomShardedReplicaTest.java (original)
+++ lucene/dev/branches/lucene6835/solr/core/src/test/org/apache/solr/cloud/DeleteLastCustomShardedReplicaTest.java Mon Dec 21 11:39:57 2015
@@ -31,8 +31,11 @@ import org.apache.solr.common.params.Sol
 import org.apache.solr.common.util.Utils;
 import org.apache.solr.util.TimeOut;
 import org.junit.Test;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
 
 import java.io.IOException;
+import java.lang.invoke.MethodHandles;
 import java.util.HashMap;
 import java.util.List;
 import java.util.Map;
@@ -45,6 +48,8 @@ import static org.apache.solr.common.par
 
 public class DeleteLastCustomShardedReplicaTest extends AbstractFullDistribZkTestBase {
 
+  private static final Logger log = LoggerFactory.getLogger(MethodHandles.lookup().lookupClass());
+
   protected String getSolrXml() {
     return "solr-no-core.xml";
   }

Modified: lucene/dev/branches/lucene6835/solr/core/src/test/org/apache/solr/cloud/DeleteReplicaTest.java
URL: http://svn.apache.org/viewvc/lucene/dev/branches/lucene6835/solr/core/src/test/org/apache/solr/cloud/DeleteReplicaTest.java?rev=1721134&r1=1721133&r2=1721134&view=diff
==============================================================================
--- lucene/dev/branches/lucene6835/solr/core/src/test/org/apache/solr/cloud/DeleteReplicaTest.java (original)
+++ lucene/dev/branches/lucene6835/solr/core/src/test/org/apache/solr/cloud/DeleteReplicaTest.java Mon Dec 21 11:39:57 2015
@@ -34,9 +34,12 @@ import org.apache.solr.common.params.Sol
 import org.apache.solr.common.util.NamedList;
 import org.apache.solr.util.TimeOut;
 import org.junit.Test;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
 
 import java.io.File;
 import java.io.IOException;
+import java.lang.invoke.MethodHandles;
 import java.util.HashMap;
 import java.util.List;
 import java.util.Map;
@@ -50,6 +53,8 @@ import static org.apache.solr.common.par
 
 public class DeleteReplicaTest extends AbstractFullDistribZkTestBase {
 
+  private static final Logger log = LoggerFactory.getLogger(MethodHandles.lookup().lookupClass());
+
   protected String getSolrXml() {
     return "solr-no-core.xml";
   }

Modified: lucene/dev/branches/lucene6835/solr/core/src/test/org/apache/solr/cloud/DistribCursorPagingTest.java
URL: http://svn.apache.org/viewvc/lucene/dev/branches/lucene6835/solr/core/src/test/org/apache/solr/cloud/DistribCursorPagingTest.java?rev=1721134&r1=1721133&r2=1721134&view=diff
==============================================================================
--- lucene/dev/branches/lucene6835/solr/core/src/test/org/apache/solr/cloud/DistribCursorPagingTest.java (original)
+++ lucene/dev/branches/lucene6835/solr/core/src/test/org/apache/solr/cloud/DistribCursorPagingTest.java Mon Dec 21 11:39:57 2015
@@ -47,6 +47,7 @@ import org.slf4j.Logger;
 import org.slf4j.LoggerFactory;
 
 import java.io.IOException;
+import java.lang.invoke.MethodHandles;
 import java.util.ArrayList;
 import java.util.Collection;
 import java.util.List;
@@ -62,7 +63,7 @@ import java.util.Map;
 @Slow
 public class DistribCursorPagingTest extends AbstractFullDistribZkTestBase {
 
-  public static Logger log = LoggerFactory.getLogger(DistribCursorPagingTest.class);
+  private static final Logger log = LoggerFactory.getLogger(MethodHandles.lookup().lookupClass());
 
   public DistribCursorPagingTest() {
     System.setProperty("solr.test.useFilterForSortedQuery", Boolean.toString(random().nextBoolean()));

Modified: lucene/dev/branches/lucene6835/solr/core/src/test/org/apache/solr/cloud/DistribDocExpirationUpdateProcessorTest.java
URL: http://svn.apache.org/viewvc/lucene/dev/branches/lucene6835/solr/core/src/test/org/apache/solr/cloud/DistribDocExpirationUpdateProcessorTest.java?rev=1721134&r1=1721133&r2=1721134&view=diff
==============================================================================
--- lucene/dev/branches/lucene6835/solr/core/src/test/org/apache/solr/cloud/DistribDocExpirationUpdateProcessorTest.java (original)
+++ lucene/dev/branches/lucene6835/solr/core/src/test/org/apache/solr/cloud/DistribDocExpirationUpdateProcessorTest.java Mon Dec 21 11:39:57 2015
@@ -32,6 +32,7 @@ import org.slf4j.Logger;
 import org.slf4j.LoggerFactory;
 
 import java.io.IOException;
+import java.lang.invoke.MethodHandles;
 import java.util.List;
 import java.util.Map;
 import java.util.Set;
@@ -43,7 +44,7 @@ import java.util.concurrent.TimeUnit;
 @Slow // Has to do some sleeping to wait for a future expiration
 public class DistribDocExpirationUpdateProcessorTest extends AbstractFullDistribZkTestBase {
 
-  public static Logger log = LoggerFactory.getLogger(DistribDocExpirationUpdateProcessorTest.class);
+  private static final Logger log = LoggerFactory.getLogger(MethodHandles.lookup().lookupClass());
 
   public DistribDocExpirationUpdateProcessorTest() {
     configString = DocExpirationUpdateProcessorFactoryTest.CONFIG_XML;

Modified: lucene/dev/branches/lucene6835/solr/core/src/test/org/apache/solr/cloud/DistribJoinFromCollectionTest.java
URL: http://svn.apache.org/viewvc/lucene/dev/branches/lucene6835/solr/core/src/test/org/apache/solr/cloud/DistribJoinFromCollectionTest.java?rev=1721134&r1=1721133&r2=1721134&view=diff
==============================================================================
--- lucene/dev/branches/lucene6835/solr/core/src/test/org/apache/solr/cloud/DistribJoinFromCollectionTest.java (original)
+++ lucene/dev/branches/lucene6835/solr/core/src/test/org/apache/solr/cloud/DistribJoinFromCollectionTest.java Mon Dec 21 11:39:57 2015
@@ -34,10 +34,13 @@ import org.junit.After;
 import org.junit.Before;
 import org.apache.commons.lang.StringUtils;
 import org.junit.Test;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
 
 import static org.hamcrest.CoreMatchers.*;
 
 import java.io.IOException;
+import java.lang.invoke.MethodHandles;
 import java.util.HashSet;
 import java.util.Set;
 
@@ -45,7 +48,9 @@ import java.util.Set;
  * Tests using fromIndex that points to a collection in SolrCloud mode.
  */
 public class DistribJoinFromCollectionTest extends AbstractFullDistribZkTestBase {
-  
+
+  private static final Logger log = LoggerFactory.getLogger(MethodHandles.lookup().lookupClass());
+
   final private static String[] scoreModes = {"avg","max","min","total"};
 
   public DistribJoinFromCollectionTest() {

Modified: lucene/dev/branches/lucene6835/solr/core/src/test/org/apache/solr/cloud/DistributedVersionInfoTest.java
URL: http://svn.apache.org/viewvc/lucene/dev/branches/lucene6835/solr/core/src/test/org/apache/solr/cloud/DistributedVersionInfoTest.java?rev=1721134&r1=1721133&r2=1721134&view=diff
==============================================================================
--- lucene/dev/branches/lucene6835/solr/core/src/test/org/apache/solr/cloud/DistributedVersionInfoTest.java (original)
+++ lucene/dev/branches/lucene6835/solr/core/src/test/org/apache/solr/cloud/DistributedVersionInfoTest.java Mon Dec 21 11:39:57 2015
@@ -18,6 +18,7 @@ package org.apache.solr.cloud;
  */
 
 import java.io.IOException;
+import java.lang.invoke.MethodHandles;
 import java.util.ArrayList;
 import java.util.Collections;
 import java.util.HashSet;
@@ -61,8 +62,7 @@ import static org.apache.solr.update.pro
 @SuppressSSL(bugUrl = "https://issues.apache.org/jira/browse/SOLR-5776")
 public class DistributedVersionInfoTest extends AbstractFullDistribZkTestBase {
 
-  protected static final transient Logger log =
-      LoggerFactory.getLogger(DistributedVersionInfoTest.class);
+  private static final Logger log = LoggerFactory.getLogger(MethodHandles.lookup().lookupClass());
 
   protected static final int maxWaitSecsToSeeAllActive = 30;
 

Modified: lucene/dev/branches/lucene6835/solr/core/src/test/org/apache/solr/cloud/HttpPartitionTest.java
URL: http://svn.apache.org/viewvc/lucene/dev/branches/lucene6835/solr/core/src/test/org/apache/solr/cloud/HttpPartitionTest.java?rev=1721134&r1=1721133&r2=1721134&view=diff
==============================================================================
--- lucene/dev/branches/lucene6835/solr/core/src/test/org/apache/solr/cloud/HttpPartitionTest.java (original)
+++ lucene/dev/branches/lucene6835/solr/core/src/test/org/apache/solr/cloud/HttpPartitionTest.java Mon Dec 21 11:39:57 2015
@@ -19,6 +19,7 @@ package org.apache.solr.cloud;
 
 import java.io.File;
 import java.io.IOException;
+import java.lang.invoke.MethodHandles;
 import java.nio.charset.StandardCharsets;
 import java.util.ArrayList;
 import java.util.Collection;
@@ -51,7 +52,6 @@ import org.apache.solr.common.cloud.ZkSt
 import org.apache.solr.common.util.NamedList;
 import org.apache.solr.core.CoreContainer;
 import org.apache.solr.core.SolrCore;
-import org.apache.solr.servlet.SolrDispatchFilter;
 import org.apache.solr.update.UpdateLog;
 import org.apache.solr.util.MockCoreContainer.MockCoreDescriptor;
 import org.apache.solr.util.RTimer;
@@ -68,8 +68,7 @@ import org.slf4j.LoggerFactory;
 @SuppressSSL(bugUrl = "https://issues.apache.org/jira/browse/SOLR-5776")
 public class HttpPartitionTest extends AbstractFullDistribZkTestBase {
   
-  protected static final transient Logger log =
-      LoggerFactory.getLogger(HttpPartitionTest.class);
+  private static final Logger log = LoggerFactory.getLogger(MethodHandles.lookup().lookupClass());
   
   // To prevent the test assertions firing too fast before cluster state
   // recognizes (and propagates) partitions
@@ -137,7 +136,7 @@ public class HttpPartitionTest extends A
     Replica leader = cloudClient.getZkStateReader().getLeaderRetry(testCollectionName, shardId);
     JettySolrRunner leaderJetty = getJettyOnPort(getReplicaPort(leader));
 
-    CoreContainer cores = ((SolrDispatchFilter)leaderJetty.getDispatchFilter().getFilter()).getCores();
+    CoreContainer cores = leaderJetty.getCoreContainer();
     ZkController zkController = cores.getZkController();
     assertNotNull("ZkController is null", zkController);
 
@@ -310,8 +309,7 @@ public class HttpPartitionTest extends A
 
     // Get the max version from the replica core to make sure it gets updated after recovery (see SOLR-7625)
     JettySolrRunner replicaJetty = getJettyOnPort(getReplicaPort(notLeader));
-    SolrDispatchFilter filter = (SolrDispatchFilter)replicaJetty.getDispatchFilter().getFilter();
-    CoreContainer coreContainer = filter.getCores();
+    CoreContainer coreContainer = replicaJetty.getCoreContainer();
     ZkCoreNodeProps replicaCoreNodeProps = new ZkCoreNodeProps(notLeader);
     String coreName = replicaCoreNodeProps.getCoreName();
     Long maxVersionBefore = null;

Modified: lucene/dev/branches/lucene6835/solr/core/src/test/org/apache/solr/cloud/LeaderElectionIntegrationTest.java
URL: http://svn.apache.org/viewvc/lucene/dev/branches/lucene6835/solr/core/src/test/org/apache/solr/cloud/LeaderElectionIntegrationTest.java?rev=1721134&r1=1721133&r2=1721134&view=diff
==============================================================================
--- lucene/dev/branches/lucene6835/solr/core/src/test/org/apache/solr/cloud/LeaderElectionIntegrationTest.java (original)
+++ lucene/dev/branches/lucene6835/solr/core/src/test/org/apache/solr/cloud/LeaderElectionIntegrationTest.java Mon Dec 21 11:39:57 2015
@@ -17,13 +17,27 @@ package org.apache.solr.cloud;
  * limitations under the License.
  */
 
+import javax.xml.parsers.ParserConfigurationException;
+import java.io.IOException;
+import java.lang.invoke.MethodHandles;
+import java.nio.file.Files;
+import java.nio.file.Path;
+import java.util.HashMap;
+import java.util.HashSet;
+import java.util.List;
+import java.util.Map;
+import java.util.Set;
+import java.util.regex.Matcher;
+import java.util.regex.Pattern;
+
+import com.google.common.collect.ImmutableMap;
 import org.apache.lucene.util.LuceneTestCase.Slow;
 import org.apache.solr.SolrTestCaseJ4;
 import org.apache.solr.common.cloud.SolrZkClient;
 import org.apache.solr.common.cloud.ZkNodeProps;
 import org.apache.solr.common.cloud.ZkStateReader;
 import org.apache.solr.core.CoreContainer;
-import org.apache.solr.core.CoreDescriptor;
+import org.apache.solr.core.SolrResourceLoader;
 import org.junit.AfterClass;
 import org.junit.BeforeClass;
 import org.junit.Test;
@@ -31,21 +45,9 @@ import org.slf4j.Logger;
 import org.slf4j.LoggerFactory;
 import org.xml.sax.SAXException;
 
-import javax.xml.parsers.ParserConfigurationException;
-import java.io.File;
-import java.io.IOException;
-import java.util.HashMap;
-import java.util.HashSet;
-import java.util.List;
-import java.util.Map;
-import java.util.Set;
-import java.util.regex.Matcher;
-import java.util.regex.Pattern;
-
 @Slow
 public class LeaderElectionIntegrationTest extends SolrTestCaseJ4 {
-  protected static Logger log = LoggerFactory
-      .getLogger(AbstractZkTestCase.class);
+  private static final Logger log = LoggerFactory.getLogger(MethodHandles.lookup().lookupClass());
   
   private final static int NUM_SHARD_REPLICAS = 5;
   
@@ -133,11 +135,11 @@ public class LeaderElectionIntegrationTe
      
   private void setupContainer(int port, String shard) throws IOException,
       ParserConfigurationException, SAXException {
-    File data = createTempDir().toFile();
+    Path data = createTempDir();
     
     System.setProperty("hostPort", Integer.toString(port));
     System.setProperty("shard", shard);
-    System.setProperty("solr.data.dir", data.getAbsolutePath());
+    System.setProperty("solr.data.dir", data.toString());
     System.setProperty("solr.solr.home", TEST_HOME());
     Set<Integer> ports = shardPorts.get(shard);
     if (ports == null) {
@@ -145,9 +147,12 @@ public class LeaderElectionIntegrationTe
       shardPorts.put(shard, ports);
     }
     ports.add(port);
-    CoreContainer container = new CoreContainer();
+
+    SolrResourceLoader loader = new SolrResourceLoader(createTempDir());
+    Files.copy(TEST_PATH().resolve("solr.xml"), loader.getInstancePath().resolve("solr.xml"));
+    CoreContainer container = new CoreContainer(loader);
     container.load();
-    container.create(new CoreDescriptor(container, "collection1", "collection1", "collection", "collection1"));
+    container.create("collection1_" + shard, ImmutableMap.of("collection", "collection1"));
     containerMap.put(port, container);
     System.clearProperty("solr.solr.home");
     System.clearProperty("hostPort");

Modified: lucene/dev/branches/lucene6835/solr/core/src/test/org/apache/solr/cloud/LeaderElectionTest.java
URL: http://svn.apache.org/viewvc/lucene/dev/branches/lucene6835/solr/core/src/test/org/apache/solr/cloud/LeaderElectionTest.java?rev=1721134&r1=1721133&r2=1721134&view=diff
==============================================================================
--- lucene/dev/branches/lucene6835/solr/core/src/test/org/apache/solr/cloud/LeaderElectionTest.java (original)
+++ lucene/dev/branches/lucene6835/solr/core/src/test/org/apache/solr/cloud/LeaderElectionTest.java Mon Dec 21 11:39:57 2015
@@ -19,6 +19,7 @@ package org.apache.solr.cloud;
 
 import java.io.File;
 import java.io.IOException;
+import java.lang.invoke.MethodHandles;
 import java.util.ArrayList;
 import java.util.Collections;
 import java.util.HashMap;
@@ -42,9 +43,13 @@ import org.apache.zookeeper.KeeperExcept
 import org.junit.AfterClass;
 import org.junit.BeforeClass;
 import org.junit.Test;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
 
 @Slow
 public class LeaderElectionTest extends SolrTestCaseJ4 {
+
+  private static final Logger log = LoggerFactory.getLogger(MethodHandles.lookup().lookupClass());
   
   static final int TIMEOUT = 30000;
   private ZkTestServer server;

Modified: lucene/dev/branches/lucene6835/solr/core/src/test/org/apache/solr/cloud/LeaderFailoverAfterPartitionTest.java
URL: http://svn.apache.org/viewvc/lucene/dev/branches/lucene6835/solr/core/src/test/org/apache/solr/cloud/LeaderFailoverAfterPartitionTest.java?rev=1721134&r1=1721133&r2=1721134&view=diff
==============================================================================
--- lucene/dev/branches/lucene6835/solr/core/src/test/org/apache/solr/cloud/LeaderFailoverAfterPartitionTest.java (original)
+++ lucene/dev/branches/lucene6835/solr/core/src/test/org/apache/solr/cloud/LeaderFailoverAfterPartitionTest.java Mon Dec 21 11:39:57 2015
@@ -24,7 +24,10 @@ import org.apache.solr.client.solrj.impl
 import org.apache.solr.client.solrj.request.CollectionAdminRequest;
 import org.apache.solr.common.cloud.Replica;
 import org.junit.Test;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
 
+import java.lang.invoke.MethodHandles;
 import java.util.HashSet;
 import java.util.List;
 import java.util.Set;
@@ -38,6 +41,8 @@ import java.util.concurrent.TimeUnit;
 @SuppressSSL(bugUrl = "https://issues.apache.org/jira/browse/SOLR-5776")
 public class LeaderFailoverAfterPartitionTest extends HttpPartitionTest {
 
+  private static final Logger log = LoggerFactory.getLogger(MethodHandles.lookup().lookupClass());
+
   public LeaderFailoverAfterPartitionTest() {
     super();
   }

Modified: lucene/dev/branches/lucene6835/solr/core/src/test/org/apache/solr/cloud/LeaderInitiatedRecoveryOnCommitTest.java
URL: http://svn.apache.org/viewvc/lucene/dev/branches/lucene6835/solr/core/src/test/org/apache/solr/cloud/LeaderInitiatedRecoveryOnCommitTest.java?rev=1721134&r1=1721133&r2=1721134&view=diff
==============================================================================
--- lucene/dev/branches/lucene6835/solr/core/src/test/org/apache/solr/cloud/LeaderInitiatedRecoveryOnCommitTest.java (original)
+++ lucene/dev/branches/lucene6835/solr/core/src/test/org/apache/solr/cloud/LeaderInitiatedRecoveryOnCommitTest.java Mon Dec 21 11:39:57 2015
@@ -25,12 +25,17 @@ import org.apache.solr.common.SolrExcept
 import org.apache.solr.common.cloud.Replica;
 import org.apache.solr.util.RTimer;
 import org.junit.Test;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
 
 import java.io.File;
+import java.lang.invoke.MethodHandles;
 import java.util.List;
 
 public class LeaderInitiatedRecoveryOnCommitTest extends BasicDistributedZkTest {
 
+  private static final Logger log = LoggerFactory.getLogger(MethodHandles.lookup().lookupClass());
+
   private static final long sleepMsBeforeHealPartition = 2000L;
 
   public LeaderInitiatedRecoveryOnCommitTest() {




Mime
View raw message