sling-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Stefan Seifert (JIRA)" <j...@apache.org>
Subject [jira] [Reopened] (SLING-7692) MockSession should support revert(false)
Date Wed, 30 May 2018 15:32:01 GMT

     [ https://issues.apache.org/jira/browse/SLING-7692?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]

Stefan Seifert reopened SLING-7692:
-----------------------------------

sorry, this fix is wrong in my eyes
https://github.com/apache/sling-org-apache-sling-testing-jcr-mock/commit/f9d837c0849d3e4aaae7143facf38cc83a608462

the map "this.items" does not only store the changes since the last save - it contains the
whole repository content. clearing it on refresh erases the whole content of the repository
- which cannot be what is intended.

currently there is no full-fledged session/transaction support in JCR_MOCK, there is just
some new/changed status tracking in the items which is reset whenever "save()" is called -
but it's not possible to roll the changes back because the previous state was not fully saved.

for keeping jcr_mock simple it was not intended to support it up to now - we can change this,
but this would affect much more than the "refresh" method.

> MockSession should support revert(false)
> ----------------------------------------
>
>                 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)

Mime
View raw message