lucene-solr-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From yo...@apache.org
Subject svn commit: r826277 - /lucene/solr/trunk/src/test/org/apache/solr/client/solrj/TestLBHttpSolrServer.java
Date Sat, 17 Oct 2009 16:20:41 GMT
Author: yonik
Date: Sat Oct 17 16:20:41 2009
New Revision: 826277

URL: http://svn.apache.org/viewvc?rev=826277&view=rev
Log:
try to catch what's causing failures in TestLBHttpSolrServer - fail immediately if we can't
grab the requested port

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

Modified: lucene/solr/trunk/src/test/org/apache/solr/client/solrj/TestLBHttpSolrServer.java
URL: http://svn.apache.org/viewvc/lucene/solr/trunk/src/test/org/apache/solr/client/solrj/TestLBHttpSolrServer.java?rev=826277&r1=826276&r2=826277&view=diff
==============================================================================
--- lucene/solr/trunk/src/test/org/apache/solr/client/solrj/TestLBHttpSolrServer.java (original)
+++ lucene/solr/trunk/src/test/org/apache/solr/client/solrj/TestLBHttpSolrServer.java Sat
Oct 17 16:20:41 2009
@@ -224,7 +224,11 @@
       System.setProperty("solr.solr.home", getHomeDir());
       System.setProperty("solr.data.dir", getDataDir());
       jetty.start();
-      this.port = jetty.getLocalPort();
+      int newPort = jetty.getLocalPort();
+      if (port != 0 && newPort != port) {
+        TestCase.fail("TESTING FAILURE: could not grab requested port.");
+      }
+      this.port = newPort;
 //      System.out.println("waiting.........");
 //      Thread.sleep(5000);
     }



Mime
View raw message