You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@lucene.apache.org by yo...@apache.org on 2010/10/14 02:52:11 UTC
svn commit: r1022335 -
/lucene/dev/trunk/solr/src/test/org/apache/solr/BaseDistributedSearchTestCase.java
Author: yonik
Date: Thu Oct 14 00:52:11 2010
New Revision: 1022335
URL: http://svn.apache.org/viewvc?rev=1022335&view=rev
Log:
fix LB tests for those with ISPs that never fail DNS lookups
Modified:
lucene/dev/trunk/solr/src/test/org/apache/solr/BaseDistributedSearchTestCase.java
Modified: lucene/dev/trunk/solr/src/test/org/apache/solr/BaseDistributedSearchTestCase.java
URL: http://svn.apache.org/viewvc/lucene/dev/trunk/solr/src/test/org/apache/solr/BaseDistributedSearchTestCase.java?rev=1022335&r1=1022334&r2=1022335&view=diff
==============================================================================
--- lucene/dev/trunk/solr/src/test/org/apache/solr/BaseDistributedSearchTestCase.java (original)
+++ lucene/dev/trunk/solr/src/test/org/apache/solr/BaseDistributedSearchTestCase.java Thu Oct 14 00:52:11 2010
@@ -55,7 +55,9 @@ public abstract class BaseDistributedSea
protected String context = "/solr";
protected String shards;
protected String[] shardsArr;
- protected String[] deadServers = {"does_not_exist_54321.com:33331/solr","localhost:33332/solr"};
+ // Some ISPs redirect to their own web site for domains that don't exist, causing this to fail
+ // protected String[] deadServers = {"does_not_exist_54321.com:33331/solr","localhost:33332/solr"};
+ protected String[] deadServers = {"localhost:33332/solr"};
protected File testDir;
protected SolrServer controlClient;
Re: svn commit: r1022335 - /lucene/dev/trunk/solr/src/test/org/apache/solr/BaseDistributedSearchTestC
ase.java
Posted by Robert Muir <rc...@gmail.com>.
On Fri, Oct 15, 2010 at 5:37 PM, Chris Hostetter
<ho...@fucit.org> wrote:
> How should we deal with tests where the entire point of hte code being
> tested is dealing with failure to connect?
>
>
even disregarding the blackhole thing, this way is just wrong. what if
there happens to be a solr on port 33331?
lucene's contrib/remote had similar code, and when it randomly failed
because i had stuff running on the port it picked like that, i rewrote
that crap.
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@lucene.apache.org
For additional commands, e-mail: dev-help@lucene.apache.org
Re: svn commit: r1022335 -
/lucene/dev/trunk/solr/src/test/org/apache/solr/BaseDistributedSearchTestC
ase.java
Posted by Chris Hostetter <ho...@fucit.org>.
: I don't think we should do this.
:
: because the hudson jail has 'tcp blackhole' set, tests should *never*
: depend on connecting to a port not accepting connections and getting
: an RST (it won't happen).
How should we deal with tests where the entire point of hte code being
tested is dealing with failure to connect?
-Hoss
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@lucene.apache.org
For additional commands, e-mail: dev-help@lucene.apache.org
Re: svn commit: r1022335 - /lucene/dev/trunk/solr/src/test/org/apache/solr/BaseDistributedSearchTestCase.java
Posted by Robert Muir <rc...@gmail.com>.
On Fri, Oct 15, 2010 at 5:34 PM, Yonik Seeley
<yo...@lucidimagination.com> wrote:
> Ah bummer.
> But this mirrors the exact real world scenario of a server being down
> (no one listening on the port)... we need to test it somehow.
>
maybe set a custom socketimplfactory for solr tests, that fails for a
specific ip+port combination?
thats how i fixed contrib/remote tests, with a custom rmi socket factory.
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@lucene.apache.org
For additional commands, e-mail: dev-help@lucene.apache.org
Re: svn commit: r1022335 - /lucene/dev/trunk/solr/src/test/org/apache/solr/BaseDistributedSearchTestCase.java
Posted by Yonik Seeley <yo...@lucidimagination.com>.
On Fri, Oct 15, 2010 at 5:21 PM, Robert Muir <rc...@gmail.com> wrote:
> because the hudson jail has 'tcp blackhole' set, tests should *never*
> depend on connecting to a port not accepting connections and getting
> an RST (it won't happen).
>
> Thats why this test takes 5 minutes now on hudson... we should fix
> similar problems in other tests too.
Ah bummer.
But this mirrors the exact real world scenario of a server being down
(no one listening on the port)... we need to test it somehow.
Shouldn't a connect timeout handle this case?
-Yonik
http://www.luicidimagination.com
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@lucene.apache.org
For additional commands, e-mail: dev-help@lucene.apache.org
Re: svn commit: r1022335 - /lucene/dev/trunk/solr/src/test/org/apache/solr/BaseDistributedSearchTestCase.java
Posted by Robert Muir <rc...@gmail.com>.
I don't think we should do this.
because the hudson jail has 'tcp blackhole' set, tests should *never*
depend on connecting to a port not accepting connections and getting
an RST (it won't happen).
Thats why this test takes 5 minutes now on hudson... we should fix
similar problems in other tests too.
On Wed, Oct 13, 2010 at 8:52 PM, <yo...@apache.org> wrote:
> Author: yonik
> Date: Thu Oct 14 00:52:11 2010
> New Revision: 1022335
>
> URL: http://svn.apache.org/viewvc?rev=1022335&view=rev
> Log:
> fix LB tests for those with ISPs that never fail DNS lookups
>
> Modified:
> lucene/dev/trunk/solr/src/test/org/apache/solr/BaseDistributedSearchTestCase.java
>
> Modified: lucene/dev/trunk/solr/src/test/org/apache/solr/BaseDistributedSearchTestCase.java
> URL: http://svn.apache.org/viewvc/lucene/dev/trunk/solr/src/test/org/apache/solr/BaseDistributedSearchTestCase.java?rev=1022335&r1=1022334&r2=1022335&view=diff
> ==============================================================================
> --- lucene/dev/trunk/solr/src/test/org/apache/solr/BaseDistributedSearchTestCase.java (original)
> +++ lucene/dev/trunk/solr/src/test/org/apache/solr/BaseDistributedSearchTestCase.java Thu Oct 14 00:52:11 2010
> @@ -55,7 +55,9 @@ public abstract class BaseDistributedSea
> protected String context = "/solr";
> protected String shards;
> protected String[] shardsArr;
> - protected String[] deadServers = {"does_not_exist_54321.com:33331/solr","localhost:33332/solr"};
> + // Some ISPs redirect to their own web site for domains that don't exist, causing this to fail
> + // protected String[] deadServers = {"does_not_exist_54321.com:33331/solr","localhost:33332/solr"};
> + protected String[] deadServers = {"localhost:33332/solr"};
> protected File testDir;
> protected SolrServer controlClient;
>
>
>
>
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@lucene.apache.org
For additional commands, e-mail: dev-help@lucene.apache.org