Robert Munteanu created SLING-5042:
--------------------------------------

             Summary: ResourceResolver.commit() does not call session.save() on 
the backing JCR Session
                 Key: SLING-5042
                 URL: https://issues.apache.org/jira/browse/SLING-5042
             Project: Sling
          Issue Type: Bug
          Components: Testing
    Affects Versions: Testing Sling Mock 1.5.0
            Reporter: Robert Munteanu
            Priority: Minor


The following test snippet passes:

{code:java}
            resourceResolver.delete(content);
            assertTrue(session.hasPendingChanges());
            resourceResolver.adaptTo(Session.class).save();
            assertFalse(session.hasPendingChanges());
{code}

but the following one fails

{code:java}
            resourceResolver.delete(content);
            assertTrue(session.hasPendingChanges());
            resourceResolver.commit();
            assertFalse(session.hasPendingChanges());
{code}

By taking a quick look it seems that {{ResourceResolverContext}} instance of 
the {{ResourceResolverImpl}} does not have any registered providers, so the 
commit() operation is effectively a no-op



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

Reply via email to