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...@apache.org> on 2007/09/19 22:24:01 UTC

Re: svn commit: r577427 - in /lucene/solr/trunk/client/java/solrj/test/org/apache/solr/client/solrj: LargeVolumeTestBase.java embedded/LargeVolumeEmbeddedTest.java embedded/LargeVolumeJettyTest.java

On 9/19/07, ryan@apache.org <ry...@apache.org> wrote:
> SOLR-260 -- adding solrj tests for fast concurrent updates.  With the commited low number for threads and docs, these would not always fail.  But increasing the number takes a long time to run.
>
> I think we should leave it low and let people increase the value for performance testing...  these will fail if something is amiss with concurancy even at low numbers.

+1, that's what I normally do.... try to make the tests run within a
few seconds, and manually crank up the numbers when something changes.

-Yonik

Re: svn commit: r577427 - in /lucene/solr/trunk/client/java/solrj/test/org/apache/solr/client/solrj: LargeVolumeTestBase.java embedded/LargeVolumeEmbeddedTest.java embedded/LargeVolumeJettyTest.java

Posted by Yonik Seeley <yo...@apache.org>.
On 9/19/07, Ryan McKinley <ry...@gmail.com> wrote:
> Yonik Seeley wrote:
> > On 9/19/07, Ryan McKinley <ry...@gmail.com> wrote:
> >> Yonik Seeley wrote:
> >>> ant test from the command line is currently failing.
> >>>
> >>> compileTests:
> >>>     [mkdir] Created dir: F:\code\solr\build\tests
> >>>     [javac] Compiling 66 source files to F:\code\solr\build\tests
> >>>     [javac] F:\code\solr\client\java\solrj\test\org\apache\solr\client\solrj\Lar
> >>> geVolumeTestBase.java:27: package org.junit does not exist
> >>>     [javac] import org.junit.Assert;
> >>>
> >>> -Yonik
> >>>
> >> hymm, must be a different version of JUnit in my classpath.
> >
> > I just checked mine... the one in the ant lib dir is 3.8.1
> >
>
> I've got 4.1, I think they added a whole bit so you can write tests that
> don't extend TestCase.
>
> Does the latest commit work for you?

Yep.

If there are good features in the latest versions that we want to use,
it's probably no big deal to require a later version of junit.

-Yonik

Re: svn commit: r577427 - in /lucene/solr/trunk/client/java/solrj/test/org/apache/solr/client/solrj: LargeVolumeTestBase.java embedded/LargeVolumeEmbeddedTest.java embedded/LargeVolumeJettyTest.java

Posted by Ryan McKinley <ry...@gmail.com>.
Yonik Seeley wrote:
> On 9/19/07, Ryan McKinley <ry...@gmail.com> wrote:
>> Yonik Seeley wrote:
>>> ant test from the command line is currently failing.
>>>
>>> compileTests:
>>>     [mkdir] Created dir: F:\code\solr\build\tests
>>>     [javac] Compiling 66 source files to F:\code\solr\build\tests
>>>     [javac] F:\code\solr\client\java\solrj\test\org\apache\solr\client\solrj\Lar
>>> geVolumeTestBase.java:27: package org.junit does not exist
>>>     [javac] import org.junit.Assert;
>>>
>>> -Yonik
>>>
>> hymm, must be a different version of JUnit in my classpath.
> 
> I just checked mine... the one in the ant lib dir is 3.8.1
> 

I've got 4.1, I think they added a whole bit so you can write tests that 
don't extend TestCase.

Does the latest commit work for you?

ryan

Re: svn commit: r577427 - in /lucene/solr/trunk/client/java/solrj/test/org/apache/solr/client/solrj: LargeVolumeTestBase.java embedded/LargeVolumeEmbeddedTest.java embedded/LargeVolumeJettyTest.java

Posted by Yonik Seeley <yo...@apache.org>.
On 9/19/07, Ryan McKinley <ry...@gmail.com> wrote:
> Yonik Seeley wrote:
> > ant test from the command line is currently failing.
> >
> > compileTests:
> >     [mkdir] Created dir: F:\code\solr\build\tests
> >     [javac] Compiling 66 source files to F:\code\solr\build\tests
> >     [javac] F:\code\solr\client\java\solrj\test\org\apache\solr\client\solrj\Lar
> > geVolumeTestBase.java:27: package org.junit does not exist
> >     [javac] import org.junit.Assert;
> >
> > -Yonik
> >
>
> hymm, must be a different version of JUnit in my classpath.

I just checked mine... the one in the ant lib dir is 3.8.1

