You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@lucene.apache.org by Joel Bernstein <jo...@gmail.com> on 2016/10/20 20:29:32 UTC

Test framework security manager

I'm working on a test case for SOLR-9533, which requires writing and
reloading the solrcore.properties file in the instance dir of the test
framework. The test was being added to SolrCoreTest.java.

I'm getting the following error when writing the file:

java.security.AccessControlException: access denied
("java.io.FilePermission"

It makes sense to forbid writing to this directory but for this test case
it seems to be required.

Wondering if anyone has any suggestions for how to deal with this?

Joel Bernstein
http://joelsolr.blogspot.com/

Re: Test framework security manager

Posted by Joel Bernstein <jo...@gmail.com>.
Ok, this makes sense. I'll check to see if SolrCoreTest is doing this, and
I'm somehow getting the wrong instance dir.

Thanks!

Joel Bernstein
http://joelsolr.blogspot.com/

On Thu, Oct 20, 2016 at 4:40 PM, Uwe Schindler <uw...@thetaphi.de> wrote:

> Hi,
>
> On test startup you clone the instance dir. Most tests do this.
>
> Uwe
>
>
> Am 20. Oktober 2016 22:29:32 MESZ schrieb Joel Bernstein <
> joelsolr@gmail.com>:
>>
>> I'm working on a test case for SOLR-9533, which requires writing and
>> reloading the solrcore.properties file in the instance dir of the test
>> framework. The test was being added to SolrCoreTest.java.
>>
>> I'm getting the following error when writing the file:
>>
>> java.security.AccessControlException: access denied
>> ("java.io.FilePermission"
>>
>> It makes sense to forbid writing to this directory but for this test case
>> it seems to be required.
>>
>> Wondering if anyone has any suggestions for how to deal with this?
>>
>> Joel Bernstein
>> http://joelsolr.blogspot.com/
>>
>
> --
> Uwe Schindler
> H.-H.-Meier-Allee 63, 28213 Bremen
> http://www.thetaphi.de
>

Re: Test framework security manager

Posted by Uwe Schindler <uw...@thetaphi.de>.
Hi,

On test startup you clone the instance dir. Most tests do this.

Uwe

Am 20. Oktober 2016 22:29:32 MESZ schrieb Joel Bernstein <jo...@gmail.com>:
>I'm working on a test case for SOLR-9533, which requires writing and
>reloading the solrcore.properties file in the instance dir of the test
>framework. The test was being added to SolrCoreTest.java.
>
>I'm getting the following error when writing the file:
>
>java.security.AccessControlException: access denied
>("java.io.FilePermission"
>
>It makes sense to forbid writing to this directory but for this test
>case
>it seems to be required.
>
>Wondering if anyone has any suggestions for how to deal with this?
>
>Joel Bernstein
>http://joelsolr.blogspot.com/

--
Uwe Schindler
H.-H.-Meier-Allee 63, 28213 Bremen
http://www.thetaphi.de