I don’t know exactly, one thing could be the case:

Some settings like the dataDir are static variables in the 
TestHarmess/SolrTestCaseJ4. If you run tests before that correctly change the 
data dir, maybe this setting survives – if you run in isolation, dataDir is not 
set. It’s just a guess, maybe it helps!

 

Uwe

 

-----

Uwe Schindler

H.-H.-Meier-Allee 63, D-28213 Bremen

 <http://www.thetaphi.de/> http://www.thetaphi.de

eMail: [email protected]

 

From: Erick Erickson [mailto:[email protected]] 
Sent: Wednesday, March 13, 2013 5:08 PM
To: [email protected]
Subject: Re: Can't seem to run individual tests

 

Uwe:

 

Right, and the whole cloning thing is done in lots of places, I've done it 
myself. But that doesn't explain why this fails:

 

ant -Dtestcase=TestSolrProperties test

 

and this succeeds:

 

ant test

 

even though the "ant test" runs TestSolrProperties. My _guess_ is that somehow 
specifying -Dtestcase=..... is somehow changing where tempDir is.

 

Erick

 

 

 

On Wed, Mar 13, 2013 at 11:56 AM, Uwe Schindler <[email protected]> wrote:

The security manager enforces that no files are created outside of the test’s 
working directory or System.exit() is called (and some other fancy things, like 
listening on the internet instead of 127.0.0.1). When your test tries to create 
a file outside the working directory setup for this test, it fails.

 

It might be caused by a test directly working on a solr core somewhere in 
examples directory and of course then starting to write files there. A test 
must clone the core to its own temp dir and then run the test. Or alternatively 
it must set the dataDir correctly (using getTempDir()).

 

Uwe

 

-----

Uwe Schindler

H.-H.-Meier-Allee 63, D-28213 Bremen

 <http://www.thetaphi.de/> http://www.thetaphi.de

eMail: [email protected]

 

From: Erick Erickson [mailto:[email protected]] 
Sent: Wednesday, March 13, 2013 4:19 PM
To: [email protected]
Subject: Re: Can't seem to run individual tests

 

Dawid:

 

Thanks, another bit of knowledge to add to my store.

 

On Wed, Mar 13, 2013 at 11:00 AM, Dawid Weiss <[email protected]> 
wrote:

> This is a really bogus place to be creating an index, I'm glad it fails...
>
> Of course it succeeds when running in IntelliJ.

I can explain this bit -- it fails from ant only because only from ant
you have Uwe's Evil Security Manager (tm) in place.

D.

---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

 

 

Reply via email to