lucene-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From romseyg...@apache.org
Subject svn commit: r1648706 [5/9] - in /lucene/dev/branches/branch_5x/solr: ./ contrib/ contrib/dataimporthandler/src/java/org/apache/solr/handler/dataimport/ contrib/dataimporthandler/src/test/org/apache/solr/handler/dataimport/ contrib/map-reduce/src/java/o...
Date Wed, 31 Dec 2014 14:31:05 GMT
Modified: lucene/dev/branches/branch_5x/solr/core/src/test/org/apache/solr/core/OpenCloseCoreStressTest.java
URL: http://svn.apache.org/viewvc/lucene/dev/branches/branch_5x/solr/core/src/test/org/apache/solr/core/OpenCloseCoreStressTest.java?rev=1648706&r1=1648705&r2=1648706&view=diff
==============================================================================
--- lucene/dev/branches/branch_5x/solr/core/src/test/org/apache/solr/core/OpenCloseCoreStressTest.java (original)
+++ lucene/dev/branches/branch_5x/solr/core/src/test/org/apache/solr/core/OpenCloseCoreStressTest.java Wed Dec 31 14:31:03 2014
@@ -17,23 +17,11 @@
 
 package org.apache.solr.core;
 
-import java.io.File;
-import java.io.IOException;
-import java.util.ArrayList;
-import java.util.List;
-import java.util.Locale;
-import java.util.Map;
-import java.util.Random;
-import java.util.TreeMap;
-import java.util.concurrent.atomic.AtomicBoolean;
-import java.util.concurrent.atomic.AtomicInteger;
-import java.util.concurrent.atomic.AtomicLong;
-
 import org.apache.commons.io.FileUtils;
 import org.apache.solr.SolrTestCaseJ4;
-import org.apache.solr.client.solrj.SolrServer;
+import org.apache.solr.client.solrj.SolrClient;
 import org.apache.solr.client.solrj.embedded.JettySolrRunner;
-import org.apache.solr.client.solrj.impl.HttpSolrServer;
+import org.apache.solr.client.solrj.impl.HttpSolrClient;
 import org.apache.solr.client.solrj.request.UpdateRequest;
 import org.apache.solr.client.solrj.response.QueryResponse;
 import org.apache.solr.client.solrj.response.UpdateResponse;
@@ -44,6 +32,18 @@ import org.junit.Before;
 import org.junit.BeforeClass;
 import org.junit.Test;
 
+import java.io.File;
+import java.io.IOException;
+import java.util.ArrayList;
+import java.util.List;
+import java.util.Locale;
+import java.util.Map;
+import java.util.Random;
+import java.util.TreeMap;
+import java.util.concurrent.atomic.AtomicBoolean;
+import java.util.concurrent.atomic.AtomicInteger;
+import java.util.concurrent.atomic.AtomicLong;
+
 /**
  * Incorporate the open/close stress tests into unit tests.
  */
@@ -69,8 +69,8 @@ public class OpenCloseCoreStressTest ext
 
   File solrHomeDirectory;
 
-  List<HttpSolrServer> indexingServers = new ArrayList<>(indexingThreads);
-  List<HttpSolrServer> queryServers = new ArrayList<>(queryThreads);
+  List<HttpSolrClient> indexingClients = new ArrayList<>(indexingThreads);
+  List<HttpSolrClient> queryingClients = new ArrayList<>(queryThreads);
 
   static String savedFactory;
   
