[
https://issues.apache.org/jira/browse/LUCENE-6238?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14342410#comment-14342410
]
Dawid Weiss commented on LUCENE-6238:
-------------------------------------
This still requires some work because, for example:
{code}
Index:
lucene/core/src/test/org/apache/lucene/util/junitcompat/WithNestedTests.java
===================================================================
---
lucene/core/src/test/org/apache/lucene/util/junitcompat/WithNestedTests.java
(revision 1662995)
+++
lucene/core/src/test/org/apache/lucene/util/junitcompat/WithNestedTests.java
(working copy)
@@ -124,8 +124,8 @@
{
final TestRuleMarkFailure marker = new TestRuleMarkFailure();
rules = RuleChain
- .outerRule(new SystemPropertiesRestoreRule())
- .around(new TestRuleAdapter() {
+ // .outerRule(new SystemPropertiesRestoreRule())
+ .outerRule(new TestRuleAdapter() {
{code}
this isn't a functional equivalent. We need to make sure even those selected
writeable properties aren't propagated from test to test -- this could (and
would) break isolation between classes.
I'm thinking the code to restore r/w properties could be made part of the LTC
(or the setup environment rule), but those "nested" tests still need a
separate snippet of code since they're not running under LTC's control.
I'll look into this.
> minimize tests.policy
> ---------------------
>
> Key: LUCENE-6238
> URL: https://issues.apache.org/jira/browse/LUCENE-6238
> Project: Lucene - Core
> Issue Type: Bug
> Reporter: Robert Muir
> Fix For: Trunk, 5.1
>
> Attachments: LUCENE-6238-mmap.patch, LUCENE-6238.patch,
> LUCENE-6238.patch, LUCENE-6238.patch, LUCENE-6238.patch
>
>
> This is overly permissive:
> {noformat}
> // Basic permissions needed for Lucene to work:
> permission java.util.PropertyPermission "*", "read,write";
> permission java.lang.reflect.ReflectPermission "*";
> permission java.lang.RuntimePermission "*";
> {noformat}
> Because of various BS like unsafe-hacks (only mmap seems to do it properly),
> this means effectively you cannot use lucene with SM today, without allowing
> SM itself to just be disabled with reflection.
> This is easy to fix.
--
This message was sent by Atlassian JIRA
(v6.3.4#6332)
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]