Author: yonik
Date: Thu Sep 17 16:28:13 2009
New Revision: 816264

URL: http://svn.apache.org/viewvc?rev=816264&view=rev
Log:
fix hangs/fails in test for certain name service configs

Modified:
    
lucene/solr/trunk/src/test/org/apache/solr/client/solrj/SolrExceptionTest.java

Modified: 
lucene/solr/trunk/src/test/org/apache/solr/client/solrj/SolrExceptionTest.java
URL: 
http://svn.apache.org/viewvc/lucene/solr/trunk/src/test/org/apache/solr/client/solrj/SolrExceptionTest.java?rev=816264&r1=816263&r2=816264&view=diff
==============================================================================
--- 
lucene/solr/trunk/src/test/org/apache/solr/client/solrj/SolrExceptionTest.java 
(original)
+++ 
lucene/solr/trunk/src/test/org/apache/solr/client/solrj/SolrExceptionTest.java 
Thu Sep 17 16:28:13 2009
@@ -38,14 +38,17 @@
     // if the compiler won't let you by without the try/catch
     boolean gotExpectedError = false;
     try {
-      SolrServer client = new 
CommonsHttpSolrServer("http://333.333.333.333:8080/solr/";);
+      // switched to a local address to avoid going out on the net, ns lookup 
issues, etc.
+      SolrServer client = new 
CommonsHttpSolrServer("http://localhost:11235/solr/";);
       SolrQuery query = new SolrQuery("test123");
       client.query(query);
     } catch (SolrServerException sse) {
       gotExpectedError = true;
+      /***
       assertTrue(UnknownHostException.class == sse.getRootCause().getClass()
               //If one is using OpenDNS, then you don't get 
UnknownHostException, instead you get back that the query couldn't execute
               || (sse.getRootCause().getClass() == SolrException.class && 
((SolrException) sse.getRootCause()).code() == 302 && 
sse.getMessage().equals("Error executing query")));
+      ***/
     }
     assertTrue(gotExpectedError);
   }


Reply via email to