You are viewing a plain text version of this content. The canonical link for it is here.
Posted to solr-dev@lucene.apache.org by Yonik Seeley <yo...@lucidimagination.com> on 2009/09/29 15:53:18 UTC

unit test stability

OK, I think our unit tests are slowly getting in better shape.
They were failing at least 10% of the time, even on my fast box...
after the last fixups committed, I got up to 32 in a row before
failure.

Going forward, it would be nice to keep on top of these a little more,
otherwise the tests become like the little boy who cried wolf.

As to the failure in run#32: here it is.
    <error message="expected:&lt;2009-09-29 07:0[9]&gt; but
was:&lt;2009-09-29 07:0[8]&gt;" type="org.junit.ComparisonFailure"> at
org.apache.solr.handler.dataimport.TestEvaluatorBag.testGetDateFormatEvaluator(TestEvaluatorBag.java:120)
</error>

-Yonik
http://www.lucidimagination.com

Re: unit test stability

Posted by Yonik Seeley <yo...@lucidimagination.com>.
I'm still getting test failures... it seems like Jetty doesn't come up
- even after waiting 2 minutes.  Still not sure if it's a Solr or
Jetty bug.

I also saw an NPE that didn't cause a test failure - looks like a Jetty bug.

SEVERE: handle failed
java.lang.NullPointerException
        at org.mortbay.io.ByteArrayBuffer.readFrom(ByteArrayBuffer.java:168)
        at org.mortbay.io.bio.StreamEndPoint.fill(StreamEndPoint.java:99)
        at org.mortbay.jetty.bio.SocketConnector$Connection.fill(SocketConnector.java:196)
        at org.mortbay.jetty.HttpParser.parseNext(HttpParser.java:281)
        at org.mortbay.jetty.HttpParser.parseAvailable(HttpParser.java:202)
        at org.mortbay.jetty.HttpConnection.handle(HttpConnection.java:378)
        at org.mortbay.jetty.bio.SocketConnector$Connection.run(SocketConnector.java:226)
        at org.mortbay.thread.BoundedThreadPool$PoolThread.run(BoundedThreadPool.java:442)

-Yonik
http://www.lucidimagination.com



On Wed, Sep 30, 2009 at 9:26 AM, Yonik Seeley
<yo...@lucidimagination.com> wrote:
> Getting better and better.
> I had to up the amount of time from 20 sec to 2 min to wait for jetty
> to launch - not sure if there's a bug in jetty or solr that would
> sometimes cause such a long launch time.
>
> The last failure was in TestLBHttpSolrServer (address already in use),
> and I just committed a fix.
> Remember to let Jetty pick the ports! (i.e. pass 0 as the port to jetty runner)
>
> -Yonik
> http://www.lucidimagination.com
>
>
> On Tue, Sep 29, 2009 at 9:53 AM, Yonik Seeley
> <yo...@lucidimagination.com> wrote:
>> OK, I think our unit tests are slowly getting in better shape.
>> They were failing at least 10% of the time, even on my fast box...
>> after the last fixups committed, I got up to 32 in a row before
>> failure.
>>
>> Going forward, it would be nice to keep on top of these a little more,
>> otherwise the tests become like the little boy who cried wolf.
>>
>> As to the failure in run#32: here it is.
>>    <error message="expected:&lt;2009-09-29 07:0[9]&gt; but
>> was:&lt;2009-09-29 07:0[8]&gt;" type="org.junit.ComparisonFailure"> at
>> org.apache.solr.handler.dataimport.TestEvaluatorBag.testGetDateFormatEvaluator(TestEvaluatorBag.java:120)
>> </error>
>>
>> -Yonik
>> http://www.lucidimagination.com
>>
>

Re: unit test stability

Posted by Yonik Seeley <yo...@lucidimagination.com>.
Getting better and better.
I had to up the amount of time from 20 sec to 2 min to wait for jetty
to launch - not sure if there's a bug in jetty or solr that would
sometimes cause such a long launch time.

The last failure was in TestLBHttpSolrServer (address already in use),
and I just committed a fix.
Remember to let Jetty pick the ports! (i.e. pass 0 as the port to jetty runner)

-Yonik
http://www.lucidimagination.com


On Tue, Sep 29, 2009 at 9:53 AM, Yonik Seeley
<yo...@lucidimagination.com> wrote:
> OK, I think our unit tests are slowly getting in better shape.
> They were failing at least 10% of the time, even on my fast box...
> after the last fixups committed, I got up to 32 in a row before
> failure.
>
> Going forward, it would be nice to keep on top of these a little more,
> otherwise the tests become like the little boy who cried wolf.
>
> As to the failure in run#32: here it is.
>    <error message="expected:&lt;2009-09-29 07:0[9]&gt; but
> was:&lt;2009-09-29 07:0[8]&gt;" type="org.junit.ComparisonFailure"> at
> org.apache.solr.handler.dataimport.TestEvaluatorBag.testGetDateFormatEvaluator(TestEvaluatorBag.java:120)
> </error>
>
> -Yonik
> http://www.lucidimagination.com
>

Re: unit test stability

Posted by Shalin Shekhar Mangar <sh...@gmail.com>.
On Tue, Sep 29, 2009 at 7:23 PM, Yonik Seeley <yo...@lucidimagination.com>wrote:

>
> Going forward, it would be nice to keep on top of these a little more,
> otherwise the tests become like the little boy who cried wolf.
>
> As to the failure in run#32: here it is.
>    <error message="expected:&lt;2009-09-29 07:0[9]&gt; but
> was:&lt;2009-09-29 07:0[8]&gt;" type="org.junit.ComparisonFailure"> at
>
> org.apache.solr.handler.dataimport.TestEvaluatorBag.testGetDateFormatEvaluator(TestEvaluatorBag.java:120)
> </error>
>

Thanks for pointing out this one. I've changed it to use a fixed date
instead of new Date() which caused failures.

-- 
Regards,
Shalin Shekhar Mangar.