Re: svn commit: r1022335 - /lucene/dev/trunk/solr/src/test/org/apache/solr/BaseDistributedSearchTestCase.java

classic Classic list List threaded Threaded
5 messages Options
Reply | Threaded
Open this post in threaded view
|

Re: svn commit: r1022335 - /lucene/dev/trunk/solr/src/test/org/apache/solr/BaseDistributedSearchTestCase.java

Robert Muir
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,  <[hidden email]> 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: [hidden email]
For additional commands, e-mail: [hidden email]

Reply | Threaded
Open this post in threaded view
|

Re: svn commit: r1022335 - /lucene/dev/trunk/solr/src/test/org/apache/solr/BaseDistributedSearchTestCase.java

Yonik Seeley-2-2
On Fri, Oct 15, 2010 at 5:21 PM, Robert Muir <[hidden email]> 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: [hidden email]
For additional commands, e-mail: [hidden email]

Reply | Threaded
Open this post in threaded view
|

Re: svn commit: r1022335 - /lucene/dev/trunk/solr/src/test/org/apache/solr/BaseDistributedSearchTestC ase.java

Chris Hostetter-3
In reply to this post by Robert Muir

: 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: [hidden email]
For additional commands, e-mail: [hidden email]

Reply | Threaded
Open this post in threaded view
|

Re: svn commit: r1022335 - /lucene/dev/trunk/solr/src/test/org/apache/solr/BaseDistributedSearchTestC ase.java

Robert Muir
On Fri, Oct 15, 2010 at 5:37 PM, Chris Hostetter
<[hidden email]> 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: [hidden email]
For additional commands, e-mail: [hidden email]

Reply | Threaded
Open this post in threaded view
|

Re: svn commit: r1022335 - /lucene/dev/trunk/solr/src/test/org/apache/solr/BaseDistributedSearchTestCase.java

Robert Muir
In reply to this post by Yonik Seeley-2-2
On Fri, Oct 15, 2010 at 5:34 PM, Yonik Seeley
<[hidden email]> 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: [hidden email]
For additional commands, e-mail: [hidden email]