You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@sling.apache.org by "Stefan Seifert (JIRA)" <ji...@apache.org> on 2019/05/21 13:57:00 UTC

[jira] [Commented] (SLING-8428) Add Mixin and nt:linkedFile Support to JCR_OAK

    [ https://issues.apache.org/jira/browse/SLING-8428?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16844859#comment-16844859 ] 

Stefan Seifert commented on SLING-8428:
---------------------------------------

i've created two feature branches with your patches:
https://github.com/apache/sling-org-apache-sling-testing-sling-mock/tree/feature/SLING-8428-mixin-linkedfile
https://github.com/apache/sling-org-apache-sling-testing-sling-mock-oak/tree/feature/SLING-8428-mixin-linkedfile

however when i compile both locally, the unit tests in the sling-mock-oak repo fail:
{noformat}
[INFO] -------------------------------------------------------
[INFO]  T E S T S
[INFO] -------------------------------------------------------
[INFO] Running org.apache.sling.testing.mock.sling.oak.contentimport.ContentLoaderBinaryTest
[INFO] Tests run: 4, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 2.936 s - in org.apache.sling.testing.mock.sling.oak.contentimport.ContentLoaderBinaryTest
[INFO] Running org.apache.sling.testing.mock.sling.oak.contentimport.ContentLoaderJsonDamTest
[ERROR] Tests run: 2, Failures: 1, Errors: 1, Skipped: 0, Time elapsed: 0.305 s <<< FAILURE! - in org.apache.sling.testing.mock.sling.oak.contentimport.ContentLoaderJsonDamTest
[ERROR] testDamAssetMetadata(org.apache.sling.testing.mock.sling.oak.contentimport.ContentLoaderJsonDamTest)  Time elapsed: 0.303 s  <<< ERROR!
java.lang.RuntimeException: Unable to create resource at '/content/dd5f639c-11e2-4c22-839e-6e37cbaa5988/dam/sample/portraits/scott_reynolds.jpg'.
Caused by: org.apache.sling.api.resource.PersistenceException: Value for key jcr:versionHistory can't be put into node: d56a56fa-2a34-487d-b349-53b51033ffc4
Caused by: java.lang.IllegalArgumentException: Value for key jcr:versionHistory can't be put into node: d56a56fa-2a34-487d-b349-53b51033ffc4
Caused by: javax.jcr.nodetype.ConstraintViolationException: No matching property definition: jcr:versionHistory = d56a56fa-2a34-487d-b349-53b51033ffc4

[ERROR] testDamAssetMetadata(org.apache.sling.testing.mock.sling.oak.contentimport.ContentLoaderJsonDamTest)  Time elapsed: 0.303 s  <<< FAILURE!
java.lang.AssertionError

[INFO] Running org.apache.sling.testing.mock.sling.oak.contentimport.ContentLoaderJsonTest
[ERROR] Tests run: 16, Failures: 2, Errors: 0, Skipped: 0, Time elapsed: 3.722 s <<< FAILURE! - in org.apache.sling.testing.mock.sling.oak.contentimport.ContentLoaderJsonTest
[ERROR] testReferenceable(org.apache.sling.testing.mock.sling.oak.contentimport.ContentLoaderJsonTest)  Time elapsed: 0.326 s  <<< FAILURE!
java.lang.AssertionError
        at org.apache.sling.testing.mock.sling.oak.contentimport.ContentLoaderJsonTest.assertMixinNodeType(ContentLoaderJsonTest.java:103)
        at org.apache.sling.testing.mock.sling.oak.contentimport.ContentLoaderJsonTest.testReferenceable(ContentLoaderJsonTest.java:71)

[ERROR] testMixinNodeType(org.apache.sling.testing.mock.sling.oak.contentimport.ContentLoaderJsonTest)  Time elapsed: 0.277 s  <<< FAILURE!
java.lang.AssertionError
        at org.apache.sling.testing.mock.sling.oak.contentimport.ContentLoaderJsonTest.assertMixinNodeType(ContentLoaderJsonTest.java:103)
        at org.apache.sling.testing.mock.sling.oak.contentimport.ContentLoaderJsonTest.testMixinNodeType(ContentLoaderJsonTest.java:63)

[INFO] Running org.apache.sling.testing.mock.sling.oak.resource.JcrNamespaceTest
[INFO] Tests run: 2, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 0.464 s - in org.apache.sling.testing.mock.sling.oak.resource.JcrNamespaceTest
[INFO] Running org.apache.sling.testing.mock.sling.oak.resource.JcrResourceResolverTest
[INFO] Tests run: 4, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 0.593 s - in org.apache.sling.testing.mock.sling.oak.resource.JcrResourceResolverTest
[INFO] Running org.apache.sling.testing.mock.sling.oak.resource.MultipleResourceResolverTest
[INFO] Tests run: 1, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 0.156 s - in org.apache.sling.testing.mock.sling.oak.resource.MultipleResourceResolverTest
[INFO] Running org.apache.sling.testing.mock.sling.oak.resource.SlingCrudResourceResolverTest
[INFO] Tests run: 15, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 2.31 s - in org.apache.sling.testing.mock.sling.oak.resource.SlingCrudResourceResolverTest
[INFO] Running org.apache.sling.testing.mock.sling.oak.resource.UniqueRootTest
[INFO] Tests run: 3, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 0.416 s - in org.apache.sling.testing.mock.sling.oak.resource.UniqueRootTest
[INFO]
[INFO] Results:
[INFO]
[ERROR] Failures:
[ERROR]   ContentLoaderJsonTest.testMixinNodeType:63->assertMixinNodeType:103
[ERROR]   ContentLoaderJsonTest.testReferenceable:71->assertMixinNodeType:103
[ERROR] Errors:
[ERROR] org.apache.sling.testing.mock.sling.oak.contentimport.ContentLoaderJsonDamTest.testDamAssetMetadata(org.apache.sling.testing.mock.sling.oak.contentimport.ContentLoaderJsonDamTest)
[ERROR]   Run 1: ContentLoaderJsonDamTest>AbstractContentLoaderJsonDamTest.setUp:70 ▒ Runtime U...
[ERROR]   Run 2: ContentLoaderJsonDamTest>AbstractContentLoaderJsonDamTest.tearDown:76
[INFO]
[INFO]
[ERROR] Tests run: 46, Failures: 2, Errors: 1, Skipped: 0
{noformat}

[~dominique.jaeggi] do they run on your side?

> Add Mixin and nt:linkedFile Support to JCR_OAK
> ----------------------------------------------
>
>                 Key: SLING-8428
>                 URL: https://issues.apache.org/jira/browse/SLING-8428
>             Project: Sling
>          Issue Type: Improvement
>          Components: Apache Sling Testing Rules
>    Affects Versions: Testing Sling Mock Oak 2.1.4, Testing Sling Mock 2.3.10
>            Reporter: Dominique Jäggi
>            Assignee: Stefan Seifert
>            Priority: Major
>         Attachments: mixin-linkedfile-support-oak-1.patch, mixin-linkedfile-support-oak-2.patch
>
>
> For our AEMContext-based project tests we require loading JSON content in JCR_OAK context including nt:linkedFile and jcr:mixinTypes support. Those features are missing.
> Attached patches add support. Please review and integrate if considered beneficial.
> oak-2 patch pertains to the sling-mock repo.
> oak-1 patch pertains to the sling-mock-oak repo.
> /cc [~sseifert@pro-vision.de]



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)