-Yonik

Re: svn commit: r577427 - in /lucene/solr/trunk/client/java/solrj/test/org/apache/solr/client/solrj: LargeVolumeTestBase.java embedded/LargeVolumeEmbeddedTest.java embedded/LargeVolumeJettyTest.java

Posted by Will Johnson <wi...@gmail.com>.
> Even if we used a dependency management tool, the junit/ant  
> integration
> still requires that developers have the ant-junit bindings (aka:
> ant-junit.jar) in the class path when the build.xml is parsed.   
> supposedly
> you can explicitly declare the junit tasks with your own taskdef and
> identify the location of the jars yourself) but the jars still have to
> exist when that taskdef is evaluated -- which makes it hard to then  
> pull
> those jars as part of a target.
>
> Everybody i've ever talked to who i felt confident knew more about ant
> then me (with Erik at teh top of the list) has said the same thing:  
> "Put
> junit and ant-junit in your ANT_LIB ... don't even try to do anything
> else, it will just burn you."
>

we do the following:

<path id="junit.classpath">
   <pathelement location="somePathInSVN/junit-4.1.jar" />
</path>

<target name="test" depends="compile, compiletests">
   <junit>
   <classpath>
     <path refid="junit.classpath"/>
     and so on....

it works nicely for all the main targets (compile, test, etc).  i  
also just verified that the same method works in the solr build  
file.  it guarantees that everyone is running the exact same version  
of junit and doesn't require any extra steps for developers to be  
able to build/test code.  there are lots of other ways to do this  
including a custom task def but the above method is pretty  
straightforward and ~vanilla ant.

- will



Re: svn commit: r577427 - in /lucene/solr/trunk/client/java/solrj/test/org/apache/solr/client/solrj: LargeVolumeTestBase.java embedded/LargeVolumeEmbeddedTest.java embedded/LargeVolumeJettyTest.java

Posted by Thorsten Scherler <th...@juntadeandalucia.es>.
On Sun, 2007-09-23 at 22:51 -0700, Chris Hostetter wrote:
> : > I'm not sure which "lib home" you are talking about, but I'm certainly 
> : > open to a patch that allows us to bundle junit we want so new developers 
> : > don't have to get it themselves ... i tried doing this not too long ago 
> : > when i read that <taskdefs> could speficy classpaths for finding the task 
> : > -- it worked great forsome things (like PMD) but i couldn't get it to work 
> : > with ant to save my life.
> : 
> : done
> 
> It's times like this that i wish i could get away with using the 
> expression "Crikey!" without seeming compleltey phoney.
> 
> I was about to point out that all this patch does is include junit, and 
> doesn't solve the problem of the ant-junit.jar ... but then I realized 
> that going back at least as far as and 1.6.2, "ant-junit.jar" is included 
> with the ant release.  When i tried to solve this before, i assume i'd put 
> that ant-junit.jar in my ANT_LIB when i put junit.jar there -- and that to 
> do this right we'd need to bundle ant-junit.jar into solr as well (and 
> that's what i couldn't get to work).
> 
> now i really feel like an idiot.

jeje, do not be so hard on you! 

That is why a healthy community solves many problems very quick.  

salu2
-- 
Thorsten Scherler                                 thorsten.at.apache.org
Open Source Java                      consulting, training and solutions


Re: svn commit: r577427 - in /lucene/solr/trunk/client/java/solrj/test/org/apache/solr/client/solrj: LargeVolumeTestBase.java embedded/LargeVolumeEmbeddedTest.java embedded/LargeVolumeJettyTest.java

Posted by Chris Hostetter <ho...@fucit.org>.
: > I'm not sure which "lib home" you are talking about, but I'm certainly 
: > open to a patch that allows us to bundle junit we want so new developers 
: > don't have to get it themselves ... i tried doing this not too long ago 
: > when i read that <taskdefs> could speficy classpaths for finding the task 
: > -- it worked great forsome things (like PMD) but i couldn't get it to work 
: > with ant to save my life.
: 
: done

It's times like this that i wish i could get away with using the 
expression "Crikey!" without seeming compleltey phoney.

I was about to point out that all this patch does is include junit, and 
doesn't solve the problem of the ant-junit.jar ... but then I realized 
that going back at least as far as and 1.6.2, "ant-junit.jar" is included 
with the ant release.  When i tried to solve this before, i assume i'd put 
that ant-junit.jar in my ANT_LIB when i put junit.jar there -- and that to 
do this right we'd need to bundle ant-junit.jar into solr as well (and 
that's what i couldn't get to work).

