sling-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Stefan Seifert (JIRA)" <>
Subject [jira] [Reopened] (SLING-7692) MockSession.revert(false) should be supported
Date Thu, 31 May 2018 15:38:00 GMT


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:
>             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

View raw message