You are viewing a plain text version of this content. The canonical link for it is here.
Posted to oak-commits@jackrabbit.apache.org by ju...@apache.org on 2013/11/26 22:00:40 UTC
svn commit: r1545833 -
/jackrabbit/oak/trunk/oak-core/src/test/java/org/apache/jackrabbit/oak/security/authorization/evaluation/ShadowInvisibleContentTest.java
Author: jukka
Date: Tue Nov 26 21:00:40 2013
New Revision: 1545833
URL: http://svn.apache.org/r1545833
Log:
OAK-928: Read access is enforced on NEW items
Adjust expectations of the testAddNodeCollidingWithInvisibleNode test
Modified:
jackrabbit/oak/trunk/oak-core/src/test/java/org/apache/jackrabbit/oak/security/authorization/evaluation/ShadowInvisibleContentTest.java
Modified: jackrabbit/oak/trunk/oak-core/src/test/java/org/apache/jackrabbit/oak/security/authorization/evaluation/ShadowInvisibleContentTest.java
URL: http://svn.apache.org/viewvc/jackrabbit/oak/trunk/oak-core/src/test/java/org/apache/jackrabbit/oak/security/authorization/evaluation/ShadowInvisibleContentTest.java?rev=1545833&r1=1545832&r2=1545833&view=diff
==============================================================================
--- jackrabbit/oak/trunk/oak-core/src/test/java/org/apache/jackrabbit/oak/security/authorization/evaluation/ShadowInvisibleContentTest.java (original)
+++ jackrabbit/oak/trunk/oak-core/src/test/java/org/apache/jackrabbit/oak/security/authorization/evaluation/ShadowInvisibleContentTest.java Tue Nov 26 21:00:40 2013
@@ -107,24 +107,27 @@ public class ShadowInvisibleContentTest
assertFalse(a.hasProperty("aProp"));
}
- @Ignore("OAK-869") // FIXME: OAK-869
@Test
public void testAddNodeCollidingWithInvisibleNode() throws Exception {
setupPermission("/a", testPrincipal, true, PrivilegeConstants.JCR_ALL);
setupPermission("/a/b", testPrincipal, false, PrivilegeConstants.JCR_READ);
+ setupPermission("/a/b/c", testPrincipal, true, PrivilegeConstants.JCR_ALL);
Root testRoot = getTestRoot();
Tree a = testRoot.getTree("/a");
assertFalse(a.getChild("b").exists());
+ assertTrue(a.getChild("b").getChild("c").exists());
+
new NodeUtil(a).addChild("b", JcrConstants.NT_UNSTRUCTURED);
+ assertTrue(a.getChild("b").exists());
+ assertFalse(a.getChild("b").getChild("c").exists()); // now shadowed
+
+ // since we have write access, the old content gets replaced
+ testRoot.commit(); // note that also the deny-read ACL gets replaced
- try {
- testRoot.commit();
- fail();
- } catch (CommitFailedException e) {
- assertTrue(e.isConstraintViolation());
- }
+ assertTrue(a.getChild("b").exists());
+ assertFalse(a.getChild("b").getChild("c").exists());
}
}
Re: svn commit: r1545833 - /jackrabbit/oak/trunk/oak-core/src/test/java/org/apache/jackrabbit/oak/security/authorization/evaluation/ShadowInvisibleContentTest.java
Posted by Julian Reschke <ju...@gmx.de>.
On 2013-11-27 16:52, Jukka Zitting wrote:
> Hi,
>
> On Wed, Nov 27, 2013 at 7:49 AM, Julian Reschke <ju...@gmx.de> wrote:
>> On 2013-11-26 22:00, jukka@apache.org wrote:
>>> Adjust expectations of the testAddNodeCollidingWithInvisibleNode test
>>
>> This test now fails somewhat reliably for me.
>
> Hmm, what was your environment? I'll see if I can reproduce the issue.
>
> BR,
>
> Jukka Zitting
It fails reliably with the latest 64bit JDKs (1.6/1.7) on a Win7 machine
(core-i7). it also does with a 32bit JDK on Win7 on an ancient
Quad-Core. It does not seem to fail on my Win7 notebook (core-i7 as well).
I occasionally see other ACL related tests fail, so it seems to be a
timing issue.
Best regards, Julian
Re: svn commit: r1545833 - /jackrabbit/oak/trunk/oak-core/src/test/java/org/apache/jackrabbit/oak/security/authorization/evaluation/ShadowInvisibleContentTest.java
Posted by Jukka Zitting <ju...@zitting.name>.
Hi,
On Wed, Nov 27, 2013 at 7:49 AM, Julian Reschke <ju...@gmx.de> wrote:
> On 2013-11-26 22:00, jukka@apache.org wrote:
>> Adjust expectations of the testAddNodeCollidingWithInvisibleNode test
>
> This test now fails somewhat reliably for me.
Hmm, what was your environment? I'll see if I can reproduce the issue.
BR,
Jukka Zitting
Re: svn commit: r1545833 - /jackrabbit/oak/trunk/oak-core/src/test/java/org/apache/jackrabbit/oak/security/authorization/evaluation/ShadowInvisibleContentTest.java
Posted by Julian Reschke <ju...@gmx.de>.
On 2013-11-26 22:00, jukka@apache.org wrote:
> Author: jukka
> Date: Tue Nov 26 21:00:40 2013
> New Revision: 1545833
>
> URL: http://svn.apache.org/r1545833
> Log:
> OAK-928: Read access is enforced on NEW items
>
> Adjust expectations of the testAddNodeCollidingWithInvisibleNode test
This test now fails somewhat reliably for me.
Best regards, Julian