now i really feel like an idiot.





-Hoss


Re: svn commit: r577427 - in /lucene/solr/trunk/client/java/solrj/test/org/apache/solr/client/solrj: LargeVolumeTestBase.java embedded/LargeVolumeEmbeddedTest.java embedded/LargeVolumeJettyTest.java

Posted by Thorsten Scherler <th...@juntadeandalucia.es>.
On Thu, 2007-09-20 at 11:11 -0700, Chris Hostetter wrote:
> : You can put it in the lib home and ant will find junit. I have it in my
> : project. 
> 
> : I can submit a patch tomorrow if you want.
> 
> I'm not sure which "lib home" you are talking about, but I'm certainly 
> open to a patch that allows us to bundle junit we want so new developers 
> don't have to get it themselves ... i tried doing this not too long ago 
> when i read that <taskdefs> could speficy classpaths for finding the task 
> -- it worked great forsome things (like PMD) but i couldn't get it to work 
> with ant to save my life.

done

https://issues.apache.org/jira/browse/SOLR-362

salu2

> 
> 
> : I am importing solr build scripts in my project and build it from my
> : project without problem because the junit.jar is in my classpath. As
> : soon I want to build solr directly I can't because the <fail ...> junit
> : check.
> 
> (Note: even if we can't get a patch working that does this, this specific 
> problem is easy to deal with: even if junit isn't in your ANT_LIB, you can 
> always use ant's -lib option to do this too.)
> 
> 
> -Hoss
> 
-- 
Thorsten Scherler                                 thorsten.at.apache.org
Open Source Java                      consulting, training and solutions


Re: svn commit: r577427 - in /lucene/solr/trunk/client/java/solrj/test/org/apache/solr/client/solrj: LargeVolumeTestBase.java embedded/LargeVolumeEmbeddedTest.java embedded/LargeVolumeJettyTest.java

Posted by Chris Hostetter <ho...@fucit.org>.
: You can put it in the lib home and ant will find junit. I have it in my
: project. 

: I can submit a patch tomorrow if you want.

I'm not sure which "lib home" you are talking about, but I'm certainly 
open to a patch that allows us to bundle junit we want so new developers 
don't have to get it themselves ... i tried doing this not too long ago 
when i read that <taskdefs> could speficy classpaths for finding the task 
-- it worked great forsome things (like PMD) but i couldn't get it to work 
with ant to save my life.


: I am importing solr build scripts in my project and build it from my
: project without problem because the junit.jar is in my classpath. As
: soon I want to build solr directly I can't because the <fail ...> junit
: check.

(Note: even if we can't get a patch working that does this, this specific 
problem is easy to deal with: even if junit isn't in your ANT_LIB, you can 
always use ant's -lib option to do this too.)


-Hoss


Re: svn commit: r577427 - in /lucene/solr/trunk/client/java/solrj/test/org/apache/solr/client/solrj: LargeVolumeTestBase.java embedded/LargeVolumeEmbeddedTest.java embedded/LargeVolumeJettyTest.java

Posted by Thorsten Scherler <th...@juntadeandalucia.es>.
On Thu, 2007-09-20 at 11:24 -0400, Erik Hatcher wrote:
> On Sep 19, 2007, at 5:52 PM, Chris Hostetter wrote:
> > Everybody i've ever talked to who i felt confident knew more about ant
> > then me (with Erik at teh top of the list) has said the same thing:  
> > "Put
> > junit and ant-junit in your ANT_LIB ... don't even try to do anything
> > else, it will just burn you."
> 
> I'm not sure if that is still mandatory.  It used to be in the Ant  
> 1.5/.6 days, but I'm a bit out of practice with deep down Ant stuff  
> these days, so consider that advice dated at least and possibly no  
> longer applicable.

It is not!

You can put it in the lib home and ant will find junit. I have it in my
project. 

I am importing solr build scripts in my project and build it from my
project without problem because the junit.jar is in my classpath. As
soon I want to build solr directly I can't because the <fail ...> junit
check.

However one can place the junit lib into the lib dir and add it to the
classpath.

I can submit a patch tomorrow if you want.

> 
> 	Erik
> 
-- 
Thorsten Scherler                                 thorsten.at.apache.org
Open Source Java                      consulting, training and solutions


Re: svn commit: r577427 - in /lucene/solr/trunk/client/java/solrj/test/org/apache/solr/client/solrj: LargeVolumeTestBase.java embedded/LargeVolumeEmbeddedTest.java embedded/LargeVolumeJettyTest.java

Posted by Erik Hatcher <er...@ehatchersolutions.com>.
On Sep 19, 2007, at 5:52 PM, Chris Hostetter wrote:
> Everybody i've ever talked to who i felt confident knew more about ant
> then me (with Erik at teh top of the list) has said the same thing:  
> "Put
> junit and ant-junit in your ANT_LIB ... don't even try to do anything
> else, it will just burn you."

I'm not sure if that is still mandatory.  It used to be in the Ant  
1.5/.6 days, but I'm a bit out of practice with deep down Ant stuff  
these days, so consider that advice dated at least and possibly no  
longer applicable.

	Erik


Re: svn commit: r577427 - in /lucene/solr/trunk/client/java/solrj/test/org/apache/solr/client/solrj: LargeVolumeTestBase.java embedded/LargeVolumeEmbeddedTest.java embedded/LargeVolumeJettyTest.java

Posted by Chris Hostetter <ho...@fucit.org>.
: Perhaps this is an argument for including JUnit or using ivy?
: http://www.nabble.com/Using-ivy-for-dependency-management--tf4396476.html#a12536854

Even if we used a dependency management tool, the junit/ant integration 
still requires that developers have the ant-junit bindings (aka: 
ant-junit.jar) in the class path when the build.xml is parsed.  supposedly 
you can explicitly declare the junit tasks with your own taskdef and 
identify the location of the jars yourself) but the jars still have to 
exist when that taskdef is evaluated -- which makes it hard to then pull 
those jars as part of a target.

Everybody i've ever talked to who i felt confident knew more about ant 
then me (with Erik at teh top of the list) has said the same thing: "Put 
junit and ant-junit in your ANT_LIB ... don't even try to do anything 
else, it will just burn you."



-Hoss


Re: svn commit: r577427 - in /lucene/solr/trunk/client/java/solrj/test/org/apache/solr/client/solrj: LargeVolumeTestBase.java embedded/LargeVolumeEmbeddedTest.java embedded/LargeVolumeJettyTest.java

Posted by Thorsten Scherler <th...@juntadeandalucia.es>.
On Thu, 2007-09-20 at 13:51 -0400, Erik Hatcher wrote:
...
> I'm happy to see contributions both for Ivy and Maven2 based builds  
> of Solr.  I'm sure we can do it in a non-intrusive way to the current  
> Ant build so that folks can try it out.  With a patch and a wiki page  
> with instructions that'd be good enough to get the ball rolling.

done

https://issues.apache.org/jira/browse/SOLR-363

salu2

-- 
Thorsten Scherler                                 thorsten.at.apache.org
Open Source Java                      consulting, training and solutions


Re: svn commit: r577427 - in /lucene/solr/trunk/client/java/solrj/test/org/apache/solr/client/solrj: LargeVolumeTestBase.java embedded/LargeVolumeEmbeddedTest.java embedded/LargeVolumeJettyTest.java

Posted by Erik Hatcher <er...@ehatchersolutions.com>.
On Sep 20, 2007, at 1:51 PM, Erik Hatcher wrote:
>> IMHO ivy rocks and would perfectly overcome this problem without
>> cluttering the build files with jar versions.
>
> I'm happy to see contributions both for Ivy and Maven2 based builds  
> of Solr.  I'm sure we can do it in a non-intrusive way to the  
> current Ant build so that folks can try it out.  With a patch and a  
> wiki page with instructions that'd be good enough to get the ball  
> rolling.

And on that note, eventually I might even whip up a Rakefile suitable  
for running via JRuby.  Anyone tinkering with JRuby out there?   
Pretty slick stuff.  The goldspike JRuby on Rails plugin is  
intriguing - it pulls JARs from Maven repositories, specified in a  
very clean non-XML way.

I'd rather see less XML than more :)

	Erik


Re: svn commit: r577427 - in /lucene/solr/trunk/client/java/solrj/test/org/apache/solr/client/solrj: LargeVolumeTestBase.java embedded/LargeVolumeEmbeddedTest.java embedded/LargeVolumeJettyTest.java

Posted by Erik Hatcher <er...@ehatchersolutions.com>.
On Sep 20, 2007, at 12:13 PM, Thorsten Scherler wrote:
> On Wed, 2007-09-19 at 16:33 -0400, Ryan McKinley wrote:
>> Yonik Seeley wrote:
>>> ant test from the command line is currently failing.
>>>
>>> compileTests:
>>>     [mkdir] Created dir: F:\code\solr\build\tests
>>>     [javac] Compiling 66 source files to F:\code\solr\build\tests
>>>     [javac] F:\code\solr\client\java\solrj\test\org\apache\solr 
>>> \client\solrj\Lar
>>> geVolumeTestBase.java:27: package org.junit does not exist
>>>     [javac] import org.junit.Assert;
>>>
>>> -Yonik
>>>
>>
>> hymm, must be a different version of JUnit in my classpath.
>>
>> I just committed something that does not use the JUnit static
>> references, hopefully that will work for you.
>>
>> Perhaps this is an argument for including JUnit or using ivy?
>> http://www.nabble.com/Using-ivy-for-dependency-management-- 
>> tf4396476.html#a12536854
>>
>
> Like I said if you want I can provide the ivy config files for  
> solr, but
> as I understand the answer from Erik to this proposal that maven2 is
> more likely so I did not asked further.
>
> IMHO ivy rocks and would perfectly overcome this problem without
> cluttering the build files with jar versions.

I'm happy to see contributions both for Ivy and Maven2 based builds  
of Solr.  I'm sure we can do it in a non-intrusive way to the current  
Ant build so that folks can try it out.  With a patch and a wiki page  
with instructions that'd be good enough to get the ball rolling.

	Erik


Re: svn commit: r577427 - in /lucene/solr/trunk/client/java/solrj/test/org/apache/solr/client/solrj: LargeVolumeTestBase.java embedded/LargeVolumeEmbeddedTest.java embedded/LargeVolumeJettyTest.java

Posted by Thorsten Scherler <th...@juntadeandalucia.es>.
On Wed, 2007-09-19 at 16:33 -0400, Ryan McKinley wrote:
> Yonik Seeley wrote:
> > ant test from the command line is currently failing.
> > 
> > compileTests:
> >     [mkdir] Created dir: F:\code\solr\build\tests
> >     [javac] Compiling 66 source files to F:\code\solr\build\tests
> >     [javac] F:\code\solr\client\java\solrj\test\org\apache\solr\client\solrj\Lar
> > geVolumeTestBase.java:27: package org.junit does not exist
> >     [javac] import org.junit.Assert;
> > 
> > -Yonik
> > 
> 
> hymm, must be a different version of JUnit in my classpath.
> 
> I just committed something that does not use the JUnit static 
> references, hopefully that will work for you.
> 
> Perhaps this is an argument for including JUnit or using ivy?
> http://www.nabble.com/Using-ivy-for-dependency-management--tf4396476.html#a12536854
> 

Like I said if you want I can provide the ivy config files for solr, but
as I understand the answer from Erik to this proposal that maven2 is
more likely so I did not asked further.

IMHO ivy rocks and would perfectly overcome this problem without
cluttering the build files with jar versions.

salu2

-- 
Thorsten Scherler                                 thorsten.at.apache.org
Open Source Java                      consulting, training and solutions


Re: svn commit: r577427 - in /lucene/solr/trunk/client/java/solrj/test/org/apache/solr/client/solrj: LargeVolumeTestBase.java embedded/LargeVolumeEmbeddedTest.java embedded/LargeVolumeJettyTest.java

Posted by Ryan McKinley <ry...@gmail.com>.
Yonik Seeley wrote:
> ant test from the command line is currently failing.
> 
> compileTests:
>     [mkdir] Created dir: F:\code\solr\build\tests
>     [javac] Compiling 66 source files to F:\code\solr\build\tests
>     [javac] F:\code\solr\client\java\solrj\test\org\apache\solr\client\solrj\Lar
> geVolumeTestBase.java:27: package org.junit does not exist
>     [javac] import org.junit.Assert;
> 
> -Yonik
> 

hymm, must be a different version of JUnit in my classpath.

I just committed something that does not use the JUnit static 
references, hopefully that will work for you.

Perhaps this is an argument for including JUnit or using ivy?
http://www.nabble.com/Using-ivy-for-dependency-management--tf4396476.html#a12536854

ryan


Re: svn commit: r577427 - in /lucene/solr/trunk/client/java/solrj/test/org/apache/solr/client/solrj: LargeVolumeTestBase.java embedded/LargeVolumeEmbeddedTest.java embedded/LargeVolumeJettyTest.java

Posted by Yonik Seeley <yo...@apache.org>.
ant test from the command line is currently failing.

compileTests:
    [mkdir] Created dir: F:\code\solr\build\tests
    [javac] Compiling 66 source files to F:\code\solr\build\tests
    [javac] F:\code\solr\client\java\solrj\test\org\apache\solr\client\solrj\Lar
geVolumeTestBase.java:27: package org.junit does not exist
    [javac] import org.junit.Assert;

-Yonik