You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@lucene.apache.org by rm...@apache.org on 2012/03/30 14:41:35 UTC

svn commit: r1307386 [5/5] - in /lucene/dev/branches/lucene3930: ./ dev-tools/ dev-tools/eclipse/ dev-tools/maven/ dev-tools/maven/modules/benchmark/ dev-tools/maven/solr/core/ dev-tools/maven/solr/solrj/ lucene/ lucene/contrib/ lucene/contrib/misc/src...

Modified: lucene/dev/branches/lucene3930/solr/solrj/src/test/org/apache/solr/client/solrj/SolrExampleTests.java
URL: http://svn.apache.org/viewvc/lucene/dev/branches/lucene3930/solr/solrj/src/test/org/apache/solr/client/solrj/SolrExampleTests.java?rev=1307386&r1=1307385&r2=1307386&view=diff
==============================================================================
--- lucene/dev/branches/lucene3930/solr/solrj/src/test/org/apache/solr/client/solrj/SolrExampleTests.java (original)
+++ lucene/dev/branches/lucene3930/solr/solrj/src/test/org/apache/solr/client/solrj/SolrExampleTests.java Fri Mar 30 12:41:28 2012
@@ -29,12 +29,11 @@ import junit.framework.Assert;
 import org.apache.lucene.util._TestUtil;
 import org.apache.solr.SolrJettyTestBase;
 import org.apache.solr.client.solrj.impl.BinaryResponseParser;
-import org.apache.solr.client.solrj.impl.CommonsHttpSolrServer;
+import org.apache.solr.client.solrj.impl.HttpSolrServer;
 import org.apache.solr.client.solrj.impl.XMLResponseParser;
 import org.apache.solr.client.solrj.request.DirectXmlRequest;
 import org.apache.solr.client.solrj.request.LukeRequest;
 import org.apache.solr.client.solrj.request.QueryRequest;
-import org.apache.solr.client.solrj.request.SolrPing;
 import org.apache.solr.client.solrj.response.FieldStatsInfo;
 import org.apache.solr.client.solrj.request.UpdateRequest;
 import org.apache.solr.client.solrj.request.ContentStreamUpdateRequest;
@@ -288,19 +287,19 @@ abstract public class SolrExampleTests e
     
     // save the old parser, so we can set it back.
     ResponseParser oldParser = null;