@@ -93,14 +93,14 @@ public class OpenCloseCoreStressTest ext
   @After
   public void tearDownServer() throws Exception {
     if (jetty != null) jetty.stop();
-    for(SolrServer server:indexingServers) {
-      server.shutdown();
+    for(SolrClient client: indexingClients) {
+      client.shutdown();
     }
-    for(SolrServer server:queryServers) {
-      server.shutdown();
+    for(SolrClient client: queryingClients) {
+      client.shutdown();
     }
-    indexingServers.clear();
-    queryServers.clear();
+    indexingClients.clear();
+    queryingClients.clear();
   }
 
   @Test
@@ -145,25 +145,25 @@ public class OpenCloseCoreStressTest ext
   }
 
 
-  private void getServers() throws Exception {
+  private void buildClients() throws Exception {
     jetty.start();
     url = buildUrl(jetty.getLocalPort(), "/solr/");
 
     // Mostly to keep annoying logging messages from being sent out all the time.
 
     for (int idx = 0; idx < indexingThreads; ++idx) {
-      HttpSolrServer server = new HttpSolrServer(url);
-      server.setDefaultMaxConnectionsPerHost(25);
-      server.setConnectionTimeout(30000);
-      server.setSoTimeout(60000);
-      indexingServers.add(server);
+      HttpSolrClient client = new HttpSolrClient(url);
+      client.setDefaultMaxConnectionsPerHost(25);
+      client.setConnectionTimeout(30000);
+      client.setSoTimeout(60000);
+      indexingClients.add(client);
     }
     for (int idx = 0; idx < queryThreads; ++idx) {
-      HttpSolrServer server = new HttpSolrServer(url);
-      server.setDefaultMaxConnectionsPerHost(25);
-      server.setConnectionTimeout(30000);
-      server.setSoTimeout(30000);
-      queryServers.add(server);
+      HttpSolrClient client = new HttpSolrClient(url);
+      client.setDefaultMaxConnectionsPerHost(25);
+      client.setConnectionTimeout(30000);
+      client.setSoTimeout(30000);
+      queryingClients.add(client);
     }
 
   }
@@ -173,7 +173,7 @@ public class OpenCloseCoreStressTest ext
     makeCores(solrHomeDirectory, oldStyle);
 
     //MUST start the server after the cores are made.
-    getServers();
+    buildClients();
 
     try {
 
@@ -187,9 +187,9 @@ public class OpenCloseCoreStressTest ext
         log.info(String.format(Locale.ROOT, "\n\n\n\n\nStarting a %,d second cycle, seconds left: %,d. Seconds run so far: %,d.",
             cycleSeconds, secondsRemaining, secondsRun));
 
-        Indexer idxer = new Indexer(this, url, indexingServers, indexingThreads, cycleSeconds, random());
+        Indexer idxer = new Indexer(this, url, indexingClients, indexingThreads, cycleSeconds, random());
 
-        Queries queries = new Queries(this, url, queryServers, queryThreads, random());
+        Queries queries = new Queries(this, url, queryingClients, queryThreads, random());
 
         idxer.waitOnThreads();
 
@@ -197,12 +197,12 @@ public class OpenCloseCoreStressTest ext
 
         secondsRemaining = Math.max(secondsRemaining - resetInterval, 0);
 
-        checkResults(queryServers.get(0), queries, idxer);
+        checkResults(queryingClients.get(0), queries, idxer);
 
         secondsRun += cycleSeconds;
 
         if (secondsRemaining > 0) {
-          deleteAllDocuments(queryServers.get(0), queries);
+          deleteAllDocuments(queryingClients.get(0), queries);
         }
       } while (secondsRemaining > 0);
 
@@ -251,14 +251,14 @@ public class OpenCloseCoreStressTest ext
   }
 
 
-  void deleteAllDocuments(HttpSolrServer server, Queries queries) {
+  void deleteAllDocuments(HttpSolrClient client, Queries queries) {
     log.info("Deleting data from last cycle, this may take a few minutes.");
 
     for (String core : coreNames) {
       try {
-        server.setBaseURL(url + core);
-        server.deleteByQuery("*:*");
-        server.optimize(true, true); // should be close to a no-op.
+        client.setBaseURL(url + core);
+        client.deleteByQuery("*:*");
+        client.optimize(true, true); // should be close to a no-op.
       } catch (Exception e) {
         e.printStackTrace();
       }
@@ -269,7 +269,7 @@ public class OpenCloseCoreStressTest ext
     long foundDocs = 0;
     for (String core : coreNames) {
       try {
-        long found = queries.getCount(server, core);
+        long found = queries.getCount(client, core);
         assertEquals("Cores should be empty", found, 0L);
         foundDocs += found;
       } catch (Exception e) {
@@ -287,21 +287,21 @@ public class OpenCloseCoreStressTest ext
     }
   }
 
-  private void checkResults(HttpSolrServer server, Queries queries, Indexer idxer) throws InterruptedException {
+  private void checkResults(HttpSolrClient client, Queries queries, Indexer idxer) throws InterruptedException {
     log.info("Checking if indexes have all the documents they should...");
     long totalDocsFound = 0;
     for (Map.Entry<String, Long> ent : coreCounts.entrySet()) {
-      server.setBaseURL(url + ent.getKey());
+      client.setBaseURL(url + ent.getKey());
       for (int idx = 0; idx < 3; ++idx) {
         try {
-          server.commit(true, true);
+          client.commit(true, true);
           break; // retry loop
         } catch (Exception e) {
           log.warn("Exception when committing core " + ent.getKey() + " " + e.getMessage());
           Thread.sleep(100L);
         }
       }
-      long numFound = queries.getCount(server, ent.getKey());
+      long numFound = queries.getCount(client, ent.getKey());
       totalDocsFound += numFound;
       assertEquals(String.format(Locale.ROOT, "Core %s bad!", ent.getKey()), (long) ent.getValue(), numFound);
     }
@@ -341,14 +341,14 @@ class Indexer {
 
   ArrayList<OneIndexer> _threads = new ArrayList<>();
 
-  public Indexer(OpenCloseCoreStressTest OCCST, String url, List<HttpSolrServer> servers, int numThreads, int secondsToRun, Random random) {
+  public Indexer(OpenCloseCoreStressTest OCCST, String url, List<HttpSolrClient> clients, int numThreads, int secondsToRun, Random random) {
     stopTime = System.currentTimeMillis() + (secondsToRun * 1000);
     nextTime = System.currentTimeMillis() + 60000;
     docsThisCycle.set(0);
     qTimesAccum.set(0);
     updateCounts.set(0);
     for (int idx = 0; idx < numThreads; ++idx) {
-      OneIndexer one = new OneIndexer(OCCST, url, servers.get(idx), random.nextLong());
+      OneIndexer one = new OneIndexer(OCCST, url, clients.get(idx), random.nextLong());
       _threads.add(one);
       one.start();
     }
@@ -385,13 +385,13 @@ class Indexer {
 
 class OneIndexer extends Thread {
   private final OpenCloseCoreStressTest OCCST;
-  private final HttpSolrServer server;
+  private final HttpSolrClient client;
   private final String baseUrl;
   private final Random random;
 
-  OneIndexer(OpenCloseCoreStressTest OCCST, String url, HttpSolrServer server, long seed) {
+  OneIndexer(OpenCloseCoreStressTest OCCST, String url, HttpSolrClient client, long seed) {
     this.OCCST = OCCST;
-    this.server = server;
+    this.client = client;
     this.baseUrl = url;
     this.random = new Random(seed);
   }
@@ -414,8 +414,8 @@ class OneIndexer extends Thread {
         update.add(doc);
 
         try {
-          server.setBaseURL(baseUrl + core);
-          UpdateResponse response = server.add(doc, OpenCloseCoreStressTest.COMMIT_WITHIN);
+          client.setBaseURL(baseUrl + core);
+          UpdateResponse response = client.add(doc, OpenCloseCoreStressTest.COMMIT_WITHIN);
           if (response.getStatus() != 0) {
             SolrTestCaseJ4.log.warn("Failed to index a document to core " + core + " with status " + response.getStatus());
           } else {
@@ -451,10 +451,10 @@ class Queries {
   static AtomicInteger _errors = new AtomicInteger(0);
   String baseUrl;
 
-  public Queries(OpenCloseCoreStressTest OCCST, String url, List<HttpSolrServer> servers, int numThreads, Random random) {
+  public Queries(OpenCloseCoreStressTest OCCST, String url, List<HttpSolrClient> clients, int numThreads, Random random) {
     baseUrl = url;
     for (int idx = 0; idx < numThreads; ++idx) {
-      Thread one = new OneQuery(OCCST, url, servers.get(idx), random.nextLong());
+      Thread one = new OneQuery(OCCST, url, clients.get(idx), random.nextLong());
       _threads.add(one);
       one.start();
     }
@@ -472,14 +472,14 @@ class Queries {
     }
   }
 
-  public long getCount(HttpSolrServer server, String core) {
+  public long getCount(HttpSolrClient client, String core) {
     ModifiableSolrParams params = new ModifiableSolrParams();
     params.set("qt", "/select");
     params.set("q", "*:*");
     long numFound = 0;
-    server.setBaseURL(baseUrl + core);
+    client.setBaseURL(baseUrl + core);
     try {
-      QueryResponse response = server.query(params);
+      QueryResponse response = client.query(params);
       numFound = response.getResults().getNumFound();
     } catch (Exception e) {
       e.printStackTrace();
@@ -490,13 +490,13 @@ class Queries {
 
 class OneQuery extends Thread {
   OpenCloseCoreStressTest OCCST;
-  private final HttpSolrServer server;
+  private final HttpSolrClient client;
   private final String baseUrl;
   private final Random random;
 
-  OneQuery(OpenCloseCoreStressTest OCCST, String url, HttpSolrServer server, long seed) {
+  OneQuery(OpenCloseCoreStressTest OCCST, String url, HttpSolrClient client, long seed) {
     this.OCCST = OCCST;
-    this.server = server;
+    this.client = client;
     this.baseUrl = url;
     this.random = new Random(seed);
   }
@@ -514,8 +514,8 @@ class OneQuery extends Thread {
         try {
           // sleep between 250ms and 10000 ms
           Thread.sleep(100L); // Let's not go crazy here.
-          server.setBaseURL(baseUrl + core);
-          QueryResponse response = server.query(params);
+          client.setBaseURL(baseUrl + core);
+          QueryResponse response = client.query(params);
 
           if (response.getStatus() != 0) {
             SolrTestCaseJ4.log.warn("Failed to query core " + core + " with status " + response.getStatus());

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=1648706&r1=1648705&r2=1648706&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 Wed Dec 31 14:31:03 2014
@@ -18,6 +18,17 @@ package org.apache.solr.core;
  */
 
 
+import org.apache.solr.client.solrj.SolrClient;
+import org.apache.solr.client.solrj.impl.HttpSolrClient;
+import org.apache.solr.cloud.AbstractFullDistribZkTestBase;
+import org.apache.solr.common.cloud.ZkStateReader;
+import org.apache.solr.handler.TestBlobHandler;
+import org.apache.solr.util.RESTfulServerProvider;
+import org.apache.solr.util.RestTestHarness;
+import org.apache.solr.util.SimplePostTool;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+
 import java.io.IOException;
 import java.nio.ByteBuffer;
 import java.nio.charset.StandardCharsets;
@@ -28,27 +39,16 @@ import java.util.Map;
 import java.util.zip.ZipEntry;
 import java.util.zip.ZipOutputStream;
 
-import org.apache.solr.client.solrj.SolrServer;
-import org.apache.solr.client.solrj.impl.HttpSolrServer;
-import org.apache.solr.cloud.AbstractFullDistribZkTestBase;
-import org.apache.solr.common.cloud.ZkStateReader;
-import org.apache.solr.handler.TestBlobHandler;
-import org.apache.solr.util.RESTfulServerProvider;
-import org.apache.solr.util.RestTestHarness;
-import org.apache.solr.util.SimplePostTool;
-import org.slf4j.Logger;
-import org.slf4j.LoggerFactory;
-
 public class TestDynamicLoading extends AbstractFullDistribZkTestBase {
   static final Logger log =  LoggerFactory.getLogger(TestDynamicLoading.class);
   private List<RestTestHarness> restTestHarnesses = new ArrayList<>();
 
   private void setupHarnesses() {
-    for (final SolrServer client : clients) {
+    for (final SolrClient client : clients) {
       RestTestHarness harness = new RestTestHarness(new RESTfulServerProvider() {
         @Override
         public String getBaseURL() {
-          return ((HttpSolrServer)client).getBaseURL();
+          return ((HttpSolrClient)client).getBaseURL();
         }
       });
       restTestHarnesses.add(harness);
@@ -85,10 +85,10 @@ public class TestDynamicLoading extends
     assertNotNull(map = (Map) map.get("error"));
     assertEquals(".system collection not available", map.get("msg"));
 
-    HttpSolrServer server = (HttpSolrServer) clients.get(random().nextInt(clients.size()));
-    String baseURL = server.getBaseURL();
+    HttpSolrClient randomClient = (HttpSolrClient) clients.get(random().nextInt(clients.size()));
+    String baseURL = randomClient.getBaseURL();
     baseURL = baseURL.substring(0, baseURL.lastIndexOf('/'));
-    TestBlobHandler.createSysColl(new HttpSolrServer(baseURL,server.getHttpClient()));
+    TestBlobHandler.createSysColl(new HttpSolrClient(baseURL,randomClient.getHttpClient()));
     map = TestSolrConfigHandler.getRespMap("/test1?wt=json", client);
 
     assertNotNull(map = (Map) map.get("error"));

Modified: lucene/dev/branches/branch_5x/solr/core/src/test/org/apache/solr/core/TestSolrConfigHandler.java
URL: http://svn.apache.org/viewvc/lucene/dev/branches/branch_5x/solr/core/src/test/org/apache/solr/core/TestSolrConfigHandler.java?rev=1648706&r1=1648705&r2=1648706&view=diff
==============================================================================
--- lucene/dev/branches/branch_5x/solr/core/src/test/org/apache/solr/core/TestSolrConfigHandler.java (original)
+++ lucene/dev/branches/branch_5x/solr/core/src/test/org/apache/solr/core/TestSolrConfigHandler.java Wed Dec 31 14:31:03 2014
@@ -33,7 +33,7 @@ import java.util.concurrent.TimeUnit;
 import com.google.common.collect.ImmutableList;
 import org.apache.commons.io.FileUtils;
 import org.apache.solr.SolrTestCaseJ4;
-import org.apache.solr.client.solrj.impl.CloudSolrServer;
+import org.apache.solr.client.solrj.impl.CloudSolrClient;
 import org.apache.solr.handler.TestSolrConfigHandlerConcurrent;
 import org.apache.solr.util.RestTestBase;
 import org.apache.solr.util.RestTestHarness;
@@ -78,7 +78,7 @@ public class TestSolrConfigHandler exten
       jetty.stop();
       jetty = null;
     }
-    server = null;
+    client = null;
     restTestHarness = null;
   }
 
@@ -146,7 +146,7 @@ public class TestSolrConfigHandler exten
   }
 
 
-  public static void reqhandlertests(RestTestHarness writeHarness,String testServerBaseUrl, CloudSolrServer cloudSolrServer) throws Exception {
+  public static void reqhandlertests(RestTestHarness writeHarness,String testServerBaseUrl, CloudSolrClient cloudSolrServer) throws Exception {
     String payload = "{\n" +
         "'create-requesthandler' : { 'name' : '/x', 'class': 'org.apache.solr.handler.DumpRequestHandler' , 'startup' : 'lazy'}\n" +
         "}";
@@ -197,7 +197,7 @@ public class TestSolrConfigHandler exten
   public static void testForResponseElement(RestTestHarness harness,
                                             String testServerBaseUrl,
                                             String uri,
-                                            CloudSolrServer cloudSolrServer,List<String> jsonPath,
+                                            CloudSolrClient cloudSolrServer,List<String> jsonPath,
                                             String expected,
                                             long maxTimeoutSeconds ) throws Exception {
 

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=1648706&r1=1648705&r2=1648706&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 Wed Dec 31 14:31:03 2014
@@ -17,14 +17,6 @@ package org.apache.solr.handler;
  * limitations under the License.
  */
 
-import java.io.IOException;
-import java.nio.ByteBuffer;
-import java.nio.charset.StandardCharsets;
-import java.util.Arrays;
-import java.util.List;
-import java.util.Map;
-import java.util.concurrent.TimeUnit;
-
 import org.apache.http.HttpEntity;
 import org.apache.http.HttpResponse;
 import org.apache.http.client.HttpClient;
@@ -32,10 +24,10 @@ import org.apache.http.client.methods.Ht
 import org.apache.http.client.methods.HttpPost;
 import org.apache.http.entity.ByteArrayEntity;
 import org.apache.http.util.EntityUtils;
-import org.apache.solr.client.solrj.SolrServer;
+import org.apache.solr.client.solrj.SolrClient;
 import org.apache.solr.client.solrj.SolrServerException;
-import org.apache.solr.client.solrj.impl.CloudSolrServer;
-import org.apache.solr.client.solrj.impl.HttpSolrServer;
+import org.apache.solr.client.solrj.impl.CloudSolrClient;
+import org.apache.solr.client.solrj.impl.HttpSolrClient;
 import org.apache.solr.client.solrj.request.CollectionAdminRequest;
 import org.apache.solr.client.solrj.response.CollectionAdminResponse;
 import org.apache.solr.cloud.AbstractFullDistribZkTestBase;
@@ -48,20 +40,28 @@ import org.apache.solr.util.SimplePostTo
 import org.slf4j.Logger;
 import org.slf4j.LoggerFactory;
 
+import java.io.IOException;
+import java.nio.ByteBuffer;
+import java.nio.charset.StandardCharsets;
+import java.util.Arrays;
+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 {
-    SolrServer server = createNewSolrServer("", getBaseUrl((HttpSolrServer) clients.get(0)));
+    SolrClient client = createNewSolrClient("", getBaseUrl((HttpSolrClient) clients.get(0)));
 
     CollectionAdminResponse response1;
     CollectionAdminRequest.Create createCollectionRequest = new CollectionAdminRequest.Create();
     createCollectionRequest.setCollectionName(".system");
     createCollectionRequest.setNumShards(1);
     createCollectionRequest.setReplicationFactor(2);
-    response1 = createCollectionRequest.process(server);
+    response1 = createCollectionRequest.process(client);
     assertEquals(0, response1.getStatus());
     assertTrue(response1.isSuccess());
     DocCollection sysColl = cloudClient.getZkStateReader().getClusterState().getCollection(".system");
@@ -96,13 +96,13 @@ public class TestBlobHandler extends Abs
 
   }
 
-  public static  void createSysColl(SolrServer server) throws SolrServerException, IOException {
+  public static  void createSysColl(SolrClient client) throws SolrServerException, IOException {
     CollectionAdminResponse response1;
     CollectionAdminRequest.Create createCollectionRequest = new CollectionAdminRequest.Create();
     createCollectionRequest.setCollectionName(".system");
     createCollectionRequest.setNumShards(1);
     createCollectionRequest.setReplicationFactor(2);
-    response1 = createCollectionRequest.process(server);
+    response1 = createCollectionRequest.process(client);
     assertEquals(0, response1.getStatus());
     assertTrue(response1.isSuccess());
   }
@@ -117,7 +117,7 @@ public class TestBlobHandler extends Abs
     DirectUpdateHandler2.commitOnClose = true;
   }
 
-  public static void postAndCheck(CloudSolrServer cloudClient, String baseUrl, ByteBuffer bytes, int count) throws Exception {
+  public static void postAndCheck(CloudSolrClient cloudClient, String baseUrl, ByteBuffer bytes, int count) throws Exception {
     postData(cloudClient, baseUrl, bytes);
     String url;
     Map map;
@@ -144,7 +144,7 @@ public class TestBlobHandler extends Abs
 
   private void compareInputAndOutput(String url, byte[] bytarr) throws IOException {
 
-    HttpClient httpClient = cloudClient.getLbServer().getHttpClient();
+    HttpClient httpClient = cloudClient.getLbClient().getHttpClient();
 
     HttpGet httpGet = new HttpGet(url);
     HttpResponse entity = httpClient.execute(httpGet);
@@ -160,7 +160,7 @@ public class TestBlobHandler extends Abs
 
   }
 
-  public static String postData(CloudSolrServer cloudClient, String baseUrl, ByteBuffer bytarr) throws IOException {
+  public static String postData(CloudSolrClient cloudClient, String baseUrl, ByteBuffer bytarr) throws IOException {
     HttpPost httpPost = null;
     HttpEntity entity;
     String response;
@@ -168,7 +168,7 @@ public class TestBlobHandler extends Abs
       httpPost = new HttpPost(baseUrl+"/.system/blob/test");
       httpPost.setHeader("Content-Type","application/octet-stream");
       httpPost.setEntity(new ByteArrayEntity(bytarr.array(), bytarr.arrayOffset(), bytarr.limit()));
-      entity = cloudClient.getLbServer().getHttpClient().execute(httpPost).getEntity();
+      entity = cloudClient.getLbClient().getHttpClient().execute(httpPost).getEntity();
       return EntityUtils.toString(entity, StandardCharsets.UTF_8);
     } finally {
       httpPost.releaseConnection();

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=1648706&r1=1648705&r2=1648706&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 Wed Dec 31 14:31:03 2014
@@ -29,8 +29,8 @@ import java.util.concurrent.TimeUnit;
 import org.apache.http.HttpEntity;
 import org.apache.http.client.methods.HttpGet;
 import org.apache.http.util.EntityUtils;
-import org.apache.solr.client.solrj.SolrServer;
-import org.apache.solr.client.solrj.impl.HttpSolrServer;
+import org.apache.solr.client.solrj.SolrClient;
+import org.apache.solr.client.solrj.impl.HttpSolrClient;
 import org.apache.solr.cloud.AbstractFullDistribZkTestBase;
 import org.apache.solr.cloud.ZkController;
 import org.apache.solr.common.cloud.DocCollection;
@@ -59,11 +59,11 @@ public class TestConfigReload extends Ab
   private List<RestTestHarness> restTestHarnesses = new ArrayList<>();
 
   private void setupHarnesses() {
-    for (final SolrServer client : clients) {
+    for (final SolrClient client : clients) {
       RestTestHarness harness = new RestTestHarness(new RESTfulServerProvider() {
         @Override
         public String getBaseURL() {
-          return ((HttpSolrServer)client).getBaseURL();
+          return ((HttpSolrClient)client).getBaseURL();
         }
       });
       restTestHarnesses.add(harness);
@@ -128,7 +128,7 @@ public class TestConfigReload extends Ab
     HttpGet get = new HttpGet(uri) ;
     HttpEntity entity = null;
     try {
-      entity = cloudClient.getLbServer().getHttpClient().execute(get).getEntity();
+      entity = cloudClient.getLbClient().getHttpClient().execute(get).getEntity();
       String response = EntityUtils.toString(entity, StandardCharsets.UTF_8);
       return (Map) ObjectBuilder.getVal(new JSONParser(new StringReader(response)));
     } finally {

Modified: lucene/dev/branches/branch_5x/solr/core/src/test/org/apache/solr/handler/TestReplicationHandler.java
URL: http://svn.apache.org/viewvc/lucene/dev/branches/branch_5x/solr/core/src/test/org/apache/solr/handler/TestReplicationHandler.java?rev=1648706&r1=1648705&r2=1648706&view=diff
==============================================================================
--- lucene/dev/branches/branch_5x/solr/core/src/test/org/apache/solr/handler/TestReplicationHandler.java (original)
+++ lucene/dev/branches/branch_5x/solr/core/src/test/org/apache/solr/handler/TestReplicationHandler.java Wed Dec 31 14:31:03 2014
@@ -16,26 +16,6 @@
  */
 package org.apache.solr.handler;
 
-import java.io.BufferedReader;
-import java.io.File;
-import java.io.FileInputStream;
-import java.io.FileOutputStream;
-import java.io.IOException;
-import java.io.InputStream;
-import java.io.InputStreamReader;
-import java.io.OutputStreamWriter;
-import java.io.Writer;
-import java.net.MalformedURLException;
-import java.net.URL;
-import java.nio.charset.StandardCharsets;
-import java.nio.file.Paths;
-import java.util.ArrayList;
-import java.util.Arrays;
-import java.util.Collection;
-import java.util.Date;
-import java.util.Set;
-import java.util.concurrent.TimeUnit;
-
 import org.apache.lucene.store.Directory;
 import org.apache.lucene.store.FSDirectory;
 import org.apache.lucene.util.IOUtils;
@@ -44,10 +24,10 @@ import org.apache.lucene.util.TestUtil;
 import org.apache.solr.BaseDistributedSearchTestCase;
 import org.apache.solr.SolrTestCaseJ4;
 import org.apache.solr.SolrTestCaseJ4.SuppressSSL;
-import org.apache.solr.client.solrj.SolrServer;
+import org.apache.solr.client.solrj.SolrClient;
 import org.apache.solr.client.solrj.SolrServerException;
 import org.apache.solr.client.solrj.embedded.JettySolrRunner;
-import org.apache.solr.client.solrj.impl.HttpSolrServer;
+import org.apache.solr.client.solrj.impl.HttpSolrClient;
 import org.apache.solr.client.solrj.request.QueryRequest;
 import org.apache.solr.client.solrj.request.UpdateRequest;
 import org.apache.solr.client.solrj.response.QueryResponse;
@@ -71,6 +51,26 @@ import org.junit.Before;
 import org.junit.BeforeClass;
 import org.junit.Test;
 
+import java.io.BufferedReader;
+import java.io.File;
+import java.io.FileInputStream;
+import java.io.FileOutputStream;
+import java.io.IOException;
+import java.io.InputStream;
+import java.io.InputStreamReader;
+import java.io.OutputStreamWriter;
+import java.io.Writer;
+import java.net.MalformedURLException;
+import java.net.URL;
+import java.nio.charset.StandardCharsets;
+import java.nio.file.Paths;
+import java.util.ArrayList;
+import java.util.Arrays;
+import java.util.Collection;
+import java.util.Date;
+import java.util.Set;
+import java.util.concurrent.TimeUnit;
+
 /**
  * Test for ReplicationHandler
  *
@@ -87,7 +87,7 @@ public class TestReplicationHandler exte
       + File.separator;
 
   JettySolrRunner masterJetty, slaveJetty, repeaterJetty;
-  SolrServer masterClient, slaveClient, repeaterClient;
+  SolrClient masterClient, slaveClient, repeaterClient;
   SolrInstance master = null, slave = null, repeater = null;
 
   static String context = "/solr";
@@ -110,12 +110,12 @@ public class TestReplicationHandler exte
     master = new SolrInstance(createTempDir("solr-instance").toFile(), "master", null);
     master.setUp();
     masterJetty = createJetty(master);
-    masterClient = createNewSolrServer(masterJetty.getLocalPort());
+    masterClient = createNewSolrClient(masterJetty.getLocalPort());
 
     slave = new SolrInstance(createTempDir("solr-instance").toFile(), "slave", masterJetty.getLocalPort());
     slave.setUp();
     slaveJetty = createJetty(slave);
-    slaveClient = createNewSolrServer(slaveJetty.getLocalPort());
+    slaveClient = createNewSolrClient(slaveJetty.getLocalPort());
   }
 
   public void clearIndexWithReplication() throws Exception {
@@ -150,22 +150,22 @@ public class TestReplicationHandler exte
     return jetty;
   }
 
-  private static SolrServer createNewSolrServer(int port) {
+  private static SolrClient createNewSolrClient(int port) {
     try {
-      // setup the server...
-      HttpSolrServer s = new HttpSolrServer(buildUrl(port));
-      s.setConnectionTimeout(15000);
-      s.setSoTimeout(60000);
-      s.setDefaultMaxConnectionsPerHost(100);
-      s.setMaxTotalConnections(100);
-      return s;
+      // setup the client...
+      HttpSolrClient client = new HttpSolrClient(buildUrl(port));
+      client.setConnectionTimeout(15000);
+      client.setSoTimeout(60000);
+      client.setDefaultMaxConnectionsPerHost(100);
+      client.setMaxTotalConnections(100);
+      return client;
     }
     catch (Exception ex) {
       throw new RuntimeException(ex);
     }
   }
 
-  int index(SolrServer s, Object... fields) throws Exception {
+  int index(SolrClient s, Object... fields) throws Exception {
     SolrInputDocument doc = new SolrInputDocument();
     for (int i = 0; i < fields.length; i += 2) {
       doc.addField((String) (fields[i]), fields[i + 1]);
@@ -173,7 +173,7 @@ public class TestReplicationHandler exte
     return s.add(doc).getStatus();
   }
 
-  NamedList query(String query, SolrServer s) throws SolrServerException {
+  NamedList query(String query, SolrClient s) throws SolrServerException {
     NamedList res = new SimpleOrderedMap();
     ModifiableSolrParams params = new ModifiableSolrParams();
 
@@ -188,15 +188,15 @@ public class TestReplicationHandler exte
   }
 
   /** will sleep up to 30 seconds, looking for expectedDocCount */
-  private NamedList rQuery(int expectedDocCount, String query, SolrServer server) throws Exception {
+  private NamedList rQuery(int expectedDocCount, String query, SolrClient client) throws Exception {
     int timeSlept = 0;
-    NamedList res = query(query, server);
+    NamedList res = query(query, client);
     while (expectedDocCount != numFound(res)
            && timeSlept < 30000) {
       log.info("Waiting for " + expectedDocCount + " docs");
       timeSlept += 100;
       Thread.sleep(100);
-      res = query(query, server);
+      res = query(query, client);
     }
     log.info("Waited for {}ms and found {} docs", timeSlept, numFound(res));
     return res;
@@ -206,7 +206,7 @@ public class TestReplicationHandler exte
     return ((SolrDocumentList) res.get("response")).getNumFound();
   }
 
-  private NamedList<Object> getDetails(SolrServer s) throws Exception {
+  private NamedList<Object> getDetails(SolrClient s) throws Exception {
     
 
     ModifiableSolrParams params = new ModifiableSolrParams();
@@ -227,7 +227,7 @@ public class TestReplicationHandler exte
     return details;
   }
   
-  private NamedList<Object> getCommits(SolrServer s) throws Exception {
+  private NamedList<Object> getCommits(SolrClient s) throws Exception {
     
 
     ModifiableSolrParams params = new ModifiableSolrParams();
@@ -244,7 +244,7 @@ public class TestReplicationHandler exte
     return res;
   }
   
-  private NamedList<Object> getIndexVersion(SolrServer s) throws Exception {
+  private NamedList<Object> getIndexVersion(SolrClient s) throws Exception {
     
     ModifiableSolrParams params = new ModifiableSolrParams();
     params.set("command","indexversion");
@@ -260,7 +260,7 @@ public class TestReplicationHandler exte
     return res;
   }
   
-  private NamedList<Object> reloadCore(SolrServer s, String core) throws Exception {
+  private NamedList<Object> reloadCore(SolrClient s, String core) throws Exception {
     
     ModifiableSolrParams params = new ModifiableSolrParams();
     params.set("action","reload");
@@ -314,12 +314,12 @@ public class TestReplicationHandler exte
 
     SolrInstance repeater = null;
     JettySolrRunner repeaterJetty = null;
-    SolrServer repeaterClient = null;
+    SolrClient repeaterClient = null;
     try {
       repeater = new SolrInstance(createTempDir("solr-instance").toFile(), "repeater", masterJetty.getLocalPort());
       repeater.setUp();
       repeaterJetty = createJetty(repeater);
-      repeaterClient = createNewSolrServer(repeaterJetty.getLocalPort());
+      repeaterClient = createNewSolrClient(repeaterJetty.getLocalPort());
 
       
       NamedList<Object> details = getDetails(repeaterClient);
@@ -530,7 +530,7 @@ public class TestReplicationHandler exte
 
     masterJetty = createJetty(master);
     masterClient.shutdown();
-    masterClient = createNewSolrServer(masterJetty.getLocalPort());
+    masterClient = createNewSolrClient(masterJetty.getLocalPort());
 
     slave.setTestPort(masterJetty.getLocalPort());
     slave.copyConfigFile(slave.getSolrConfigFile(), "solrconfig.xml");
@@ -549,7 +549,7 @@ public class TestReplicationHandler exte
 
     slaveJetty = createJetty(slave);
     slaveClient.shutdown();
-    slaveClient = createNewSolrServer(slaveJetty.getLocalPort());
+    slaveClient = createNewSolrClient(slaveJetty.getLocalPort());
 
     //add a doc with new field and commit on master to trigger snappull from slave.
     index(masterClient, "id", "2000", "name", "name = " + 2000, "newname", "newname = " + 2000);
@@ -626,7 +626,7 @@ public class TestReplicationHandler exte
     slaveJetty.stop();
     slaveJetty = createJetty(slave);
     slaveClient.shutdown();
-    slaveClient = createNewSolrServer(slaveJetty.getLocalPort());
+    slaveClient = createNewSolrClient(slaveJetty.getLocalPort());
 
     masterClient.deleteByQuery("*:*");
     slaveClient.deleteByQuery("*:*");
@@ -762,14 +762,14 @@ public class TestReplicationHandler exte
       slaveJetty.stop();
       slaveJetty = createJetty(slave);
       slaveClient.shutdown();
-      slaveClient = createNewSolrServer(slaveJetty.getLocalPort());
+      slaveClient = createNewSolrClient(slaveJetty.getLocalPort());
 
       master.copyConfigFile(CONF_DIR + "solrconfig-master3.xml",
           "solrconfig.xml");
       masterJetty.stop();
       masterJetty = createJetty(master);
       masterClient.shutdown();
-      masterClient = createNewSolrServer(masterJetty.getLocalPort());
+      masterClient = createNewSolrClient(masterJetty.getLocalPort());
       
       masterClient.deleteByQuery("*:*");
       slaveClient.deleteByQuery("*:*");
@@ -884,7 +884,7 @@ public class TestReplicationHandler exte
     slaveJetty.stop();
     slaveJetty = createJetty(slave);
     slaveClient.shutdown();
-    slaveClient = createNewSolrServer(slaveJetty.getLocalPort());
+    slaveClient = createNewSolrClient(slaveJetty.getLocalPort());
 
     try {
       repeater = new SolrInstance(createTempDir("solr-instance").toFile(), "repeater", null);
@@ -895,7 +895,7 @@ public class TestReplicationHandler exte
       if (repeaterClient != null) {
         repeaterClient.shutdown();
       }
-      repeaterClient = createNewSolrServer(repeaterJetty.getLocalPort());
+      repeaterClient = createNewSolrClient(repeaterJetty.getLocalPort());
       
       for (int i = 0; i < 3; i++)
         index(masterClient, "id", i, "name", "name = " + i);
@@ -948,7 +948,7 @@ public class TestReplicationHandler exte
     
   }
 
-  private void assertVersions(SolrServer client1, SolrServer client2) throws Exception {
+  private void assertVersions(SolrClient client1, SolrClient client2) throws Exception {
     NamedList<Object> details = getDetails(client1);
     ArrayList<NamedList<Object>> commits = (ArrayList<NamedList<Object>>) details.get("commits");
     Long maxVersionClient1 = getVersion(client1);
@@ -975,7 +975,7 @@ public class TestReplicationHandler exte
     assertEquals(maxVersionClient2, version);
   }
 
-  private Long getVersion(SolrServer client) throws Exception {
+  private Long getVersion(SolrClient client) throws Exception {
     NamedList<Object> details;
     ArrayList<NamedList<Object>> commits;
     details = getDetails(client);
@@ -1025,7 +1025,7 @@ public class TestReplicationHandler exte
 
     masterJetty = createJetty(master);
     masterClient.shutdown();
-    masterClient = createNewSolrServer(masterJetty.getLocalPort());
+    masterClient = createNewSolrClient(masterJetty.getLocalPort());
     
     for (int i = 0; i < nDocs; i++)
       index(masterClient, "id", i, "name", "name = " + i);
@@ -1043,7 +1043,7 @@ public class TestReplicationHandler exte
     //start slave
     slaveJetty = createJetty(slave);
     slaveClient.shutdown();
-    slaveClient = createNewSolrServer(slaveJetty.getLocalPort());
+    slaveClient = createNewSolrClient(slaveJetty.getLocalPort());
 
     //get docs from slave and check if number is equal to master
     NamedList slaveQueryRsp = rQuery(nDocs, "*:*", slaveClient);
@@ -1077,7 +1077,7 @@ public class TestReplicationHandler exte
       
       masterJetty = createJetty(master);
       masterClient.shutdown();
-      masterClient = createNewSolrServer(masterJetty.getLocalPort());
+      masterClient = createNewSolrClient(masterJetty.getLocalPort());
       
       for (int i = 0; i < nDocs; i++)
         index(masterClient, "id", i, "name", "name = " + i);
@@ -1090,7 +1090,7 @@ public class TestReplicationHandler exte
       masterJetty.stop();
       masterJetty.start(true);
       
-      // masterClient = createNewSolrServer(masterJetty.getLocalPort());
+      // masterClient = createNewSolrClient(masterJetty.getLocalPort());
       
       NamedList masterQueryRsp = rQuery(nDocs, "*:*", masterClient);
       SolrDocumentList masterQueryResult = (SolrDocumentList) masterQueryRsp
@@ -1103,7 +1103,7 @@ public class TestReplicationHandler exte
       // start slave
       slaveJetty = createJetty(slave);
       slaveClient.shutdown();
-      slaveClient = createNewSolrServer(slaveJetty.getLocalPort());
+      slaveClient = createNewSolrClient(slaveJetty.getLocalPort());
       
       // get docs from slave and check if number is equal to master
       NamedList slaveQueryRsp = rQuery(nDocs, "*:*", slaveClient);
@@ -1137,7 +1137,7 @@ public class TestReplicationHandler exte
 
     masterJetty = createJetty(master);
     masterClient.shutdown();
-    masterClient = createNewSolrServer(masterJetty.getLocalPort());
+    masterClient = createNewSolrClient(masterJetty.getLocalPort());
 
     masterClient.deleteByQuery("*:*");
     for (int i = 0; i < docs; i++)
@@ -1155,7 +1155,7 @@ public class TestReplicationHandler exte
     //start slave
     slaveJetty = createJetty(slave);
     slaveClient.shutdown();
-    slaveClient = createNewSolrServer(slaveJetty.getLocalPort());
+    slaveClient = createNewSolrClient(slaveJetty.getLocalPort());
     
     //get docs from slave and check if number is equal to master
     NamedList slaveQueryRsp = rQuery(docs, "*:*", slaveClient);
@@ -1236,7 +1236,7 @@ public class TestReplicationHandler exte
 
     masterJetty = createJetty(master);
     masterClient.shutdown();
-    masterClient = createNewSolrServer(masterJetty.getLocalPort());
+    masterClient = createNewSolrClient(masterJetty.getLocalPort());
 
     slave.setTestPort(masterJetty.getLocalPort());
     slave.copyConfigFile(slave.getSolrConfigFile(), "solrconfig.xml");
@@ -1244,7 +1244,7 @@ public class TestReplicationHandler exte
     slaveJetty.stop();
     slaveJetty = createJetty(slave);
     slaveClient.shutdown();
-    slaveClient = createNewSolrServer(slaveJetty.getLocalPort());
+    slaveClient = createNewSolrClient(slaveJetty.getLocalPort());
 
     slaveClient.deleteByQuery("*:*");
     slaveClient.commit();
@@ -1297,7 +1297,7 @@ public class TestReplicationHandler exte
     useFactory(null);
     masterJetty = createJetty(master);
     masterClient.shutdown();
-    masterClient = createNewSolrServer(masterJetty.getLocalPort());
+    masterClient = createNewSolrClient(masterJetty.getLocalPort());
 
     //index docs
     final int totalDocs = TestUtil.nextInt(random(), 50, 100);
@@ -1323,14 +1323,14 @@ public class TestReplicationHandler exte
     //Start again and replicate the data
     useFactory(null);
     masterJetty = createJetty(master);
-    masterClient = createNewSolrServer(masterJetty.getLocalPort());
+    masterClient = createNewSolrClient(masterJetty.getLocalPort());
 
     //start slave
     slave.setTestPort(masterJetty.getLocalPort());
     slave.copyConfigFile(CONF_DIR + "solrconfig-slave1.xml", "solrconfig.xml");
     slaveJetty = createJetty(slave);
     slaveClient.shutdown();
-    slaveClient = createNewSolrServer(slaveJetty.getLocalPort());
+    slaveClient = createNewSolrClient(slaveJetty.getLocalPort());
 
     long startTime = System.nanoTime();
 
@@ -1359,9 +1359,9 @@ public class TestReplicationHandler exte
 
   private class AddExtraDocs implements Runnable {
 
-    SolrServer masterClient;
+    SolrClient masterClient;
     int startId;
-    public AddExtraDocs(SolrServer masterClient, int startId) {
+    public AddExtraDocs(SolrClient masterClient, int startId) {
       this.masterClient = masterClient;
       this.startId = startId;
     }
@@ -1404,7 +1404,7 @@ public class TestReplicationHandler exte
     out.close();
   }
 
-  private UpdateResponse emptyUpdate(SolrServer client, String... params) 
+  private UpdateResponse emptyUpdate(SolrClient client, String... params)
     throws SolrServerException, IOException {
 
     UpdateRequest req = new UpdateRequest();
@@ -1417,12 +1417,12 @@ public class TestReplicationHandler exte
    * time for collection is after the specified "min".  Will loop for 
    * at most "timeout" milliseconds before throwing an assertion failure.
    * 
-   * @param client The SolrServer to poll
+   * @param client The SolrClient to poll
    * @param timeout the max milliseconds to continue polling for
    * @param min the startTime value must exceed this value before the method will return, if null this method will return the first startTime value encountered.
    * @return the startTime value of collection
    */
-  private Date watchCoreStartAt(SolrServer client, final long timeout, 
+  private Date watchCoreStartAt(SolrClient client, final long timeout,
                                 final Date min) throws InterruptedException, IOException, SolrServerException {
     final long sleepInterval = 200;
     long timeSlept = 0;

Modified: lucene/dev/branches/branch_5x/solr/core/src/test/org/apache/solr/handler/TestReplicationHandlerBackup.java
URL: http://svn.apache.org/viewvc/lucene/dev/branches/branch_5x/solr/core/src/test/org/apache/solr/handler/TestReplicationHandlerBackup.java?rev=1648706&r1=1648705&r2=1648706&view=diff
==============================================================================
--- lucene/dev/branches/branch_5x/solr/core/src/test/org/apache/solr/handler/TestReplicationHandlerBackup.java (original)
+++ lucene/dev/branches/branch_5x/solr/core/src/test/org/apache/solr/handler/TestReplicationHandlerBackup.java Wed Dec 31 14:31:03 2014
@@ -17,15 +17,6 @@ package org.apache.solr.handler;
  * limitations under the License.
  */
 
-import java.io.File;
-import java.io.FilenameFilter;
-import java.io.IOException;
-import java.io.InputStream;
-import java.net.URL;
-import java.nio.file.Path;
-import java.util.regex.Matcher;
-import java.util.regex.Pattern;
-
 import org.apache.commons.io.IOUtils;
 import org.apache.lucene.index.DirectoryReader;
 import org.apache.lucene.index.IndexReader;
@@ -37,21 +28,30 @@ import org.apache.lucene.store.SimpleFSD
 import org.apache.lucene.util.TestUtil;
 import org.apache.solr.SolrJettyTestBase;
 import org.apache.solr.SolrTestCaseJ4;
-import org.apache.solr.client.solrj.SolrServer;
+import org.apache.solr.client.solrj.SolrClient;
 import org.apache.solr.client.solrj.embedded.JettySolrRunner;
-import org.apache.solr.client.solrj.impl.HttpSolrServer;
+import org.apache.solr.client.solrj.impl.HttpSolrClient;
 import org.apache.solr.common.SolrInputDocument;
 import org.apache.solr.util.FileUtils;
 import org.junit.After;
 import org.junit.Before;
 import org.junit.Test;
 
+import java.io.File;
+import java.io.FilenameFilter;
+import java.io.IOException;
+import java.io.InputStream;
+import java.net.URL;
+import java.nio.file.Path;
+import java.util.regex.Matcher;
+import java.util.regex.Pattern;
+
 @SolrTestCaseJ4.SuppressSSL     // Currently unknown why SSL does not work with this test
 public class TestReplicationHandlerBackup extends SolrJettyTestBase {
 
   JettySolrRunner masterJetty;
   TestReplicationHandler.SolrInstance master = null;
-  SolrServer masterClient;
+  SolrClient masterClient;
   
   private static final String CONF_DIR = "solr"
       + File.separator + "collection1" + File.separator + "conf"
@@ -70,15 +70,15 @@ public class TestReplicationHandlerBacku
     return jetty;
   }
 
-  private static SolrServer createNewSolrServer(int port) {
+  private static SolrClient createNewSolrClient(int port) {
     try {
-      // setup the server...
-      HttpSolrServer s = new HttpSolrServer(buildUrl(port, context));
-      s.setConnectionTimeout(15000);
-      s.setSoTimeout(60000);
-      s.setDefaultMaxConnectionsPerHost(100);
-      s.setMaxTotalConnections(100);
-      return s;
+      // setup the client...
+      HttpSolrClient client = new HttpSolrClient(buildUrl(port, context));
+      client.setConnectionTimeout(15000);
+      client.setSoTimeout(60000);
+      client.setDefaultMaxConnectionsPerHost(100);
+      client.setMaxTotalConnections(100);
+      return client;
     }
     catch (Exception ex) {
       throw new RuntimeException(ex);
@@ -101,7 +101,7 @@ public class TestReplicationHandlerBacku
     master.copyConfigFile(CONF_DIR + configFile, "solrconfig.xml");
 
     masterJetty = createJetty(master);
-    masterClient = createNewSolrServer(masterJetty.getLocalPort());
+    masterClient = createNewSolrClient(masterJetty.getLocalPort());
   }
 
   @Override

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=1648706&r1=1648705&r2=1648706&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 Wed Dec 31 14:31:03 2014
@@ -21,8 +21,8 @@ package org.apache.solr.handler;
 import java.util.ArrayList;
 import java.util.List;
 
-import org.apache.solr.client.solrj.SolrServer;
-import org.apache.solr.client.solrj.impl.HttpSolrServer;
+import org.apache.solr.client.solrj.SolrClient;
+import org.apache.solr.client.solrj.impl.HttpSolrClient;
 import org.apache.solr.cloud.AbstractFullDistribZkTestBase;
 import org.apache.solr.common.cloud.DocCollection;
 import org.apache.solr.common.cloud.Replica;
@@ -39,11 +39,11 @@ public class TestSolrConfigHandlerCloud
   private List<RestTestHarness> restTestHarnesses = new ArrayList<>();
 
   private void setupHarnesses() {
-    for (final SolrServer client : clients) {
+    for (final SolrClient client : clients) {
       RestTestHarness harness = new RestTestHarness(new RESTfulServerProvider() {
         @Override
         public String getBaseURL() {
-          return ((HttpSolrServer)client).getBaseURL();
+          return ((HttpSolrClient)client).getBaseURL();
         }
       });
       restTestHarnesses.add(harness);

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=1648706&r1=1648705&r2=1648706&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 Wed Dec 31 14:31:03 2014
@@ -32,9 +32,9 @@ import org.apache.http.HttpEntity;
 import org.apache.http.client.methods.HttpGet;
 import org.apache.http.util.EntityUtils;
 import org.apache.solr.SolrTestCaseJ4;
-import org.apache.solr.client.solrj.SolrServer;
-import org.apache.solr.client.solrj.impl.CloudSolrServer;
-import org.apache.solr.client.solrj.impl.HttpSolrServer;
+import org.apache.solr.client.solrj.SolrClient;
+import org.apache.solr.client.solrj.impl.CloudSolrClient;
+import org.apache.solr.client.solrj.impl.HttpSolrClient;
 import org.apache.solr.cloud.AbstractFullDistribZkTestBase;
 import org.apache.solr.common.cloud.DocCollection;
 import org.apache.solr.common.cloud.Replica;
@@ -50,7 +50,6 @@ import org.slf4j.LoggerFactory;
 
 import static java.util.Arrays.asList;
 import static org.apache.solr.core.ConfigOverlay.getObjectByPath;
-import static org.apache.solr.rest.schema.TestBulkSchemaAPI.getAsMap;
 import static org.noggit.ObjectBuilder.getVal;
 
 
@@ -61,11 +60,11 @@ public class TestSolrConfigHandlerConcur
   private List<RestTestHarness> restTestHarnesses = new ArrayList<>();
 
   private void setupHarnesses() {
-    for (final SolrServer client : clients) {
+    for (final SolrClient client : clients) {
       RestTestHarness harness = new RestTestHarness(new RESTfulServerProvider() {
         @Override
         public String getBaseURL() {
-          return ((HttpSolrServer)client).getBaseURL();
+          return ((HttpSolrClient)client).getBaseURL();
         }
       });
       restTestHarnesses.add(harness);
@@ -192,11 +191,11 @@ public class TestSolrConfigHandlerConcur
 
   }
 
-  public static Map getAsMap(String uri, CloudSolrServer cloudClient) throws Exception {
+  public static Map getAsMap(String uri, CloudSolrClient cloudClient) throws Exception {
     HttpGet get = new HttpGet(uri) ;
     HttpEntity entity = null;
     try {
-      entity = cloudClient.getLbServer().getHttpClient().execute(get).getEntity();
+      entity = cloudClient.getLbClient().getHttpClient().execute(get).getEntity();
       String response = EntityUtils.toString(entity, StandardCharsets.UTF_8);
       return (Map) ObjectBuilder.getVal(new JSONParser(new StringReader(response)));
     } finally {

Modified: lucene/dev/branches/branch_5x/solr/core/src/test/org/apache/solr/handler/admin/CoreAdminHandlerTest.java
URL: http://svn.apache.org/viewvc/lucene/dev/branches/branch_5x/solr/core/src/test/org/apache/solr/handler/admin/CoreAdminHandlerTest.java?rev=1648706&r1=1648705&r2=1648706&view=diff
==============================================================================
--- lucene/dev/branches/branch_5x/solr/core/src/test/org/apache/solr/handler/admin/CoreAdminHandlerTest.java (original)
+++ lucene/dev/branches/branch_5x/solr/core/src/test/org/apache/solr/handler/admin/CoreAdminHandlerTest.java Wed Dec 31 14:31:03 2014
@@ -17,14 +17,12 @@
 
 package org.apache.solr.handler.admin;
 
-import java.io.File;
-import java.util.Map;
-
+import com.carrotsearch.randomizedtesting.rules.SystemPropertiesRestoreRule;
 import org.apache.commons.codec.Charsets;
 import org.apache.commons.io.FileUtils;
 import org.apache.solr.SolrTestCaseJ4;
 import org.apache.solr.client.solrj.embedded.JettySolrRunner;
-import org.apache.solr.client.solrj.impl.HttpSolrServer;
+import org.apache.solr.client.solrj.impl.HttpSolrClient;
 import org.apache.solr.client.solrj.request.CoreAdminRequest;
 import org.apache.solr.common.SolrException;
 import org.apache.solr.common.SolrInputDocument;
@@ -41,7 +39,8 @@ import org.junit.Test;
 import org.junit.rules.RuleChain;
 import org.junit.rules.TestRule;
 
-import com.carrotsearch.randomizedtesting.rules.SystemPropertiesRestoreRule;
+import java.io.File;
+import java.util.Map;
 
 public class CoreAdminHandlerTest extends SolrTestCaseJ4 {
   
@@ -214,26 +213,26 @@ public class CoreAdminHandlerTest extend
     File corex = new File(solrHomeDirectory, "corex");
     FileUtils.write(new File(corex, "core.properties"), "", Charsets.UTF_8.toString());
     JettySolrRunner runner = new JettySolrRunner(solrHomeDirectory.getAbsolutePath(), "/solr", 0);
-    HttpSolrServer server = null;
+    HttpSolrClient client = null;
     try {
       runner.start();
-      server = new HttpSolrServer("http://localhost:" + runner.getLocalPort() + "/solr/corex");
-      server.setConnectionTimeout(SolrTestCaseJ4.DEFAULT_CONNECTION_TIMEOUT);
-      server.setSoTimeout(SolrTestCaseJ4.DEFAULT_CONNECTION_TIMEOUT);
+      client = new HttpSolrClient("http://localhost:" + runner.getLocalPort() + "/solr/corex");
+      client.setConnectionTimeout(SolrTestCaseJ4.DEFAULT_CONNECTION_TIMEOUT);
+      client.setSoTimeout(SolrTestCaseJ4.DEFAULT_CONNECTION_TIMEOUT);
       SolrInputDocument doc = new SolrInputDocument();
       doc.addField("id", "123");
-      server.add(doc);
-      server.commit();
-      server.shutdown();
-
-      server = new HttpSolrServer("http://localhost:" + runner.getLocalPort() + "/solr");
-      server.setConnectionTimeout(SolrTestCaseJ4.DEFAULT_CONNECTION_TIMEOUT);
-      server.setSoTimeout(SolrTestCaseJ4.DEFAULT_CONNECTION_TIMEOUT);
+      client.add(doc);
+      client.commit();
+      client.shutdown();
+
+      client = new HttpSolrClient("http://localhost:" + runner.getLocalPort() + "/solr");
+      client.setConnectionTimeout(SolrTestCaseJ4.DEFAULT_CONNECTION_TIMEOUT);
+      client.setSoTimeout(SolrTestCaseJ4.DEFAULT_CONNECTION_TIMEOUT);
       CoreAdminRequest.Unload req = new CoreAdminRequest.Unload(false);
       req.setDeleteInstanceDir(true);
       req.setCoreName("corex");
-      req.process(server);
-      server.shutdown();
+      req.process(client);
+      client.shutdown();
 
       runner.stop();
 
@@ -242,8 +241,8 @@ public class CoreAdminHandlerTest extend
     } catch (Exception e) {
       log.error("Exception testing core unload with deleteInstanceDir=true", e);
     } finally {
-      if (server != null) {
-        server.shutdown();
+      if (client != null) {
+        client.shutdown();
       }
       if (!runner.isStopped())  {
         runner.stop();

Modified: lucene/dev/branches/branch_5x/solr/core/src/test/org/apache/solr/handler/admin/ShowFileRequestHandlerTest.java
URL: http://svn.apache.org/viewvc/lucene/dev/branches/branch_5x/solr/core/src/test/org/apache/solr/handler/admin/ShowFileRequestHandlerTest.java?rev=1648706&r1=1648705&r2=1648706&view=diff
==============================================================================
--- lucene/dev/branches/branch_5x/solr/core/src/test/org/apache/solr/handler/admin/ShowFileRequestHandlerTest.java (original)
+++ lucene/dev/branches/branch_5x/solr/core/src/test/org/apache/solr/handler/admin/ShowFileRequestHandlerTest.java Wed Dec 31 14:31:03 2014
@@ -17,15 +17,14 @@ package org.apache.solr.handler.admin;
  * limitations under the License.
  */
 
-import org.apache.solr.client.solrj.ResponseParser;
 import org.apache.solr.SolrJettyTestBase;
-import org.apache.solr.client.solrj.SolrServer;
+import org.apache.solr.client.solrj.ResponseParser;
+import org.apache.solr.client.solrj.SolrClient;
 import org.apache.solr.client.solrj.SolrServerException;
 import org.apache.solr.client.solrj.request.QueryRequest;
 import org.apache.solr.client.solrj.response.QueryResponse;
-import org.apache.solr.common.util.NamedList;
 import org.apache.solr.common.SolrException;
-import org.apache.solr.util.ExternalPaths;
+import org.apache.solr.common.util.NamedList;
 import org.apache.solr.core.SolrCore;
 import org.apache.solr.response.SolrQueryResponse;
 import org.junit.BeforeClass;
@@ -47,12 +46,12 @@ public class ShowFileRequestHandlerTest
   }
 
   public void test404ViaHttp() throws SolrServerException {
-    SolrServer server = getSolrServer();
+    SolrClient client = getSolrClient();
     QueryRequest request = new QueryRequest(params("file",
                                                    "does-not-exist-404.txt"));
     request.setPath("/admin/file");
     try {
-      QueryResponse resp = request.process(server);
+      QueryResponse resp = request.process(client);
       fail("didn't get 404 exception");
     } catch (SolrException e) {
       assertEquals(404, e.code());
@@ -82,17 +81,17 @@ public class ShowFileRequestHandlerTest
   }
 
   public void testDirList() throws SolrServerException {
-    SolrServer server = getSolrServer();
+    SolrClient client = getSolrClient();
     //assertQ(req("qt", "/admin/file")); TODO file bug that SolrJettyTestBase extends SolrTestCaseJ4
     QueryRequest request = new QueryRequest();
     request.setPath("/admin/file");
-    QueryResponse resp = request.process(server);
+    QueryResponse resp = request.process(client);
     assertEquals(0,resp.getStatus());
     assertTrue(((NamedList) resp.getResponse().get("files")).size() > 0);//some files
   }
 
   public void testGetRawFile() throws SolrServerException, IOException {
-    SolrServer server = getSolrServer();
+    SolrClient client = getSolrClient();
     //assertQ(req("qt", "/admin/file")); TODO file bug that SolrJettyTestBase extends SolrTestCaseJ4
     QueryRequest request = new QueryRequest(params("file","schema.xml"));
     request.setPath("/admin/file");
@@ -120,8 +119,8 @@ public class ShowFileRequestHandlerTest
       }
     });
 
-    server.request( request );//runs request
-    //request.process(server); but we don't have a NamedList response
+    client.request(request);//runs request
+    //request.process(client); but we don't have a NamedList response
     assertTrue(readFile.get());
   }
 }

Modified: lucene/dev/branches/branch_5x/solr/core/src/test/org/apache/solr/handler/component/DistributedDebugComponentTest.java
URL: http://svn.apache.org/viewvc/lucene/dev/branches/branch_5x/solr/core/src/test/org/apache/solr/handler/component/DistributedDebugComponentTest.java?rev=1648706&r1=1648705&r2=1648706&view=diff
==============================================================================
--- lucene/dev/branches/branch_5x/solr/core/src/test/org/apache/solr/handler/component/DistributedDebugComponentTest.java (original)
+++ lucene/dev/branches/branch_5x/solr/core/src/test/org/apache/solr/handler/component/DistributedDebugComponentTest.java Wed Dec 31 14:31:03 2014
@@ -1,22 +1,12 @@
 package org.apache.solr.handler.component;
 
-import java.io.File;
-import java.util.ArrayList;
-import java.util.Arrays;
-import java.util.HashSet;
-import java.util.Iterator;
-import java.util.List;
-import java.util.Map;
-import java.util.Map.Entry;
-import java.util.Set;
-
 import org.apache.commons.io.FileUtils;
 import org.apache.commons.lang.StringUtils;
 import org.apache.solr.SolrJettyTestBase;
+import org.apache.solr.client.solrj.SolrClient;
 import org.apache.solr.client.solrj.SolrQuery;
-import org.apache.solr.client.solrj.SolrServer;
 import org.apache.solr.client.solrj.SolrServerException;
-import org.apache.solr.client.solrj.impl.HttpSolrServer;
+import org.apache.solr.client.solrj.impl.HttpSolrClient;
 import org.apache.solr.client.solrj.request.CoreAdminRequest;
 import org.apache.solr.client.solrj.response.QueryResponse;
 import org.apache.solr.common.SolrException;
@@ -27,6 +17,16 @@ import org.junit.AfterClass;
 import org.junit.BeforeClass;
 import org.junit.Test;
 
+import java.io.File;
+import java.util.ArrayList;
+import java.util.Arrays;
+import java.util.HashSet;
+import java.util.Iterator;
+import java.util.List;
+import java.util.Map;
+import java.util.Map.Entry;
+import java.util.Set;
+
 /*
  * Licensed to the Apache Software Foundation (ASF) under one or more
  * contributor license agreements.  See the NOTICE file distributed with
@@ -46,8 +46,8 @@ import org.junit.Test;
 
 public class DistributedDebugComponentTest extends SolrJettyTestBase {
   
-  private static SolrServer collection1;
-  private static SolrServer collection2;
+  private static SolrClient collection1;
+  private static SolrClient collection2;
   private static String shard1;
   private static String shard2;
   private static File solrHome;
@@ -65,8 +65,8 @@ public class DistributedDebugComponentTe
     solrHome = createSolrHome();
     createJetty(solrHome.getAbsolutePath(), null, null);
     String url = jetty.getBaseUrl().toString();
-    collection1 = new HttpSolrServer(url);
-    collection2 = new HttpSolrServer(url + "/collection2");
+    collection1 = new HttpSolrClient(url);
+    collection2 = new HttpSolrClient(url + "/collection2");
     
     String urlCollection1 = jetty.getBaseUrl().toString() + "/" + "collection1";
     String urlCollection2 = jetty.getBaseUrl().toString() + "/" + "collection2";
@@ -155,7 +155,7 @@ public class DistributedDebugComponentTe
     final int NUM_ITERS = atLeast(50);
 
     for (int i = 0; i < NUM_ITERS; i++) { 
-      SolrServer client = random().nextBoolean() ? collection1 : collection2;
+      SolrClient client = random().nextBoolean() ? collection1 : collection2;
       
       SolrQuery q = new SolrQuery();
       q.set("distrib", "true");
@@ -259,10 +259,10 @@ public class DistributedDebugComponentTe
     
   }
   
-  private void verifyDebugSections(SolrQuery query, SolrServer server) throws SolrServerException {
+  private void verifyDebugSections(SolrQuery query, SolrClient client) throws SolrServerException {
     query.set("debugQuery", "true");
     query.remove("debug");
-    QueryResponse response = server.query(query);
+    QueryResponse response = client.query(query);
     assertFalse(response.getDebugMap().isEmpty());
     assertInDebug(response, "track");
     assertInDebug(response, "rawquerystring");
@@ -275,7 +275,7 @@ public class DistributedDebugComponentTe
     
     query.set("debug", "true");
     query.remove("debugQuery");
-    response = server.query(query);
+    response = client.query(query);
     assertFalse(response.getDebugMap().isEmpty());
     assertInDebug(response, "track");
     assertInDebug(response, "rawquerystring");
@@ -286,8 +286,8 @@ public class DistributedDebugComponentTe
     assertInDebug(response, "explain");
     assertInDebug(response, "timing");
     
-    query.set("debug",  "track");
-    response = server.query(query);
+    query.set("debug", "track");
+    response = client.query(query);
     assertFalse(response.getDebugMap().isEmpty());
     assertInDebug(response, "track");
     assertNotInDebug(response, "rawquerystring");
@@ -298,8 +298,8 @@ public class DistributedDebugComponentTe
     assertNotInDebug(response, "explain");
     assertNotInDebug(response, "timing");
     
-    query.set("debug",  "query");
-    response = server.query(query);
+    query.set("debug", "query");
+    response = client.query(query);
     assertFalse(response.getDebugMap().isEmpty());
     assertNotInDebug(response, "track");
     assertInDebug(response, "rawquerystring");
@@ -310,8 +310,8 @@ public class DistributedDebugComponentTe
     assertNotInDebug(response, "explain");
     assertNotInDebug(response, "timing");
     
-    query.set("debug",  "results");
-    response = server.query(query);
+    query.set("debug", "results");
+    response = client.query(query);
     assertFalse(response.getDebugMap().isEmpty());
     assertNotInDebug(response, "track");
     assertNotInDebug(response, "rawquerystring");
@@ -322,8 +322,8 @@ public class DistributedDebugComponentTe
     assertInDebug(response, "explain");
     assertNotInDebug(response, "timing");
     
-    query.set("debug",  "timing");
-    response = server.query(query);
+    query.set("debug", "timing");
+    response = client.query(query);
     assertFalse(response.getDebugMap().isEmpty());
     assertNotInDebug(response, "track");
     assertNotInDebug(response, "rawquerystring");
@@ -334,8 +334,8 @@ public class DistributedDebugComponentTe
     assertNotInDebug(response, "explain");
     assertInDebug(response, "timing");
     
-    query.set("debug",  "false");
-    response = server.query(query);
+    query.set("debug", "false");
+    response = client.query(query);
     assertNull(response.getDebugMap());
   }
   

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=1648706&r1=1648705&r2=1648706&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 Wed Dec 31 14:31:03 2014
@@ -22,7 +22,7 @@ import java.util.List;
 import java.io.IOException;
 
 import org.apache.solr.BaseDistributedSearchTestCase;
-import org.apache.solr.client.solrj.SolrServer;
+import org.apache.solr.client.solrj.SolrClient;
 import org.apache.solr.client.solrj.SolrServerException;
 import org.apache.solr.client.solrj.response.FieldStatsInfo;
 import org.apache.solr.client.solrj.response.PivotField;
@@ -763,10 +763,10 @@ public class DistributedFacetPivotLargeT
     commit();
 
     final int maxDocs = 50;
-    final SolrServer zeroShard = clients.get(0);
-    final SolrServer oneShard = clients.get(1);
-    final SolrServer twoShard = clients.get(2);
-    final SolrServer threeShard = clients.get(3); // edge case: never gets any matching docs
+    final SolrClient zeroShard = clients.get(0);
+    final SolrClient oneShard = clients.get(1);
+    final SolrClient twoShard = clients.get(2);
+    final SolrClient threeShard = clients.get(3); // edge case: never gets any matching docs
 
     for(Integer i=0;i<maxDocs;i++){//50 entries
       addPivotDoc(zeroShard, "id", getDocNum(), "place_s", "cardiff", "company_t", "microsoft polecat bbc","pay_i",2400,"hiredate_dt", "2012-07-01T12:30:00Z","real_b","true");
@@ -817,10 +817,10 @@ public class DistributedFacetPivotLargeT
   /**
    * Builds up a SolrInputDocument using the specified fields, then adds it to the 
    * specified client as well as the control client 
-   * @see #indexDoc(SolrServer,SolrParams,SolrInputDocument...)
+   * @see #indexDoc(org.apache.solr.client.solrj.SolrClient,SolrParams,SolrInputDocument...)
    * @see #sdoc
    */
-  private void addPivotDoc(SolrServer client, Object... fields) 
+  private void addPivotDoc(SolrClient client, Object... fields)
     throws IOException, SolrServerException {
 
     indexDoc(client, params(), sdoc(fields));

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=1648706&r1=1648705&r2=1648706&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 Wed Dec 31 14:31:03 2014
@@ -17,16 +17,10 @@ package org.apache.solr.handler.componen
  * limitations under the License.
  */
 
-import java.util.Date;
-import java.util.ArrayList;
-import java.util.Collections;
-import java.util.Comparator;
 import java.util.List;
-import java.io.IOException;
 
 import org.apache.solr.BaseDistributedSearchTestCase;
-import org.apache.solr.client.solrj.SolrServer;
-import org.apache.solr.client.solrj.SolrServerException;
+import org.apache.solr.client.solrj.SolrClient;
 import org.apache.solr.client.solrj.response.FieldStatsInfo;
 import org.apache.solr.client.solrj.response.PivotField;
 import org.apache.solr.common.params.FacetParams;
@@ -60,9 +54,9 @@ public class DistributedFacetPivotLongTa
   @Override
   public void doTest() throws Exception {
 
-    final SolrServer shard0 = clients.get(0);
-    final SolrServer shard1 = clients.get(1);
-    final SolrServer shard2 = clients.get(2);
+    final SolrClient shard0 = clients.get(0);
+    final SolrClient shard1 = clients.get(1);
+    final SolrClient shard2 = clients.get(2);
     
     // the 5 top foo_s terms have 100 docs each on every shard
     for (int i = 0; i < 100; i++) {

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=1648706&r1=1648705&r2=1648706&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 Wed Dec 31 14:31:03 2014
@@ -18,8 +18,7 @@ package org.apache.solr.handler.componen
  */
 
 import org.apache.solr.BaseDistributedSearchTestCase;
-import org.apache.solr.client.solrj.SolrServer;
-import org.apache.solr.client.solrj.SolrServerException;
+import org.apache.solr.client.solrj.SolrClient;
 import org.apache.solr.client.solrj.response.FieldStatsInfo;
 import org.apache.solr.client.solrj.response.PivotField;
 import org.apache.solr.client.solrj.response.QueryResponse;
@@ -27,9 +26,6 @@ import org.apache.solr.common.params.Fac
 import org.apache.solr.common.params.ModifiableSolrParams;
 import org.apache.solr.common.params.SolrParams;
 
-import java.util.ArrayList;
-import java.util.Collections;
-import java.util.Comparator;
 import java.util.List;
 
 /**
@@ -50,8 +46,8 @@ public class DistributedFacetPivotSmallA
   public void doTest() throws Exception {
 
     del("*:*");
-    final SolrServer shard0 = clients.get(0);
-    final SolrServer shard1 = clients.get(1);
+    final SolrClient shard0 = clients.get(0);
+    final SolrClient shard1 = clients.get(1);
 
     // NOTE: we use the literal (4 character) string "null" as a company name
     // to help ensure there isn't any bugs where the literal string is treated as if it 

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=1648706&r1=1648705&r2=1648706&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 Wed Dec 31 14:31:03 2014
@@ -26,7 +26,7 @@ import junit.framework.Assert;
 import org.apache.lucene.util.LuceneTestCase.Slow;
 import org.apache.lucene.util.LuceneTestCase.SuppressTempFileChecks;
 import org.apache.solr.BaseDistributedSearchTestCase;
-import org.apache.solr.client.solrj.SolrServer;
+import org.apache.solr.client.solrj.SolrClient;
 import org.apache.solr.client.solrj.response.QueryResponse;
 import org.apache.solr.common.params.ModifiableSolrParams;
 import org.apache.solr.common.params.SpellingParams;
@@ -79,7 +79,7 @@ public class DistributedSpellCheckCompon
     // query a random server
     params.set("shards", shards);
     int which = r.nextInt(clients.size());
-    SolrServer client = clients.get(which);
+    SolrClient client = clients.get(which);
     client.query(params);
   }
   

Modified: lucene/dev/branches/branch_5x/solr/core/src/test/org/apache/solr/request/TestRemoteStreaming.java
URL: http://svn.apache.org/viewvc/lucene/dev/branches/branch_5x/solr/core/src/test/org/apache/solr/request/TestRemoteStreaming.java?rev=1648706&r1=1648705&r2=1648706&view=diff
==============================================================================
--- lucene/dev/branches/branch_5x/solr/core/src/test/org/apache/solr/request/TestRemoteStreaming.java (original)
+++ lucene/dev/branches/branch_5x/solr/core/src/test/org/apache/solr/request/TestRemoteStreaming.java Wed Dec 31 14:31:03 2014
@@ -19,13 +19,12 @@ package org.apache.solr.request;
 
 import org.apache.commons.io.IOUtils;
 import org.apache.lucene.util.LuceneTestCase;
-import org.apache.lucene.util.TestUtil;
 import org.apache.solr.SolrJettyTestBase;
 import org.apache.solr.SolrTestCaseJ4.SuppressSSL;
 import org.apache.solr.client.solrj.SolrQuery;
-import org.apache.solr.client.solrj.SolrServer;
+import org.apache.solr.client.solrj.SolrClient;
 import org.apache.solr.client.solrj.SolrServerException;
-import org.apache.solr.client.solrj.impl.HttpSolrServer;
+import org.apache.solr.client.solrj.impl.HttpSolrClient;
 import org.apache.solr.client.solrj.request.QueryRequest;
 import org.apache.solr.client.solrj.response.QueryResponse;
 import org.apache.solr.common.SolrException;
@@ -69,11 +68,11 @@ public class TestRemoteStreaming extends
   @Before
   public void doBefore() throws IOException, SolrServerException {
     //add document and commit, and ensure it's there
-    SolrServer server1 = getSolrServer();
+    SolrClient client = getSolrClient();
     SolrInputDocument doc = new SolrInputDocument();
     doc.addField( "id", "1234" );
-    server1.add(doc);
-    server1.commit();
+    client.add(doc);
+    client.commit();
     assertTrue(searchFindsIt());
   }
 
@@ -85,10 +84,10 @@ public class TestRemoteStreaming extends
 
   @Test
   public void testStreamUrl() throws Exception {
-    HttpSolrServer solrServer = (HttpSolrServer) getSolrServer();
-    String streamUrl = solrServer.getBaseURL()+"/select?q=*:*&fl=id&wt=csv";
+    HttpSolrClient client = (HttpSolrClient) getSolrClient();
+    String streamUrl = client.getBaseURL()+"/select?q=*:*&fl=id&wt=csv";
 
-    String getUrl = solrServer.getBaseURL()+"/debug/dump?wt=xml&stream.url="+URLEncoder.encode(streamUrl,"UTF-8");
+    String getUrl = client.getBaseURL()+"/debug/dump?wt=xml&stream.url="+URLEncoder.encode(streamUrl,"UTF-8");
     String content = getUrlForString(getUrl);
     assertTrue(content.contains("1234"));
     //System.out.println(content);
@@ -116,7 +115,7 @@ public class TestRemoteStreaming extends
     query.setQuery( "*:*" );//for anything
     query.add("stream.url",makeDeleteAllUrl());
     try {
-      getSolrServer().query(query);
+      getSolrClient().query(query);
       fail();
     } catch (SolrException se) {
       assertSame(ErrorCode.BAD_REQUEST, ErrorCode.getErrorCode(se.code()));
@@ -140,7 +139,7 @@ public class TestRemoteStreaming extends
         return "/select";
       }
     };
-    QueryResponse rsp = queryRequest.process(getSolrServer());
+    QueryResponse rsp = queryRequest.process(getSolrClient());
     //!! should *fail* above for security purposes
     String handler = (String) rsp.getHeader().get("handler");
     System.out.println(handler);
@@ -148,15 +147,15 @@ public class TestRemoteStreaming extends
 
   /** Compose a url that if you get it, it will delete all the data. */
   private String makeDeleteAllUrl() throws UnsupportedEncodingException {
-    HttpSolrServer solrServer = (HttpSolrServer) getSolrServer();
+    HttpSolrClient client = (HttpSolrClient) getSolrClient();
     String deleteQuery = "<delete><query>*:*</query></delete>";
-    return solrServer.getBaseURL()+"/update?commit=true&stream.body="+ URLEncoder.encode(deleteQuery, "UTF-8");
+    return client.getBaseURL()+"/update?commit=true&stream.body="+ URLEncoder.encode(deleteQuery, "UTF-8");
   }
 
   private boolean searchFindsIt() throws SolrServerException {
     SolrQuery query = new SolrQuery();
     query.setQuery( "id:1234" );
-    QueryResponse rsp = getSolrServer().query(query);
+    QueryResponse rsp = getSolrClient().query(query);
     return rsp.getResults().getNumFound() != 0;
   }
 }

Modified: lucene/dev/branches/branch_5x/solr/core/src/test/org/apache/solr/rest/schema/TestBulkSchemaAPI.java
URL: http://svn.apache.org/viewvc/lucene/dev/branches/branch_5x/solr/core/src/test/org/apache/solr/rest/schema/TestBulkSchemaAPI.java?rev=1648706&r1=1648705&r2=1648706&view=diff
==============================================================================
--- lucene/dev/branches/branch_5x/solr/core/src/test/org/apache/solr/rest/schema/TestBulkSchemaAPI.java (original)
+++ lucene/dev/branches/branch_5x/solr/core/src/test/org/apache/solr/rest/schema/TestBulkSchemaAPI.java Wed Dec 31 14:31:03 2014
@@ -72,7 +72,7 @@ public class TestBulkSchemaAPI extends R
       jetty.stop();
       jetty = null;
     }
-    server = null;
+    client = null;
     restTestHarness = null;
   }
 

Modified: lucene/dev/branches/branch_5x/solr/core/src/test/org/apache/solr/rest/schema/TestManagedSchemaDynamicFieldResource.java
URL: http://svn.apache.org/viewvc/lucene/dev/branches/branch_5x/solr/core/src/test/org/apache/solr/rest/schema/TestManagedSchemaDynamicFieldResource.java?rev=1648706&r1=1648705&r2=1648706&view=diff
==============================================================================
--- lucene/dev/branches/branch_5x/solr/core/src/test/org/apache/solr/rest/schema/TestManagedSchemaDynamicFieldResource.java (original)
+++ lucene/dev/branches/branch_5x/solr/core/src/test/org/apache/solr/rest/schema/TestManagedSchemaDynamicFieldResource.java Wed Dec 31 14:31:03 2014
@@ -62,7 +62,7 @@ public class TestManagedSchemaDynamicFie
       jetty.stop();
       jetty = null;
     }
-    server = null;
+    client = null;
     restTestHarness = null;
   }
 

Modified: lucene/dev/branches/branch_5x/solr/core/src/test/org/apache/solr/rest/schema/TestManagedSchemaFieldResource.java
URL: http://svn.apache.org/viewvc/lucene/dev/branches/branch_5x/solr/core/src/test/org/apache/solr/rest/schema/TestManagedSchemaFieldResource.java?rev=1648706&r1=1648705&r2=1648706&view=diff
==============================================================================
--- lucene/dev/branches/branch_5x/solr/core/src/test/org/apache/solr/rest/schema/TestManagedSchemaFieldResource.java (original)
+++ lucene/dev/branches/branch_5x/solr/core/src/test/org/apache/solr/rest/schema/TestManagedSchemaFieldResource.java Wed Dec 31 14:31:03 2014
@@ -62,7 +62,7 @@ public class TestManagedSchemaFieldResou
       jetty.stop();
       jetty = null;
     }
-    server = null;
+    client = null;
     restTestHarness = null;
   }
   

Modified: lucene/dev/branches/branch_5x/solr/core/src/test/org/apache/solr/schema/TestBinaryField.java
URL: http://svn.apache.org/viewvc/lucene/dev/branches/branch_5x/solr/core/src/test/org/apache/solr/schema/TestBinaryField.java?rev=1648706&r1=1648705&r2=1648706&view=diff
==============================================================================
--- lucene/dev/branches/branch_5x/solr/core/src/test/org/apache/solr/schema/TestBinaryField.java (original)
+++ lucene/dev/branches/branch_5x/solr/core/src/test/org/apache/solr/schema/TestBinaryField.java Wed Dec 31 14:31:03 2014
@@ -16,21 +16,22 @@
  */
 package org.apache.solr.schema;
 
-import java.io.File;
-import java.nio.ByteBuffer;
-import java.util.List;
-
 import org.apache.commons.io.FileUtils;
-
+import org.apache.solr.SolrJettyTestBase;
 import org.apache.solr.SolrTestCaseJ4;
-import org.apache.solr.client.solrj.SolrServer;
+import org.apache.solr.client.solrj.SolrClient;
 import org.apache.solr.client.solrj.SolrQuery;
 import org.apache.solr.client.solrj.beans.Field;
 import org.apache.solr.client.solrj.response.QueryResponse;
-import org.apache.solr.common.*;
-import org.apache.solr.SolrJettyTestBase;
+import org.apache.solr.common.SolrDocument;
+import org.apache.solr.common.SolrDocumentList;
+import org.apache.solr.common.SolrInputDocument;
 import org.junit.BeforeClass;
 
+import java.io.File;
+import java.nio.ByteBuffer;
+import java.util.List;
+
 public class TestBinaryField extends SolrJettyTestBase {
 
   @BeforeClass
@@ -61,7 +62,7 @@ public class TestBinaryField extends Sol
 
 
   public void testSimple() throws Exception {
-    SolrServer server = getSolrServer();
+    SolrClient client = getSolrClient();
     byte[] buf = new byte[10];
     for (int i = 0; i < 10; i++) {
       buf[i] = (byte) i;
@@ -70,21 +71,21 @@ public class TestBinaryField extends Sol
     doc = new SolrInputDocument();
     doc.addField("id", 1);
     doc.addField("data", ByteBuffer.wrap(buf, 2, 5));
-    server.add(doc);
+    client.add(doc);
 
     doc = new SolrInputDocument();
     doc.addField("id", 2);
     doc.addField("data", ByteBuffer.wrap(buf, 4, 3));
-    server.add(doc);
+    client.add(doc);
 
     doc = new SolrInputDocument();
     doc.addField("id", 3);
     doc.addField("data", buf);
-    server.add(doc);
+    client.add(doc);
 
-    server.commit();
+    client.commit();
 
-    QueryResponse resp = server.query(new SolrQuery("*:*"));
+    QueryResponse resp = client.query(new SolrQuery("*:*"));
     SolrDocumentList res = resp.getResults();
     List<Bean> beans = resp.getBeans(Bean.class);
     assertEquals(3, res.size());

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=1648706&r1=1648705&r2=1648706&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 Wed Dec 31 14:31:03 2014
@@ -19,8 +19,8 @@ package org.apache.solr.schema;
 
 
 import org.apache.solr.SolrTestCaseJ4;
-import org.apache.solr.client.solrj.SolrServer;
-import org.apache.solr.client.solrj.impl.HttpSolrServer;
+import org.apache.solr.client.solrj.SolrClient;
+import org.apache.solr.client.solrj.impl.HttpSolrClient;
 import org.apache.solr.cloud.AbstractFullDistribZkTestBase;
 import org.apache.solr.common.cloud.ZkStateReader;
 import org.apache.solr.util.RESTfulServerProvider;
@@ -60,11 +60,11 @@ public class TestBulkSchemaConcurrent  e
   }
 
   private void setupHarnesses() {
-    for (final SolrServer client : clients) {
+    for (final SolrClient client : clients) {
       RestTestHarness harness = new RestTestHarness(new RESTfulServerProvider() {
         @Override
         public String getBaseURL() {
-          return ((HttpSolrServer)client).getBaseURL();
+          return ((HttpSolrClient)client).getBaseURL();
         }
       });
       restTestHarnesses.add(harness);

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=1648706&r1=1648705&r2=1648706&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 Wed Dec 31 14:31:03 2014
@@ -17,10 +17,9 @@ package org.apache.solr.schema;
  */
 
 import org.apache.solr.client.solrj.SolrServerException;
-import org.apache.solr.client.solrj.impl.HttpSolrServer;
+import org.apache.solr.client.solrj.impl.HttpSolrClient;
 import org.apache.solr.client.solrj.request.QueryRequest;
 import org.apache.solr.cloud.AbstractFullDistribZkTestBase;
-import org.apache.solr.common.SolrException;
 import org.apache.solr.common.cloud.SolrZkClient;
 import org.apache.solr.common.params.CoreAdminParams;
 import org.apache.solr.common.params.ModifiableSolrParams;
@@ -56,7 +55,7 @@ public class TestCloudManagedSchema exte
     QueryRequest request = new QueryRequest(params);
     request.setPath("/admin/cores");
     int which = r.nextInt(clients.size());
-    HttpSolrServer client = (HttpSolrServer)clients.get(which);
+    HttpSolrClient client = (HttpSolrClient)clients.get(which);
     String previousBaseURL = client.getBaseURL();
     // Strip /collection1 step from baseURL - requests fail otherwise
     client.setBaseURL(previousBaseURL.substring(0, previousBaseURL.lastIndexOf("/")));

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=1648706&r1=1648705&r2=1648706&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 Wed Dec 31 14:31:03 2014
@@ -16,9 +16,9 @@ package org.apache.solr.schema;
  * limitations under the License.
  */
 
-import org.apache.solr.client.solrj.SolrServer;
+import org.apache.solr.client.solrj.SolrClient;
 import org.apache.solr.client.solrj.embedded.JettySolrRunner;
-import org.apache.solr.client.solrj.impl.HttpSolrServer;
+import org.apache.solr.client.solrj.impl.HttpSolrClient;
 import org.apache.solr.cloud.AbstractFullDistribZkTestBase;
 import org.apache.solr.common.cloud.ClusterState;
 import org.apache.solr.common.cloud.Replica;
@@ -85,11 +85,11 @@ public class TestCloudManagedSchemaConcu
   private List<RestTestHarness> restTestHarnesses = new ArrayList<>();
   
   private void setupHarnesses() {
-    for (final SolrServer client : clients) {
+    for (final SolrClient client : clients) {
       RestTestHarness harness = new RestTestHarness(new RESTfulServerProvider() {
         @Override
         public String getBaseURL() {
-          return ((HttpSolrServer)client).getBaseURL();
+          return ((HttpSolrClient)client).getBaseURL();
         }
       });
       restTestHarnesses.add(harness);



Mime
View raw message