jackrabbit-oak-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Julian Reschke <julian.resc...@gmx.de>
Subject SessionTest.testSaveInvalidStateException vs OAK
Date Wed, 06 Jun 2012 13:20:58 GMT
Hi there,

I was just checking why this test fails.

Test description:

Tries to save a node using {@link javax.jcr.Session#save()} that was
already deleted by an other session.
<p>
Procedure: <ul>
<li>Creates a new node with session 1, saves it, adds a child node.</li>
<li>Access new node with session 2,deletes the node, saves it.</li>
<li>session 1 tries to save modifications .</li> </ul> This should throw
an {@link javax.jcr.InvalidItemStateException}.
<p>
Prerequisites:
<ul> <li><code>javax.jcr.tck.nodetype</code> must accept children
of same
nodetype</li> </ul>

At first glance, this seems to be another case of where the test needs 
to refresh() before saving, because in Oak, the session doesn't 
necessarily have the latest changes.

However, that doesn't seem to fix it.

What seems to happen is that the save() operation happens; but the 
resulting state is that the node that was just modified does not exist 
in the repository.

We need to find out whether this is (a) an OAK bug, (b) a test bug, or 
(c) an expected case of non-compliance.

Best regards, Julian


Mime
View raw message