-    if (server instanceof CommonsHttpSolrServer) {
-      CommonsHttpSolrServer cserver = (CommonsHttpSolrServer) server;
+    if (server instanceof HttpSolrServer) {
+      HttpSolrServer cserver = (HttpSolrServer) server;
       oldParser = cserver.getParser();
     }
     
     try {
       for (int iteration = 0; iteration < numIterations; iteration++) {
         // choose format
-        if (server instanceof CommonsHttpSolrServer) {
+        if (server instanceof HttpSolrServer) {
           if (random.nextBoolean()) {
-            ((CommonsHttpSolrServer) server).setParser(new BinaryResponseParser());
+            ((HttpSolrServer) server).setParser(new BinaryResponseParser());
           } else {
-            ((CommonsHttpSolrServer) server).setParser(new XMLResponseParser());
+            ((HttpSolrServer) server).setParser(new XMLResponseParser());
           }
         }
 
@@ -336,7 +335,7 @@ abstract public class SolrExampleTests e
     } finally {
       if (oldParser != null) {
         // set the old parser back
-        ((CommonsHttpSolrServer)server).setParser(oldParser);
+        ((HttpSolrServer)server).setParser(oldParser);
       }
     }
   }
@@ -473,14 +472,14 @@ abstract public class SolrExampleTests e
     SolrQuery query = new SolrQuery();
     query.set(CommonParams.QT, "/analysis/field");
     query.set(AnalysisParams.FIELD_TYPE, "int");
-    query.set(AnalysisParams.FIELD_VALUE, "hello");
+    query.set(AnalysisParams.FIELD_VALUE, "ignore_exception");
     try {
       server.query( query );
       Assert.fail("should have a number format exception");
     }
     catch(SolrException ex) {
       assertEquals(400, ex.code());
-      assertEquals("Invalid Number: hello", ex.getMessage());  // The reason should get passed through
+      assertEquals("Invalid Number: ignore_exception", ex.getMessage());  // The reason should get passed through
     }
     catch(Throwable t) {
       t.printStackTrace();
@@ -488,12 +487,12 @@ abstract public class SolrExampleTests e
     }
     
     try {
-      server.deleteByQuery( "??::??" ); // query syntax error
+      server.deleteByQuery( "??::?? ignore_exception" ); // query syntax error
       Assert.fail("should have a number format exception");
     }
     catch(SolrException ex) {
       assertEquals(400, ex.code());
-      assertTrue(ex.getMessage().indexOf("??::??")>0);  // The reason should get passed through
+      assertTrue(ex.getMessage().indexOf("??::?? ignore_exception")>0);  // The reason should get passed through
     }
     catch(Throwable t) {
       t.printStackTrace();

Modified: lucene/dev/branches/lucene3930/solr/solrj/src/test/org/apache/solr/client/solrj/SolrExceptionTest.java
URL: http://svn.apache.org/viewvc/lucene/dev/branches/lucene3930/solr/solrj/src/test/org/apache/solr/client/solrj/SolrExceptionTest.java?rev=1307386&r1=1307385&r2=1307386&view=diff
==============================================================================
--- lucene/dev/branches/lucene3930/solr/solrj/src/test/org/apache/solr/client/solrj/SolrExceptionTest.java (original)
+++ lucene/dev/branches/lucene3930/solr/solrj/src/test/org/apache/solr/client/solrj/SolrExceptionTest.java Fri Mar 30 12:41:28 2012
@@ -17,11 +17,10 @@
 
 package org.apache.solr.client.solrj;
 
+import org.apache.http.impl.client.DefaultHttpClient;
+import org.apache.http.impl.conn.tsccm.ThreadSafeClientConnManager;
 import org.apache.lucene.util.LuceneTestCase;
-
-import org.apache.commons.httpclient.HttpClient;
-import org.apache.commons.httpclient.MultiThreadedHttpConnectionManager;
-import org.apache.solr.client.solrj.impl.CommonsHttpSolrServer;
+import org.apache.solr.client.solrj.impl.HttpSolrServer;
 
 /**
  * 
@@ -38,9 +37,9 @@ public class SolrExceptionTest extends L
     try {
       // switched to a local address to avoid going out on the net, ns lookup issues, etc.
       // set a 1ms timeout to let the connection fail faster.
-      HttpClient httpClient = new HttpClient(new MultiThreadedHttpConnectionManager());
-      httpClient.getParams().setParameter("http.connection.timeout", new Integer(1));
-      SolrServer client = new CommonsHttpSolrServer("http://[ff01::114]:11235/solr/", httpClient);
+      DefaultHttpClient httpClient = new DefaultHttpClient(new ThreadSafeClientConnManager());
+      httpClient.getParams().setIntParameter("http.connection.timeout", 1);
+      SolrServer client = new HttpSolrServer("http://[ff01::114]:11235/solr/", httpClient);
       SolrQuery query = new SolrQuery("test123");
       client.query(query);
     } catch (SolrServerException sse) {

Modified: lucene/dev/branches/lucene3930/solr/solrj/src/test/org/apache/solr/client/solrj/TestBatchUpdate.java
URL: http://svn.apache.org/viewvc/lucene/dev/branches/lucene3930/solr/solrj/src/test/org/apache/solr/client/solrj/TestBatchUpdate.java?rev=1307386&r1=1307385&r2=1307386&view=diff
==============================================================================
--- lucene/dev/branches/lucene3930/solr/solrj/src/test/org/apache/solr/client/solrj/TestBatchUpdate.java (original)
+++ lucene/dev/branches/lucene3930/solr/solrj/src/test/org/apache/solr/client/solrj/TestBatchUpdate.java Fri Mar 30 12:41:28 2012
@@ -19,7 +19,7 @@ package org.apache.solr.client.solrj;
 import org.apache.solr.SolrJettyTestBase;
 import org.apache.solr.client.solrj.beans.Field;
 import org.apache.solr.client.solrj.impl.BinaryRequestWriter;
-import org.apache.solr.client.solrj.impl.CommonsHttpSolrServer;
+import org.apache.solr.client.solrj.impl.HttpSolrServer;
 import org.apache.solr.client.solrj.request.RequestWriter;
 import org.apache.solr.client.solrj.response.QueryResponse;
 import org.apache.solr.common.SolrInputDocument;
@@ -48,7 +48,7 @@ public class TestBatchUpdate extends Sol
 
   @Test
   public void testWithXml() throws Exception {
-    CommonsHttpSolrServer commonsHttpSolrServer = (CommonsHttpSolrServer) getSolrServer();
+    HttpSolrServer commonsHttpSolrServer = (HttpSolrServer) getSolrServer();
     commonsHttpSolrServer.setRequestWriter(new RequestWriter());
     commonsHttpSolrServer.deleteByQuery( "*:*" ); // delete everything!    
     doIt(commonsHttpSolrServer);
@@ -56,7 +56,7 @@ public class TestBatchUpdate extends Sol
 
   @Test
   public void testWithBinary()throws Exception{
-    CommonsHttpSolrServer commonsHttpSolrServer = (CommonsHttpSolrServer) getSolrServer();
+    HttpSolrServer commonsHttpSolrServer = (HttpSolrServer) getSolrServer();
     commonsHttpSolrServer.setRequestWriter(new BinaryRequestWriter());
     commonsHttpSolrServer.deleteByQuery( "*:*" ); // delete everything!
     doIt(commonsHttpSolrServer);
@@ -64,7 +64,7 @@ public class TestBatchUpdate extends Sol
 
   @Test
   public void testWithBinaryBean()throws Exception{
-    CommonsHttpSolrServer commonsHttpSolrServer = (CommonsHttpSolrServer) getSolrServer();
+    HttpSolrServer commonsHttpSolrServer = (HttpSolrServer) getSolrServer();
     commonsHttpSolrServer.setRequestWriter(new BinaryRequestWriter());
     commonsHttpSolrServer.deleteByQuery( "*:*" ); // delete everything!
     final int[] counter = new int[1];
@@ -100,7 +100,7 @@ public class TestBatchUpdate extends Sol
     String cat;
   }
        
-  private void doIt(CommonsHttpSolrServer commonsHttpSolrServer) throws SolrServerException, IOException {
+  private void doIt(HttpSolrServer commonsHttpSolrServer) throws SolrServerException, IOException {
     final int[] counter = new int[1];
     counter[0] = 0;
     commonsHttpSolrServer.add(new Iterator<SolrInputDocument>() {

Modified: lucene/dev/branches/lucene3930/solr/solrj/src/test/org/apache/solr/client/solrj/TestLBHttpSolrServer.java
URL: http://svn.apache.org/viewvc/lucene/dev/branches/lucene3930/solr/solrj/src/test/org/apache/solr/client/solrj/TestLBHttpSolrServer.java?rev=1307386&r1=1307385&r2=1307386&view=diff
==============================================================================
--- lucene/dev/branches/lucene3930/solr/solrj/src/test/org/apache/solr/client/solrj/TestLBHttpSolrServer.java (original)
+++ lucene/dev/branches/lucene3930/solr/solrj/src/test/org/apache/solr/client/solrj/TestLBHttpSolrServer.java Fri Mar 30 12:41:28 2012
@@ -18,13 +18,13 @@
 package org.apache.solr.client.solrj;
 
 import junit.framework.Assert;
-import org.apache.commons.httpclient.HttpClient;
-import org.apache.commons.httpclient.MultiThreadedHttpConnectionManager;
 import org.apache.commons.io.FileUtils;
+import org.apache.http.impl.client.DefaultHttpClient;
+import org.apache.http.impl.conn.tsccm.ThreadSafeClientConnManager;
 import org.apache.lucene.util.LuceneTestCase;
 import org.apache.solr.SolrTestCaseJ4;
 import org.apache.solr.client.solrj.embedded.JettySolrRunner;
-import org.apache.solr.client.solrj.impl.CommonsHttpSolrServer;
+import org.apache.solr.client.solrj.impl.HttpSolrServer;
 import org.apache.solr.client.solrj.impl.LBHttpSolrServer;
 import org.apache.solr.client.solrj.response.QueryResponse;
 import org.apache.solr.client.solrj.response.UpdateResponse;
@@ -48,7 +48,7 @@ import java.util.Set;
  */
 public class TestLBHttpSolrServer extends LuceneTestCase {
   SolrInstance[] solr = new SolrInstance[3];
-  HttpClient httpClient;
+  DefaultHttpClient httpClient;
 
   // TODO: fix this test to not require FSDirectory
   static String savedFactory;
@@ -69,7 +69,7 @@ public class TestLBHttpSolrServer extend
   @Override
   public void setUp() throws Exception {
     super.setUp();
-    httpClient = new HttpClient(new MultiThreadedHttpConnectionManager());
+    httpClient = new DefaultHttpClient(new ThreadSafeClientConnManager());
 
     httpClient.getParams().setParameter("http.connection.timeout", new Integer(1000));
     for (int i = 0; i < solr.length; i++) {
@@ -88,7 +88,7 @@ public class TestLBHttpSolrServer extend
       doc.addField("name", solrInstance.name);
       docs.add(doc);
     }
-    CommonsHttpSolrServer solrServer = new CommonsHttpSolrServer(solrInstance.getUrl(), httpClient);
+    HttpSolrServer solrServer = new HttpSolrServer(solrInstance.getUrl(), httpClient);
     UpdateResponse resp = solrServer.add(docs);
     assertEquals(0, resp.getStatus());
     resp = solrServer.commit();
@@ -178,7 +178,7 @@ public class TestLBHttpSolrServer extend
     for (int i = 0; i < solr.length; i++) {
       s[i] = solr[i].getUrl();
     }
-    HttpClient myHttpClient = new HttpClient(new MultiThreadedHttpConnectionManager());
+    DefaultHttpClient myHttpClient = new DefaultHttpClient(new ThreadSafeClientConnManager());
 
     myHttpClient.getParams().setParameter("http.connection.timeout", new Integer(250));
     myHttpClient.getParams().setParameter("http.socket.timeout", new Integer(250));

Modified: lucene/dev/branches/lucene3930/solr/solrj/src/test/org/apache/solr/client/solrj/embedded/MultiCoreExampleJettyTest.java
URL: http://svn.apache.org/viewvc/lucene/dev/branches/lucene3930/solr/solrj/src/test/org/apache/solr/client/solrj/embedded/MultiCoreExampleJettyTest.java?rev=1307386&r1=1307385&r2=1307386&view=diff
==============================================================================
--- lucene/dev/branches/lucene3930/solr/solrj/src/test/org/apache/solr/client/solrj/embedded/MultiCoreExampleJettyTest.java (original)
+++ lucene/dev/branches/lucene3930/solr/solrj/src/test/org/apache/solr/client/solrj/embedded/MultiCoreExampleJettyTest.java Fri Mar 30 12:41:28 2012
@@ -17,19 +17,18 @@
 
 package org.apache.solr.client.solrj.embedded;
 
+import org.apache.solr.SolrTestCaseJ4;
 import org.apache.solr.client.solrj.MultiCoreExampleTestBase;
 import org.apache.solr.client.solrj.SolrQuery;
 import org.apache.solr.client.solrj.SolrServer;
-import org.apache.solr.client.solrj.impl.CommonsHttpSolrServer;
+import org.apache.solr.client.solrj.impl.HttpSolrServer;
 import org.apache.solr.client.solrj.request.QueryRequest;
 import org.apache.solr.client.solrj.request.UpdateRequest;
-import org.apache.solr.client.solrj.request.UpdateRequest.ACTION;
-import org.apache.solr.client.solrj.response.QueryResponse;
+import org.apache.solr.client.solrj.request.AbstractUpdateRequest.ACTION;
 import org.apache.solr.common.SolrDocument;
 import org.apache.solr.common.SolrDocumentList;
 import org.apache.solr.common.SolrInputDocument;
 import org.apache.solr.common.params.ShardParams;
-import org.apache.solr.search.SolrIndexSearcher.QueryResult;
 import org.junit.Test;
 
 /**
@@ -96,8 +95,8 @@ public class MultiCoreExampleJettyTest e
     try {
       // setup the server...
       String url = "http://localhost:"+port+context+"/"+name;
-      CommonsHttpSolrServer s = new CommonsHttpSolrServer( url );
-      s.setConnectionTimeout(100); // 1/10th sec
+      HttpSolrServer s = new HttpSolrServer( url );
+      s.setConnectionTimeout(SolrTestCaseJ4.DEFAULT_CONNECTION_TIMEOUT);
       s.setDefaultMaxConnectionsPerHost(100);
       s.setMaxTotalConnections(100);
       return s;
@@ -113,10 +112,10 @@ public class MultiCoreExampleJettyTest e
   public void testDistributed() throws Exception
   {
     UpdateRequest up = new UpdateRequest();
-    up.setAction( ACTION.COMMIT, true, true );
-    up.deleteByQuery( "*:*" );
-    up.process( getSolrCore0() );
-    up.process( getSolrCore1() );
+    up.setAction(ACTION.COMMIT, true, true);
+    up.deleteByQuery("*:*");
+    up.process(getSolrCore0());
+    up.process(getSolrCore1());
     up.clear();
     
     // Add something to each core

Modified: lucene/dev/branches/lucene3930/solr/solrj/src/test/org/apache/solr/client/solrj/embedded/SolrExampleJettyTest.java
URL: http://svn.apache.org/viewvc/lucene/dev/branches/lucene3930/solr/solrj/src/test/org/apache/solr/client/solrj/embedded/SolrExampleJettyTest.java?rev=1307386&r1=1307385&r2=1307386&view=diff
==============================================================================
--- lucene/dev/branches/lucene3930/solr/solrj/src/test/org/apache/solr/client/solrj/embedded/SolrExampleJettyTest.java (original)
+++ lucene/dev/branches/lucene3930/solr/solrj/src/test/org/apache/solr/client/solrj/embedded/SolrExampleJettyTest.java Fri Mar 30 12:41:28 2012
@@ -18,7 +18,7 @@
 package org.apache.solr.client.solrj.embedded;
 
 import org.apache.solr.client.solrj.SolrExampleTests;
-import org.apache.solr.client.solrj.impl.CommonsHttpSolrServer;
+import org.apache.solr.client.solrj.impl.HttpSolrServer;
 import org.apache.solr.util.ExternalPaths;
 import org.junit.Assert;
 import org.junit.BeforeClass;
@@ -43,7 +43,7 @@ public class SolrExampleJettyTest extend
     try {
       // setup the server...
       String url = "http://localhost/?core=xxx";
-      CommonsHttpSolrServer s = new CommonsHttpSolrServer( url );
+      HttpSolrServer s = new HttpSolrServer( url );
       Assert.fail( "CommonsHttpSolrServer should not allow a path with a parameter: "+s.getBaseURL() );
     }
     catch( Exception ex ) {

Modified: lucene/dev/branches/lucene3930/solr/solrj/src/test/org/apache/solr/client/solrj/embedded/SolrExampleStreamingBinaryTest.java
URL: http://svn.apache.org/viewvc/lucene/dev/branches/lucene3930/solr/solrj/src/test/org/apache/solr/client/solrj/embedded/SolrExampleStreamingBinaryTest.java?rev=1307386&r1=1307385&r2=1307386&view=diff
==============================================================================
--- lucene/dev/branches/lucene3930/solr/solrj/src/test/org/apache/solr/client/solrj/embedded/SolrExampleStreamingBinaryTest.java (original)
+++ lucene/dev/branches/lucene3930/solr/solrj/src/test/org/apache/solr/client/solrj/embedded/SolrExampleStreamingBinaryTest.java Fri Mar 30 12:41:28 2012
@@ -21,8 +21,7 @@ import org.apache.solr.client.solrj.Solr
 import org.apache.solr.client.solrj.SolrServer;
 import org.apache.solr.client.solrj.impl.BinaryRequestWriter;
 import org.apache.solr.client.solrj.impl.BinaryResponseParser;
-import org.apache.solr.client.solrj.impl.CommonsHttpSolrServer;
-import org.apache.solr.client.solrj.impl.StreamingUpdateSolrServer;
+import org.apache.solr.client.solrj.impl.ConcurrentUpdateSolrServer;
 import org.apache.solr.util.ExternalPaths;
 import org.junit.BeforeClass;
 
@@ -39,15 +38,12 @@ public class SolrExampleStreamingBinaryT
       // setup the server...
       String url = "http://localhost:"+port+context;
       // smaller queue size hits locks more often
-      CommonsHttpSolrServer s = new StreamingUpdateSolrServer( url, 2, 5 ) {
+      ConcurrentUpdateSolrServer s = new ConcurrentUpdateSolrServer( url, 2, 5 ) {
         @Override
         public void handleError(Throwable ex) {
           ex.printStackTrace();
         }
       };
-      s.setConnectionTimeout(100); // 1/10th sec
-      s.setDefaultMaxConnectionsPerHost(100);
-      s.setMaxTotalConnections(100);
       s.setParser(new BinaryResponseParser());
       s.setRequestWriter(new BinaryRequestWriter());
       return s;

Modified: lucene/dev/branches/lucene3930/solr/solrj/src/test/org/apache/solr/client/solrj/embedded/SolrExampleStreamingTest.java
URL: http://svn.apache.org/viewvc/lucene/dev/branches/lucene3930/solr/solrj/src/test/org/apache/solr/client/solrj/embedded/SolrExampleStreamingTest.java?rev=1307386&r1=1307385&r2=1307386&view=diff
==============================================================================
--- lucene/dev/branches/lucene3930/solr/solrj/src/test/org/apache/solr/client/solrj/embedded/SolrExampleStreamingTest.java (original)
+++ lucene/dev/branches/lucene3930/solr/solrj/src/test/org/apache/solr/client/solrj/embedded/SolrExampleStreamingTest.java Fri Mar 30 12:41:28 2012
@@ -19,8 +19,7 @@ package org.apache.solr.client.solrj.emb
 
 import org.apache.solr.client.solrj.SolrExampleTests;
 import org.apache.solr.client.solrj.SolrServer;
-import org.apache.solr.client.solrj.impl.CommonsHttpSolrServer;
-import org.apache.solr.client.solrj.impl.StreamingUpdateSolrServer;
+import org.apache.solr.client.solrj.impl.ConcurrentUpdateSolrServer;
 import org.apache.solr.util.ExternalPaths;
 import org.junit.BeforeClass;
 
@@ -42,15 +41,13 @@ public class SolrExampleStreamingTest ex
     try {
       // setup the server...
       String url = "http://localhost:"+port+context;       // smaller queue size hits locks more often
-      CommonsHttpSolrServer s = new StreamingUpdateSolrServer( url, 2, 5 ) {
-        @Override
+      ConcurrentUpdateSolrServer s = new ConcurrentUpdateSolrServer( url, 2, 5 ) {
+
+		@Override
         public void handleError(Throwable ex) {
           // do something...    TODO?
         }
       };
-      s.setConnectionTimeout(100); // 1/10th sec
-      s.setDefaultMaxConnectionsPerHost(100);
-      s.setMaxTotalConnections(100);
       return s;
     }
     catch( Exception ex ) {

Modified: lucene/dev/branches/lucene3930/solr/solrj/src/test/org/apache/solr/client/solrj/embedded/TestSolrProperties.java
URL: http://svn.apache.org/viewvc/lucene/dev/branches/lucene3930/solr/solrj/src/test/org/apache/solr/client/solrj/embedded/TestSolrProperties.java?rev=1307386&r1=1307385&r2=1307386&view=diff
==============================================================================
--- lucene/dev/branches/lucene3930/solr/solrj/src/test/org/apache/solr/client/solrj/embedded/TestSolrProperties.java (original)
+++ lucene/dev/branches/lucene3930/solr/solrj/src/test/org/apache/solr/client/solrj/embedded/TestSolrProperties.java Fri Mar 30 12:41:28 2012
@@ -22,10 +22,10 @@ import org.apache.lucene.util.SystemProp
 import org.apache.solr.SolrTestCaseJ4;
 import org.apache.solr.client.solrj.SolrQuery;
 import org.apache.solr.client.solrj.SolrServer;
+import org.apache.solr.client.solrj.request.AbstractUpdateRequest.ACTION;
 import org.apache.solr.client.solrj.request.CoreAdminRequest;
 import org.apache.solr.client.solrj.request.QueryRequest;
 import org.apache.solr.client.solrj.request.UpdateRequest;
-import org.apache.solr.client.solrj.request.UpdateRequest.ACTION;
 import org.apache.solr.client.solrj.response.CoreAdminResponse;
 import org.apache.solr.common.SolrInputDocument;
 import org.apache.solr.common.util.FileUtils;

Modified: lucene/dev/branches/lucene3930/solr/test-framework/src/java/org/apache/solr/BaseDistributedSearchTestCase.java
URL: http://svn.apache.org/viewvc/lucene/dev/branches/lucene3930/solr/test-framework/src/java/org/apache/solr/BaseDistributedSearchTestCase.java?rev=1307386&r1=1307385&r2=1307386&view=diff
==============================================================================
--- lucene/dev/branches/lucene3930/solr/test-framework/src/java/org/apache/solr/BaseDistributedSearchTestCase.java (original)
+++ lucene/dev/branches/lucene3930/solr/test-framework/src/java/org/apache/solr/BaseDistributedSearchTestCase.java Fri Mar 30 12:41:28 2012
@@ -36,7 +36,7 @@ import junit.framework.TestCase;
 import org.apache.solr.client.solrj.SolrServer;
 import org.apache.solr.client.solrj.SolrServerException;
 import org.apache.solr.client.solrj.embedded.JettySolrRunner;
-import org.apache.solr.client.solrj.impl.CommonsHttpSolrServer;
+import org.apache.solr.client.solrj.impl.HttpSolrServer;
 import org.apache.solr.client.solrj.request.UpdateRequest;
 import org.apache.solr.client.solrj.response.QueryResponse;
 import org.apache.solr.client.solrj.response.UpdateResponse;
@@ -230,9 +230,9 @@ public abstract class BaseDistributedSea
 
   protected void destroyServers() throws Exception {
     controlJetty.stop();
-    ((CommonsHttpSolrServer) controlClient).shutdown();
+    ((HttpSolrServer) controlClient).shutdown();
     for (JettySolrRunner jetty : jettys) jetty.stop();
-    for (SolrServer client : clients) ((CommonsHttpSolrServer) client).shutdown();
+    for (SolrServer client : clients) ((HttpSolrServer) client).shutdown();
     clients.clear();
     jettys.clear();
   }
@@ -259,8 +259,8 @@ public abstract class BaseDistributedSea
     try {
       // setup the server...
       String url = "http://localhost:" + port + context;
-      CommonsHttpSolrServer s = new CommonsHttpSolrServer(url);
-      s.setConnectionTimeout(100); // 1/10th sec
+      HttpSolrServer s = new HttpSolrServer(url);
+      s.setConnectionTimeout(DEFAULT_CONNECTION_TIMEOUT);
       s.setDefaultMaxConnectionsPerHost(100);
       s.setMaxTotalConnections(100);
       return s;

Modified: lucene/dev/branches/lucene3930/solr/test-framework/src/java/org/apache/solr/SolrJettyTestBase.java
URL: http://svn.apache.org/viewvc/lucene/dev/branches/lucene3930/solr/test-framework/src/java/org/apache/solr/SolrJettyTestBase.java?rev=1307386&r1=1307385&r2=1307386&view=diff
==============================================================================
--- lucene/dev/branches/lucene3930/solr/test-framework/src/java/org/apache/solr/SolrJettyTestBase.java (original)
+++ lucene/dev/branches/lucene3930/solr/test-framework/src/java/org/apache/solr/SolrJettyTestBase.java Fri Mar 30 12:41:28 2012
@@ -20,7 +20,7 @@ package org.apache.solr;
 import org.apache.solr.client.solrj.SolrServer;
 import org.apache.solr.client.solrj.embedded.EmbeddedSolrServer;
 import org.apache.solr.client.solrj.embedded.JettySolrRunner;
-import org.apache.solr.client.solrj.impl.CommonsHttpSolrServer;
+import org.apache.solr.client.solrj.impl.HttpSolrServer;
 import org.apache.solr.util.ExternalPaths;
 import org.junit.AfterClass;
 
@@ -34,7 +34,7 @@ abstract public class SolrJettyTestBase 
 
   public static JettySolrRunner jetty;
   public static int port;
-  public static SolrServer server;
+  public static SolrServer server = null;
   public static String context;
 
   public static JettySolrRunner createJetty(String solrHome, String configFile, String context) throws Exception {
@@ -87,8 +87,8 @@ abstract public class SolrJettyTestBase 
       try {
         // setup the server...
         String url = "http://localhost:"+port+context;
-        CommonsHttpSolrServer s = new CommonsHttpSolrServer( url );
-        s.setConnectionTimeout(100); // 1/10th sec
+        HttpSolrServer s = new HttpSolrServer( url );
+        s.setConnectionTimeout(DEFAULT_CONNECTION_TIMEOUT);
         s.setDefaultMaxConnectionsPerHost(100);
         s.setMaxTotalConnections(100);
         return s;

Modified: lucene/dev/branches/lucene3930/solr/test-framework/src/java/org/apache/solr/SolrTestCaseJ4.java
URL: http://svn.apache.org/viewvc/lucene/dev/branches/lucene3930/solr/test-framework/src/java/org/apache/solr/SolrTestCaseJ4.java?rev=1307386&r1=1307385&r2=1307386&view=diff
==============================================================================
--- lucene/dev/branches/lucene3930/solr/test-framework/src/java/org/apache/solr/SolrTestCaseJ4.java (original)
+++ lucene/dev/branches/lucene3930/solr/test-framework/src/java/org/apache/solr/SolrTestCaseJ4.java Fri Mar 30 12:41:28 2012
@@ -76,6 +76,8 @@ import org.xml.sax.SAXException;
  *
  */
 public abstract class SolrTestCaseJ4 extends LuceneTestCase {
+  public static int DEFAULT_CONNECTION_TIMEOUT = 500;  // default socket connection timeout in ms
+
 
   @ClassRule
   public static TestRule solrClassRules = 
@@ -235,6 +237,12 @@ public abstract class SolrTestCaseJ4 ext
     SolrException.ignorePatterns.add(pattern);
   }
 
+  public static void unIgnoreException(String pattern) {
+    if (SolrException.ignorePatterns != null)
+      SolrException.ignorePatterns.remove(pattern);
+  }
+
+
   public static void resetExceptionIgnores() {
     SolrException.ignorePatterns = null;
     ignoreException("ignore_exception");  // always ignore "ignore_exception"    

Modified: lucene/dev/branches/lucene3930/solr/testlogging.properties
URL: http://svn.apache.org/viewvc/lucene/dev/branches/lucene3930/solr/testlogging.properties?rev=1307386&r1=1307385&r2=1307386&view=diff
==============================================================================
--- lucene/dev/branches/lucene3930/solr/testlogging.properties (original)
+++ lucene/dev/branches/lucene3930/solr/testlogging.properties Fri Mar 30 12:41:28 2012
@@ -1,7 +1,14 @@
 handlers=java.util.logging.ConsoleHandler
 java.util.logging.ConsoleHandler.level=FINEST
-java.util.logging.ConsoleHandler.formatter=java.util.logging.SimpleFormatter
+#java.util.logging.ConsoleHandler.formatter=java.util.logging.SimpleFormatter
+java.util.logging.ConsoleHandler.formatter=org.apache.solr.SolrLogFormatter
+
 
 .level=SEVERE
-#org.apache.solr.update.UpdateLog.level=FINEST
+#.level=INFO
+
+#org.apache.solr.update.processor.LogUpdateProcessor=FINEST
+#org.apache.solr.update.processor.DistributedUpdateProcessor=FINEST
+#org.apache.solr.update.PeerSync.level=FINEST
+#org.apache.solr.update.UpdateLog.level=FINE
 #org.apache.solr.update.TransactionLog.level=FINEST