[
https://issues.apache.org/jira/browse/SLING-7692?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]
Stefan Seifert reopened SLING-7692:
-----------------------------------
thinking more about it/looking at the solution: not, does not work.
(would be better to do such things no a branch first)
looking more into the code and reminding myself of what i've written years ago:
* jcr-mock has support for multiple sessions (each from a login in
MockRepository)
* there is a shared items map in the MockRepository that is given to all
sessions (but no isolation between them - changes are visible to all sessions
immediately).
* with your logic changes done on the current session a reverted when not
saved, but are still persisted in the other sessions and in the mock repository
itself - making them inconsistent
so the logic is still too simple and i would prefer not having it at all - or
consistent for all sessions which will get be much trickier - because changed
need to be recorded individually (as it is done in resource resolver mock iirc).
> MockSession.revert(false) should be supported
> ---------------------------------------------
>
> Key: SLING-7692
> URL: https://issues.apache.org/jira/browse/SLING-7692
> Project: Sling
> Issue Type: Improvement
> Components: Testing
> Affects Versions: Testing JCR Mock 1.3.2
> Reporter: Nicolas Peltier
> Assignee: Nicolas Peltier
> Priority: Major
> Fix For: Testing JCR Mock 1.3.4
>
>
> MockSession does not cancel the changes when refresh(false) is called, hence
> resolver.revert() not working in case JCR_MOCK is used
--
This message was sent by Atlassian JIRA
(v7.6.3#76005)