You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@sling.apache.org by ro...@apache.org on 2017/11/07 10:22:39 UTC

[sling-org-apache-sling-testing-sling-mock] annotated tag org.apache.sling.testing.sling-mock-1.4.0 created (now d8153bc)

This is an automated email from the ASF dual-hosted git repository.

rombert pushed a change to annotated tag org.apache.sling.testing.sling-mock-1.4.0
in repository https://gitbox.apache.org/repos/asf/sling-org-apache-sling-testing-sling-mock.git.


      at d8153bc  (tag)
 tagging dd00caffe05cdd3210934be14d49275f6a54d571 (commit)
      by Stefan Seifert
      on Wed Jun 24 08:48:55 2015 +0000

- Log -----------------------------------------------------------------
org.apache.sling.testing.sling-mock-1.4.0
-----------------------------------------------------------------------

This annotated tag includes the following new commits:

     new 2aa4712  SLING-4042 Donate sling-mock, jcr-mock, osgi-mock implementation
     new d63d89c  svn:ignore
     new a6e7c1a  SLING-4042 move all mock projects to mocks/ subdirectory
     new d1f839a  SLING-4042 add missing package-info files
     new e9e968a  SLING-4042 per default no charencoding should be set in mock response
     new 43eb350  SLING-4042 do not forget to register ResourceResolverFactory in OSGi context as well
     new 3d36daf  SLING-4042 make sure JCR mock supports accessing data using multiple sessions
     new 4fc4baf  SLING-4042 add README files
     new 4aa90b9  add/update SCM urls
     new 22c8024  update to released versions
     new 1ba5459  [maven-release-plugin] prepare release org.apache.sling.testing.sling-mock-1.0.0
     new 5dcb3d7  [maven-release-plugin] prepare for next development iteration
     new 5b0b3fe  update dependencies in release process to next snapshot version
     new 1f52235  SLING-4085 NPE when using SlingContext rule without constructor argument
     new 9442dd8  SLING-4086 SlingHttpServlerRequest should support getResourceBundle() methods
     new 2f5faf4  set to released version now available on maven central
     new 6964d49  SLING-4090 Define package versions for Sling Mock, JCR Mock, OSGi Mock
     new 448fe45  SLING-4108 JCR/Sling/ResourceResolver Mock: Support providing authentication info
     new 5b4c01c  fix some javadoc errors and warnings
     new cb5f237  SLING-4162 Introduce "OsgiContext" junit rule for OSGi and OsgiContextImpl
     new e72ad4b  SLING-4229 add test cases for deep path access support in sling-mock as well
     new a07abf8  SLING-4108 default to getAdministrativeResourceResolver in sling-mock to support jackrabbit resource resolver adapter as well
     new 3cbedc6  fix some javadoc errors/warnings
     new 47cc45e  update to released versions
     new fccd947  [maven-release-plugin] prepare release org.apache.sling.testing.sling-mock-1.1.0
     new 4b72ed2  [maven-release-plugin] prepare for next development iteration
     new 85cdaa4  update to next snapshot version until releases available in maven central
     new 2de8a96  SLING-4266 - SlingContext always uses the default resourceResolverType
     new 0a167f6  SLING-4268 - ContentLoader should not try to import ACLs
     new 9ee66c6  SLING-4269 - SlingContextImpl's resource resolver should be an administrative one
     new 6f6321b  switch back to released versions for dependencies
     new a969262  SLING-4267 add some more property names to be ignored on import because they are managed by JCR internally
     new 62e7e2a  SLING-4267 support importing nt:resource noded in jackrabbit with empty binary data enable content loader unit tests in sling-mock-jackrabbit
     new 6569ce2  assertions can be activated now after updating to latest mock dependencies
     new b816e47  SLING-4267 support importing nt:resource nodes in jackrabbit with empty binary data
     new 32c3978  update dependencies to released versions
     new c05aeae  [maven-release-plugin] prepare release org.apache.sling.testing.sling-mock-1.1.2
     new e57b7e1  [maven-release-plugin] prepare for next development iteration
     new d9fcb59  update to next development snapshot unit released artifacts are in maven central
     new c0e8f71  switch back to released versions now available in maven central
     new e8d2807  SLING-4362 make sure JCR namespaces are correctly registered in JCR mock on initialization through sling mock
     new 90ddb94  SLING-4376 ResourceResolver.resolve(null) should resolve to root resource
     new c49b0e1  SLING-4394 Sling Mock with JCR-based Resource Resolver: Support default search paths
     new 5e1c2d6  SLING-848 Support getting versioned resources by using uri path parameters
     new 4e72c06  Use the recent resourceresolver SNAPSHOT in sling-mock
     new eb9da99  SLING-848 revert updating sling api/resource resolver/jcr resource dependenciens - using sling mock in a project should not enforce using the latest version of those keep adding of getThreadResourceResolver() method, but throw UnsupportedOperationException
     new 2259bfe  SLING-4431 Sling Mocks: Remove Dependency on ResourceResolverInjector
     new 74de88f  cosmetic code formatting changes
     new 9e35c02  SLING-4434 refactor integration with sling models: remove MockModelAdapterFactory and directly integrate the original ModelAdapterFactory using the new osgi mock dynamic service reference feature
     new 71bbb5c  SLING-4437 MockJcrResourceResolverFactory should allow to register services dynamically
     new fc5346f  SLING-4433 use real AdapterManagerImpl implementation with support for ADAPTER_CLASSES/ADAPTABLE_CLASSES
     new a4d3ac9  SLING-4433 remove dependency to org.apache.sling.adapter and inline helper classes instead
     new 58f81ee  update to release versions
     new ac35a62  update package version
     new 29e7fda  [maven-release-plugin] prepare release org.apache.sling.testing.sling-mock-1.2.0
     new f96f34a  [maven-release-plugin] prepare for next development iteration
     new 93110e5  remove service description and vendor for this mock service - makes problems with baseline check
     new f187b33  remove service description and vendor for this mock service - makes problems with baseline check
     new 1b68139  update to next development snapshot unit released artifacts are in maven central
     new 53be964  switch to released versions
     new 34954fa  SLING-4522 Sling Mocks: ContentLoader fails for UTF8 encoded json files on Windows Systems
     new 75d379a  Fix scr xml parsing when updating to new scr plugin by using fix for SLING-4670
     new b0f4a0a  SLING-4698 - Set parent.relativePath to empty for all modules
     new 28f1b00  SLING-4654 Support ResourceResolver.findResources with JCR_MOCK
     new 6728203  SLING-4721 sling-mock: Fully support ResourceResolverFactoryActivator for jcr-mock
     new 8a9b3c4  SLING-4729 Sling Mock: Add "NONE" resource resolver type
     new 5d2ffa2  SLING-4470 introduce separate "logging-mock" project for default log configuration in mock tests, remove compile-dependency on slf4j-simple
     new 192936d  update dependencies for release
     new ab204bb  update dependencies for release
     new 5482f51  [maven-release-plugin] prepare release org.apache.sling.testing.sling-mock-1.3.0
     new 7baf341  [maven-release-plugin] prepare for next development iteration
     new 9a0fa2b  update to next development snapshot unit released artifacts are in maven central
     new bb58061  SLING-4605 - Add support for an Oak resource resolver type mock
     new 3601bfd  Mocks: use latest snapshots
     new b6207fb  SLING-4605 - Add support for an Oak resource resolver type mock
     new bac4c7f  update to released mock versions
     new 37c868a  SLING-4756 add support for filtering via felix.framework FilterImpl implementation
     new 546986a  SLING-4605 javadoc updates and add initializing for ContextResourceResolverFactory
     new 6e3e339  Minor wording fixes when the ResourceResolverTypeAdapter can't be found.
     new f4c6d5d  SLING-4775 - MockSlingSettingService shoud support getSlingId()
     new 7a57b01  SLING-4775 move the now supported method out of the "unsupported operations" block
     new e0cc675  SLING-4773 ensure sling namespace is always registered when using JCR_MOCK resource resolver adapter
     new d39a8a6  update to released versions
     new 54d3fe0  [maven-release-plugin] prepare release org.apache.sling.testing.sling-mock-1.4.0
     new dd00caf  [maven-release-plugin]  copy for tag org.apache.sling.testing.sling-mock-1.4.0

The 85 revisions listed above as "new" are entirely new to this
repository and will be described in separate emails.  The revisions
listed as "add" were already present in the repository and have only
been added to this reference.


-- 
To stop receiving notification emails like this one, please contact
['"commits@sling.apache.org" <co...@sling.apache.org>'].

[sling-org-apache-sling-testing-sling-mock] 03/15: SLING-4605 - Add support for an Oak resource resolver type mock

Posted by ro...@apache.org.
This is an automated email from the ASF dual-hosted git repository.

rombert pushed a commit to annotated tag org.apache.sling.testing.sling-mock-1.4.0
in repository https://gitbox.apache.org/repos/asf/sling-org-apache-sling-testing-sling-mock.git

commit bb580619ab05a6dc71290c1a75a24f4640cebe62
Author: Robert Munteanu <ro...@apache.org>
AuthorDate: Wed May 27 11:42:35 2015 +0000

    SLING-4605 - Add support for an Oak resource resolver type mock
    
    Initial revision of the sling-mock-oak module
    
    git-svn-id: https://svn.apache.org/repos/asf/sling/trunk/testing/mocks/sling-mock@1681992 13f79535-47bb-0310-9956-ffa450edef68
---
 .../sling/testing/mock/sling/ResourceResolverType.java     | 14 ++++++++++++++
 .../org/apache/sling/testing/mock/sling/package-info.java  |  2 +-
 .../resource/AbstractSlingCrudResourceResolverTest.java    |  6 ++++--
 3 files changed, 19 insertions(+), 3 deletions(-)

diff --git a/src/main/java/org/apache/sling/testing/mock/sling/ResourceResolverType.java b/src/main/java/org/apache/sling/testing/mock/sling/ResourceResolverType.java
index f1550e5..29ba5cb 100644
--- a/src/main/java/org/apache/sling/testing/mock/sling/ResourceResolverType.java
+++ b/src/main/java/org/apache/sling/testing/mock/sling/ResourceResolverType.java
@@ -66,6 +66,20 @@ public enum ResourceResolverType {
      */
     JCR_JACKRABBIT("org.apache.sling.testing.mock.sling.jackrabbit.JackrabbitMockResourceResolverAdapter",
             "org.apache.sling:org.apache.sling.testing.sling-mock-jackrabbit"),
+
+    /**
+     * Uses a real JCR Jackrabbit Oak repository.
+     * <ul>
+     * <li>Uses the real Sling Resource Resolver and JCR Resource mapping
+     * implementation.</li>
+     * <li>The JCR repository is started on first access, this may take some
+     * seconds.</li>
+     * <li>Beware: The repository is not cleared for each unit test, so make
+     * sure us use a unique node path for each unit test.</li>
+     * </ul>
+     */
+    JCR_OAK("org.apache.sling.testing.mock.sling.oak.OakMockResourceResolverAdapter",
+            "org.apache.sling:org.apache.sling.testing.sling-mock-jackrabbit-oak"),
             
     /**
      * Provides resource resolver environment without any ResourceProvider.
diff --git a/src/main/java/org/apache/sling/testing/mock/sling/package-info.java b/src/main/java/org/apache/sling/testing/mock/sling/package-info.java
index 0d89d03..41f438c 100644
--- a/src/main/java/org/apache/sling/testing/mock/sling/package-info.java
+++ b/src/main/java/org/apache/sling/testing/mock/sling/package-info.java
@@ -19,5 +19,5 @@
 /**
  * Mock implementation of selected Sling APIs.
  */
-@aQute.bnd.annotation.Version("1.3")
+@aQute.bnd.annotation.Version("1.4")
 package org.apache.sling.testing.mock.sling;
diff --git a/src/test/java/org/apache/sling/testing/mock/sling/resource/AbstractSlingCrudResourceResolverTest.java b/src/test/java/org/apache/sling/testing/mock/sling/resource/AbstractSlingCrudResourceResolverTest.java
index 572cf6c..a3d2411 100644
--- a/src/test/java/org/apache/sling/testing/mock/sling/resource/AbstractSlingCrudResourceResolverTest.java
+++ b/src/test/java/org/apache/sling/testing/mock/sling/resource/AbstractSlingCrudResourceResolverTest.java
@@ -161,7 +161,8 @@ public abstract class AbstractSlingCrudResourceResolverTest {
         // TODO: enable this test when JCR resource implementation supports
         // writing Date objects (SLING-3846)
         if (getResourceResolverType() != ResourceResolverType.JCR_MOCK
-                && getResourceResolverType() != ResourceResolverType.JCR_JACKRABBIT) {
+                && getResourceResolverType() != ResourceResolverType.JCR_JACKRABBIT 
+                && getResourceResolverType() != ResourceResolverType.JCR_OAK ) {
             assertEquals(DATE_VALUE, props.get("dateProp", Date.class));
         }
     }
@@ -173,7 +174,8 @@ public abstract class AbstractSlingCrudResourceResolverTest {
         // TODO: enable this test when JCR resource implementation supports
         // writing Date objects (SLING-3846)
         if (getResourceResolverType() != ResourceResolverType.JCR_MOCK
-                && getResourceResolverType() != ResourceResolverType.JCR_JACKRABBIT) {
+                && getResourceResolverType() != ResourceResolverType.JCR_JACKRABBIT
+                && getResourceResolverType() != ResourceResolverType.JCR_OAK ) {
             Calendar calendarValue = props.get("dateProp", Calendar.class);
             assertNotNull(calendarValue);
             assertEquals(DATE_VALUE, calendarValue.getTime());

-- 
To stop receiving notification emails like this one, please contact
"commits@sling.apache.org" <co...@sling.apache.org>.

[sling-org-apache-sling-testing-sling-mock] 07/15: SLING-4756 add support for filtering via felix.framework FilterImpl implementation

Posted by ro...@apache.org.
This is an automated email from the ASF dual-hosted git repository.

rombert pushed a commit to annotated tag org.apache.sling.testing.sling-mock-1.4.0
in repository https://gitbox.apache.org/repos/asf/sling-org-apache-sling-testing-sling-mock.git

commit 37c868a1b929bfa696031563f26afef0b6fff92f
Author: Stefan Seifert <ss...@apache.org>
AuthorDate: Mon Jun 1 20:53:35 2015 +0000

    SLING-4756 add support for filtering via felix.framework FilterImpl implementation
    
    git-svn-id: https://svn.apache.org/repos/asf/sling/trunk/testing/mocks/sling-mock@1683002 13f79535-47bb-0310-9956-ffa450edef68
---
 pom.xml | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/pom.xml b/pom.xml
index 0a418fa..c768e96 100644
--- a/pom.xml
+++ b/pom.xml
@@ -49,7 +49,7 @@
         <dependency>
             <groupId>org.apache.sling</groupId>
             <artifactId>org.apache.sling.testing.osgi-mock</artifactId>
-            <version>1.3.0</version>
+            <version>1.3.1-SNAPSHOT</version>
             <scope>compile</scope>
         </dependency>
         <dependency>

-- 
To stop receiving notification emails like this one, please contact
"commits@sling.apache.org" <co...@sling.apache.org>.

[sling-org-apache-sling-testing-sling-mock] 14/15: [maven-release-plugin] prepare release org.apache.sling.testing.sling-mock-1.4.0

Posted by ro...@apache.org.
This is an automated email from the ASF dual-hosted git repository.

rombert pushed a commit to annotated tag org.apache.sling.testing.sling-mock-1.4.0
in repository https://gitbox.apache.org/repos/asf/sling-org-apache-sling-testing-sling-mock.git

commit 54d3fe0007ff1108bc8894592f5c94335636fdab
Author: Stefan Seifert <ss...@apache.org>
AuthorDate: Wed Jun 24 08:48:46 2015 +0000

    [maven-release-plugin] prepare release org.apache.sling.testing.sling-mock-1.4.0
    
    git-svn-id: https://svn.apache.org/repos/asf/sling/trunk/testing/mocks/sling-mock@1687206 13f79535-47bb-0310-9956-ffa450edef68
---
 pom.xml | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/pom.xml b/pom.xml
index 4583da3..4fadecc 100644
--- a/pom.xml
+++ b/pom.xml
@@ -28,7 +28,7 @@
     </parent>
 
     <artifactId>org.apache.sling.testing.sling-mock</artifactId>
-    <version>1.3.1-SNAPSHOT</version>
+    <version>1.4.0</version>
     <packaging>bundle</packaging>
 
     <name>Apache Sling Testing Sling Mock</name>
@@ -39,9 +39,9 @@
     </properties>
 
     <scm>
-        <connection>scm:svn:http://svn.apache.org/repos/asf/sling/trunk/testing/mocks/sling-mock</connection>
-        <developerConnection>scm:svn:https://svn.apache.org/repos/asf/sling/trunk/testing/mocks/sling-mock</developerConnection>
-        <url>http://svn.apache.org/viewvc/sling/trunk/testing/mocks/sling-mock</url>
+        <connection>scm:svn:http://svn.apache.org/repos/asf/sling/tags/org.apache.sling.testing.sling-mock-1.4.0</connection>
+        <developerConnection>scm:svn:https://svn.apache.org/repos/asf/sling/tags/org.apache.sling.testing.sling-mock-1.4.0</developerConnection>
+        <url>http://svn.apache.org/viewvc/sling/tags/org.apache.sling.testing.sling-mock-1.4.0</url>
     </scm>
 
     <dependencies>

-- 
To stop receiving notification emails like this one, please contact
"commits@sling.apache.org" <co...@sling.apache.org>.

[sling-org-apache-sling-testing-sling-mock] 15/15: [maven-release-plugin] copy for tag org.apache.sling.testing.sling-mock-1.4.0

Posted by ro...@apache.org.
This is an automated email from the ASF dual-hosted git repository.

rombert pushed a commit to annotated tag org.apache.sling.testing.sling-mock-1.4.0
in repository https://gitbox.apache.org/repos/asf/sling-org-apache-sling-testing-sling-mock.git

commit dd00caffe05cdd3210934be14d49275f6a54d571
Author: Stefan Seifert <ss...@apache.org>
AuthorDate: Wed Jun 24 08:48:55 2015 +0000

    [maven-release-plugin]  copy for tag org.apache.sling.testing.sling-mock-1.4.0
    
    git-svn-id: https://svn.apache.org/repos/asf/sling/tags/org.apache.sling.testing.sling-mock-1.4.0@1687207 13f79535-47bb-0310-9956-ffa450edef68

-- 
To stop receiving notification emails like this one, please contact
"commits@sling.apache.org" <co...@sling.apache.org>.

[sling-org-apache-sling-testing-sling-mock] 04/15: Mocks: use latest snapshots

Posted by ro...@apache.org.
This is an automated email from the ASF dual-hosted git repository.

rombert pushed a commit to annotated tag org.apache.sling.testing.sling-mock-1.4.0
in repository https://gitbox.apache.org/repos/asf/sling-org-apache-sling-testing-sling-mock.git

commit 3601bfde485ce0cd9bbfa7c91e00f2c051e3c129
Author: Robert Munteanu <ro...@apache.org>
AuthorDate: Wed May 27 13:26:03 2015 +0000

    Mocks: use latest snapshots
    
    git-svn-id: https://svn.apache.org/repos/asf/sling/trunk/testing/mocks/sling-mock@1682015 13f79535-47bb-0310-9956-ffa450edef68
---
 pom.xml | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/pom.xml b/pom.xml
index b103585..b8dc6b1 100644
--- a/pom.xml
+++ b/pom.xml
@@ -49,7 +49,7 @@
         <dependency>
             <groupId>org.apache.sling</groupId>
             <artifactId>org.apache.sling.testing.osgi-mock</artifactId>
-            <version>1.2.1-SNAPSHOT</version>
+            <version>1.3.1-SNAPSHOT</version>
             <scope>compile</scope>
         </dependency>
         <dependency>

-- 
To stop receiving notification emails like this one, please contact
"commits@sling.apache.org" <co...@sling.apache.org>.

[sling-org-apache-sling-testing-sling-mock] 01/15: [maven-release-plugin] prepare for next development iteration

Posted by ro...@apache.org.
This is an automated email from the ASF dual-hosted git repository.

rombert pushed a commit to annotated tag org.apache.sling.testing.sling-mock-1.4.0
in repository https://gitbox.apache.org/repos/asf/sling-org-apache-sling-testing-sling-mock.git

commit 7baf3415d6b75e421b9c87038668d66e2841354a
Author: Stefan Seifert <ss...@apache.org>
AuthorDate: Fri May 22 19:27:54 2015 +0000

    [maven-release-plugin] prepare for next development iteration
    
    git-svn-id: https://svn.apache.org/repos/asf/sling/trunk/testing/mocks/sling-mock@1681210 13f79535-47bb-0310-9956-ffa450edef68
---
 pom.xml | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/pom.xml b/pom.xml
index 3075b5f..0a418fa 100644
--- a/pom.xml
+++ b/pom.xml
@@ -28,7 +28,7 @@
     </parent>
 
     <artifactId>org.apache.sling.testing.sling-mock</artifactId>
-    <version>1.3.0</version>
+    <version>1.3.1-SNAPSHOT</version>
     <packaging>bundle</packaging>
 
     <name>Apache Sling Testing Sling Mock</name>
@@ -39,9 +39,9 @@
     </properties>
 
     <scm>
-        <connection>scm:svn:http://svn.apache.org/repos/asf/sling/tags/org.apache.sling.testing.sling-mock-1.3.0</connection>
-        <developerConnection>scm:svn:https://svn.apache.org/repos/asf/sling/tags/org.apache.sling.testing.sling-mock-1.3.0</developerConnection>
-        <url>http://svn.apache.org/viewvc/sling/tags/org.apache.sling.testing.sling-mock-1.3.0</url>
+        <connection>scm:svn:http://svn.apache.org/repos/asf/sling/trunk/testing/mocks/sling-mock</connection>
+        <developerConnection>scm:svn:https://svn.apache.org/repos/asf/sling/trunk/testing/mocks/sling-mock</developerConnection>
+        <url>http://svn.apache.org/viewvc/sling/trunk/testing/mocks/sling-mock</url>
     </scm>
 
     <dependencies>

-- 
To stop receiving notification emails like this one, please contact
"commits@sling.apache.org" <co...@sling.apache.org>.

[sling-org-apache-sling-testing-sling-mock] 05/15: SLING-4605 - Add support for an Oak resource resolver type mock

Posted by ro...@apache.org.
This is an automated email from the ASF dual-hosted git repository.

rombert pushed a commit to annotated tag org.apache.sling.testing.sling-mock-1.4.0
in repository https://gitbox.apache.org/repos/asf/sling-org-apache-sling-testing-sling-mock.git

commit b6207fba59125cb073dbfc004c61ebce2d106d00
Author: Robert Munteanu <ro...@apache.org>
AuthorDate: Wed May 27 15:08:30 2015 +0000

    SLING-4605 - Add support for an Oak resource resolver type mock
    
    Indicate that the MemoryNodeStore is used for the Oak resource resolver
    adapter
    
    git-svn-id: https://svn.apache.org/repos/asf/sling/trunk/testing/mocks/sling-mock@1682055 13f79535-47bb-0310-9956-ffa450edef68
---
 .../java/org/apache/sling/testing/mock/sling/ResourceResolverType.java  | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/src/main/java/org/apache/sling/testing/mock/sling/ResourceResolverType.java b/src/main/java/org/apache/sling/testing/mock/sling/ResourceResolverType.java
index 29ba5cb..8d98a29 100644
--- a/src/main/java/org/apache/sling/testing/mock/sling/ResourceResolverType.java
+++ b/src/main/java/org/apache/sling/testing/mock/sling/ResourceResolverType.java
@@ -74,6 +74,8 @@ public enum ResourceResolverType {
      * implementation.</li>
      * <li>The JCR repository is started on first access, this may take some
      * seconds.</li>
+     * <li>The <tt>MemoryNodeStore</tt> implementation is used, with no 
+     * customisations</li>
      * <li>Beware: The repository is not cleared for each unit test, so make
      * sure us use a unique node path for each unit test.</li>
      * </ul>

-- 
To stop receiving notification emails like this one, please contact
"commits@sling.apache.org" <co...@sling.apache.org>.

[sling-org-apache-sling-testing-sling-mock] 13/15: update to released versions

Posted by ro...@apache.org.
This is an automated email from the ASF dual-hosted git repository.

rombert pushed a commit to annotated tag org.apache.sling.testing.sling-mock-1.4.0
in repository https://gitbox.apache.org/repos/asf/sling-org-apache-sling-testing-sling-mock.git

commit d39a8a6b238be4018c752a71f40ac58b2baded85
Author: Stefan Seifert <ss...@apache.org>
AuthorDate: Wed Jun 24 08:47:59 2015 +0000

    update to released versions
    
    git-svn-id: https://svn.apache.org/repos/asf/sling/trunk/testing/mocks/sling-mock@1687205 13f79535-47bb-0310-9956-ffa450edef68
---
 pom.xml | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/pom.xml b/pom.xml
index 33fa653..4583da3 100644
--- a/pom.xml
+++ b/pom.xml
@@ -49,13 +49,13 @@
         <dependency>
             <groupId>org.apache.sling</groupId>
             <artifactId>org.apache.sling.testing.osgi-mock</artifactId>
-            <version>1.3.1-SNAPSHOT</version>
+            <version>1.4.0</version>
             <scope>compile</scope>
         </dependency>
         <dependency>
             <groupId>org.apache.sling</groupId>
             <artifactId>org.apache.sling.testing.jcr-mock</artifactId>
-            <version>1.1.7-SNAPSHOT</version>
+            <version>1.1.8</version>
             <scope>compile</scope>
         </dependency>
         <dependency>

-- 
To stop receiving notification emails like this one, please contact
"commits@sling.apache.org" <co...@sling.apache.org>.

[sling-org-apache-sling-testing-sling-mock] 09/15: Minor wording fixes when the ResourceResolverTypeAdapter can't be found.

Posted by ro...@apache.org.
This is an automated email from the ASF dual-hosted git repository.

rombert pushed a commit to annotated tag org.apache.sling.testing.sling-mock-1.4.0
in repository https://gitbox.apache.org/repos/asf/sling-org-apache-sling-testing-sling-mock.git

commit 6e3e339bdfcacf7d708a1c10fa6833915ec8f9aa
Author: Robert Munteanu <ro...@apache.org>
AuthorDate: Thu Jun 4 06:40:32 2015 +0000

    Minor wording fixes when the ResourceResolverTypeAdapter can't be found.
    
    git-svn-id: https://svn.apache.org/repos/asf/sling/trunk/testing/mocks/sling-mock@1683468 13f79535-47bb-0310-9956-ffa450edef68
---
 src/main/java/org/apache/sling/testing/mock/sling/MockSling.java | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/src/main/java/org/apache/sling/testing/mock/sling/MockSling.java b/src/main/java/org/apache/sling/testing/mock/sling/MockSling.java
index cc60cdd..dcdebcb 100644
--- a/src/main/java/org/apache/sling/testing/mock/sling/MockSling.java
+++ b/src/main/java/org/apache/sling/testing/mock/sling/MockSling.java
@@ -90,19 +90,19 @@ public final class MockSling {
         catch (ClassNotFoundException ex) {
             throw new RuntimeException("Unable to instantiate resourcer resolver: "
                     + type.getResourceResolverTypeAdapterClass()
-                    + (type.getArtifactCoordinates() != null ? "Make sure this maven dependency is included: "
+                    + (type.getArtifactCoordinates() != null ? ". Make sure this maven dependency is included: "
                             + type.getArtifactCoordinates() : ""), ex);
         }
         catch (InstantiationException ex) {
             throw new RuntimeException("Unable to instantiate resourcer resolver: "
                     + type.getResourceResolverTypeAdapterClass()
-                    + (type.getArtifactCoordinates() != null ? "Make sure this maven dependency is included: "
+                    + (type.getArtifactCoordinates() != null ? ". Make sure this maven dependency is included: "
                             + type.getArtifactCoordinates() : ""), ex);
         }
         catch (IllegalAccessException ex) {
             throw new RuntimeException("Unable to instantiate resourcer resolver: "
                     + type.getResourceResolverTypeAdapterClass()
-                    + (type.getArtifactCoordinates() != null ? "Make sure this maven dependency is included: "
+                    + (type.getArtifactCoordinates() != null ? ". Make sure this maven dependency is included: "
                             + type.getArtifactCoordinates() : ""), ex);
         }
     }

-- 
To stop receiving notification emails like this one, please contact
"commits@sling.apache.org" <co...@sling.apache.org>.

[sling-org-apache-sling-testing-sling-mock] 11/15: SLING-4775 move the now supported method out of the "unsupported operations" block

Posted by ro...@apache.org.
This is an automated email from the ASF dual-hosted git repository.

rombert pushed a commit to annotated tag org.apache.sling.testing.sling-mock-1.4.0
in repository https://gitbox.apache.org/repos/asf/sling-org-apache-sling-testing-sling-mock.git

commit 7a57b018edbb6263bbb0fd776377c968eeff184f
Author: Stefan Seifert <ss...@apache.org>
AuthorDate: Thu Jun 11 14:21:17 2015 +0000

    SLING-4775 move the now supported method out of the "unsupported operations" block
    
    git-svn-id: https://svn.apache.org/repos/asf/sling/trunk/testing/mocks/sling-mock@1684899 13f79535-47bb-0310-9956-ffa450edef68
---
 .../testing/mock/sling/services/MockSlingSettingService.java   | 10 +++++-----
 1 file changed, 5 insertions(+), 5 deletions(-)

diff --git a/src/main/java/org/apache/sling/testing/mock/sling/services/MockSlingSettingService.java b/src/main/java/org/apache/sling/testing/mock/sling/services/MockSlingSettingService.java
index 26fac00..e665609 100644
--- a/src/main/java/org/apache/sling/testing/mock/sling/services/MockSlingSettingService.java
+++ b/src/main/java/org/apache/sling/testing/mock/sling/services/MockSlingSettingService.java
@@ -59,15 +59,15 @@ public final class MockSlingSettingService implements SlingSettingsService {
         this.runModes = runModes;
     }
 
-    // --- unsupported operations ---
     @Override
-    public String getAbsolutePathWithinSlingHome(String relativePath) {
-        throw new UnsupportedOperationException();
+    public String getSlingId() {
+        return slingId;
     }
 
+    // --- unsupported operations ---
     @Override
-    public String getSlingId() {
-        return slingId;
+    public String getAbsolutePathWithinSlingHome(String relativePath) {
+        throw new UnsupportedOperationException();
     }
 
     @Override

-- 
To stop receiving notification emails like this one, please contact
"commits@sling.apache.org" <co...@sling.apache.org>.

[sling-org-apache-sling-testing-sling-mock] 06/15: update to released mock versions

Posted by ro...@apache.org.
This is an automated email from the ASF dual-hosted git repository.

rombert pushed a commit to annotated tag org.apache.sling.testing.sling-mock-1.4.0
in repository https://gitbox.apache.org/repos/asf/sling-org-apache-sling-testing-sling-mock.git

commit bac4c7f8c5ee78af1f1e7609975b1e8f363ab7f7
Author: Stefan Seifert <ss...@apache.org>
AuthorDate: Sat May 30 10:03:55 2015 +0000

    update to released mock versions
    
    git-svn-id: https://svn.apache.org/repos/asf/sling/trunk/testing/mocks/sling-mock@1682594 13f79535-47bb-0310-9956-ffa450edef68
---
 pom.xml | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/pom.xml b/pom.xml
index b8dc6b1..0a418fa 100644
--- a/pom.xml
+++ b/pom.xml
@@ -49,19 +49,19 @@
         <dependency>
             <groupId>org.apache.sling</groupId>
             <artifactId>org.apache.sling.testing.osgi-mock</artifactId>
-            <version>1.3.1-SNAPSHOT</version>
+            <version>1.3.0</version>
             <scope>compile</scope>
         </dependency>
         <dependency>
             <groupId>org.apache.sling</groupId>
             <artifactId>org.apache.sling.testing.jcr-mock</artifactId>
-            <version>1.1.5-SNAPSHOT</version>
+            <version>1.1.6</version>
             <scope>compile</scope>
         </dependency>
         <dependency>
             <groupId>org.apache.sling</groupId>
             <artifactId>org.apache.sling.testing.resourceresolver-mock</artifactId>
-            <version>1.1.5-SNAPSHOT</version>
+            <version>1.1.6</version>
             <scope>compile</scope>
         </dependency>
 
@@ -205,7 +205,7 @@
         <dependency>
             <groupId>org.apache.sling</groupId>
             <artifactId>org.apache.sling.testing.logging-mock</artifactId>
-            <version>1.0.0-SNAPSHOT</version>
+            <version>1.0.0</version>
             <scope>test</scope>
         </dependency>
 

-- 
To stop receiving notification emails like this one, please contact
"commits@sling.apache.org" <co...@sling.apache.org>.

[sling-org-apache-sling-testing-sling-mock] 02/15: update to next development snapshot unit released artifacts are in maven central

Posted by ro...@apache.org.
This is an automated email from the ASF dual-hosted git repository.

rombert pushed a commit to annotated tag org.apache.sling.testing.sling-mock-1.4.0
in repository https://gitbox.apache.org/repos/asf/sling-org-apache-sling-testing-sling-mock.git

commit 9a0fa2b6c29594a19e59ed6b53acc69c653fcdb8
Author: Stefan Seifert <ss...@apache.org>
AuthorDate: Fri May 22 19:36:31 2015 +0000

    update to next development snapshot unit released artifacts are in maven central
    
    git-svn-id: https://svn.apache.org/repos/asf/sling/trunk/testing/mocks/sling-mock@1681214 13f79535-47bb-0310-9956-ffa450edef68
---
 pom.xml | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/pom.xml b/pom.xml
index 0a418fa..b103585 100644
--- a/pom.xml
+++ b/pom.xml
@@ -49,19 +49,19 @@
         <dependency>
             <groupId>org.apache.sling</groupId>
             <artifactId>org.apache.sling.testing.osgi-mock</artifactId>
-            <version>1.3.0</version>
+            <version>1.2.1-SNAPSHOT</version>
             <scope>compile</scope>
         </dependency>
         <dependency>
             <groupId>org.apache.sling</groupId>
             <artifactId>org.apache.sling.testing.jcr-mock</artifactId>
-            <version>1.1.6</version>
+            <version>1.1.5-SNAPSHOT</version>
             <scope>compile</scope>
         </dependency>
         <dependency>
             <groupId>org.apache.sling</groupId>
             <artifactId>org.apache.sling.testing.resourceresolver-mock</artifactId>
-            <version>1.1.6</version>
+            <version>1.1.5-SNAPSHOT</version>
             <scope>compile</scope>
         </dependency>
 
@@ -205,7 +205,7 @@
         <dependency>
             <groupId>org.apache.sling</groupId>
             <artifactId>org.apache.sling.testing.logging-mock</artifactId>
-            <version>1.0.0</version>
+            <version>1.0.0-SNAPSHOT</version>
             <scope>test</scope>
         </dependency>
 

-- 
To stop receiving notification emails like this one, please contact
"commits@sling.apache.org" <co...@sling.apache.org>.

[sling-org-apache-sling-testing-sling-mock] 08/15: SLING-4605 javadoc updates and add initializing for ContextResourceResolverFactory

Posted by ro...@apache.org.
This is an automated email from the ASF dual-hosted git repository.

rombert pushed a commit to annotated tag org.apache.sling.testing.sling-mock-1.4.0
in repository https://gitbox.apache.org/repos/asf/sling-org-apache-sling-testing-sling-mock.git

commit 546986afa3c0d1ed252df0c54bc9d27ba1d3e53a
Author: Stefan Seifert <ss...@apache.org>
AuthorDate: Mon Jun 1 21:05:16 2015 +0000

    SLING-4605 javadoc updates and add initializing for ContextResourceResolverFactory
    
    git-svn-id: https://svn.apache.org/repos/asf/sling/trunk/testing/mocks/sling-mock@1683004 13f79535-47bb-0310-9956-ffa450edef68
---
 .../org/apache/sling/testing/mock/sling/ResourceResolverType.java  | 4 +---
 .../testing/mock/sling/context/ContextResourceResolverFactory.java | 7 +++++++
 2 files changed, 8 insertions(+), 3 deletions(-)

diff --git a/src/main/java/org/apache/sling/testing/mock/sling/ResourceResolverType.java b/src/main/java/org/apache/sling/testing/mock/sling/ResourceResolverType.java
index 8d98a29..a32f86e 100644
--- a/src/main/java/org/apache/sling/testing/mock/sling/ResourceResolverType.java
+++ b/src/main/java/org/apache/sling/testing/mock/sling/ResourceResolverType.java
@@ -75,9 +75,7 @@ public enum ResourceResolverType {
      * <li>The JCR repository is started on first access, this may take some
      * seconds.</li>
      * <li>The <tt>MemoryNodeStore</tt> implementation is used, with no 
-     * customisations</li>
-     * <li>Beware: The repository is not cleared for each unit test, so make
-     * sure us use a unique node path for each unit test.</li>
+     * customizations.</li>
      * </ul>
      */
     JCR_OAK("org.apache.sling.testing.mock.sling.oak.OakMockResourceResolverAdapter",
diff --git a/src/main/java/org/apache/sling/testing/mock/sling/context/ContextResourceResolverFactory.java b/src/main/java/org/apache/sling/testing/mock/sling/context/ContextResourceResolverFactory.java
index d895d1a..b8ba839 100644
--- a/src/main/java/org/apache/sling/testing/mock/sling/context/ContextResourceResolverFactory.java
+++ b/src/main/java/org/apache/sling/testing/mock/sling/context/ContextResourceResolverFactory.java
@@ -54,6 +54,9 @@ final class ContextResourceResolverFactory {
             case JCR_JACKRABBIT:
                 initializeJcrJackrabbit(factory);
                 break;
+            case JCR_OAK:
+                initializeJcrOak(factory);
+                break;
             case RESOURCERESOLVER_MOCK:
                 initializeResourceResolverMock(factory);
                 break;
@@ -83,6 +86,10 @@ final class ContextResourceResolverFactory {
         // register sling node types?
     }
 
+    private static void initializeJcrOak(ResourceResolverFactory factory) {
+        // register sling node types?
+    }
+
     private static void initializeResourceResolverMock(ResourceResolverFactory factory) {
         // nothing to do
     }

-- 
To stop receiving notification emails like this one, please contact
"commits@sling.apache.org" <co...@sling.apache.org>.

[sling-org-apache-sling-testing-sling-mock] 10/15: SLING-4775 - MockSlingSettingService shoud support getSlingId()

Posted by ro...@apache.org.
This is an automated email from the ASF dual-hosted git repository.

rombert pushed a commit to annotated tag org.apache.sling.testing.sling-mock-1.4.0
in repository https://gitbox.apache.org/repos/asf/sling-org-apache-sling-testing-sling-mock.git

commit f4c6d5dc127979cf38e89c64bcb0cc51c9c25094
Author: Robert Munteanu <ro...@apache.org>
AuthorDate: Thu Jun 4 06:50:12 2015 +0000

    SLING-4775 - MockSlingSettingService shoud support getSlingId()
    
    git-svn-id: https://svn.apache.org/repos/asf/sling/trunk/testing/mocks/sling-mock@1683470 13f79535-47bb-0310-9956-ffa450edef68
---
 .../sling/testing/mock/sling/services/MockSlingSettingService.java | 5 ++++-
 .../testing/mock/sling/services/MockSlingSettingServiceTest.java   | 7 +++++++
 2 files changed, 11 insertions(+), 1 deletion(-)

diff --git a/src/main/java/org/apache/sling/testing/mock/sling/services/MockSlingSettingService.java b/src/main/java/org/apache/sling/testing/mock/sling/services/MockSlingSettingService.java
index 671b812..26fac00 100644
--- a/src/main/java/org/apache/sling/testing/mock/sling/services/MockSlingSettingService.java
+++ b/src/main/java/org/apache/sling/testing/mock/sling/services/MockSlingSettingService.java
@@ -20,6 +20,7 @@ package org.apache.sling.testing.mock.sling.services;
 
 import java.net.URL;
 import java.util.Set;
+import java.util.UUID;
 
 import org.apache.sling.settings.SlingSettingsService;
 
@@ -31,6 +32,7 @@ import com.google.common.collect.ImmutableSet;
 public final class MockSlingSettingService implements SlingSettingsService {
 
     private Set<String> runModes;
+    private String slingId;
 
     /**
      * Instantiate with no default run modes.
@@ -45,6 +47,7 @@ public final class MockSlingSettingService implements SlingSettingsService {
      */
     public MockSlingSettingService(Set<String> defaultRunModes) {
         this.runModes = defaultRunModes;
+        this.slingId = UUID.randomUUID().toString();
     }
 
     @Override
@@ -64,7 +67,7 @@ public final class MockSlingSettingService implements SlingSettingsService {
 
     @Override
     public String getSlingId() {
-        throw new UnsupportedOperationException();
+        return slingId;
     }
 
     @Override
diff --git a/src/test/java/org/apache/sling/testing/mock/sling/services/MockSlingSettingServiceTest.java b/src/test/java/org/apache/sling/testing/mock/sling/services/MockSlingSettingServiceTest.java
index 10f0088..4a96b95 100644
--- a/src/test/java/org/apache/sling/testing/mock/sling/services/MockSlingSettingServiceTest.java
+++ b/src/test/java/org/apache/sling/testing/mock/sling/services/MockSlingSettingServiceTest.java
@@ -18,7 +18,9 @@
  */
 package org.apache.sling.testing.mock.sling.services;
 
+import static org.hamcrest.CoreMatchers.notNullValue;
 import static org.junit.Assert.assertEquals;
+import static org.junit.Assert.assertThat;
 import static org.junit.Assert.assertTrue;
 
 import java.util.Set;
@@ -50,4 +52,9 @@ public class MockSlingSettingServiceTest {
         assertEquals(newRunModes, underTest.getRunModes());
     }
 
+    @Test
+    public void slingId() {
+        assertThat(new MockSlingSettingService().getSlingId(), notNullValue());
+    }
+
 }

-- 
To stop receiving notification emails like this one, please contact
"commits@sling.apache.org" <co...@sling.apache.org>.

[sling-org-apache-sling-testing-sling-mock] 12/15: SLING-4773 ensure sling namespace is always registered when using JCR_MOCK resource resolver adapter

Posted by ro...@apache.org.
This is an automated email from the ASF dual-hosted git repository.

rombert pushed a commit to annotated tag org.apache.sling.testing.sling-mock-1.4.0
in repository https://gitbox.apache.org/repos/asf/sling-org-apache-sling-testing-sling-mock.git

commit e0cc675e008838db69f71ce1223c1c39e1927684
Author: Stefan Seifert <ss...@apache.org>
AuthorDate: Thu Jun 11 15:38:32 2015 +0000

    SLING-4773 ensure sling namespace is always registered when using JCR_MOCK resource resolver adapter
    
    git-svn-id: https://svn.apache.org/repos/asf/sling/trunk/testing/mocks/sling-mock@1684924 13f79535-47bb-0310-9956-ffa450edef68
---
 pom.xml                                                    |  2 +-
 .../testing/mock/sling/MockJcrResourceResolverAdapter.java | 14 ++++++++++++++
 .../mock/sling/context/ContextResourceResolverFactory.java | 10 +---------
 .../mock/sling/resource/AbstractJcrNamespaceTest.java      |  4 ++--
 .../sling/resource/AbstractJcrResourceResolverTest.java    | 13 ++++++++++++-
 5 files changed, 30 insertions(+), 13 deletions(-)

diff --git a/pom.xml b/pom.xml
index c768e96..33fa653 100644
--- a/pom.xml
+++ b/pom.xml
@@ -55,7 +55,7 @@
         <dependency>
             <groupId>org.apache.sling</groupId>
             <artifactId>org.apache.sling.testing.jcr-mock</artifactId>
-            <version>1.1.6</version>
+            <version>1.1.7-SNAPSHOT</version>
             <scope>compile</scope>
         </dependency>
         <dependency>
diff --git a/src/main/java/org/apache/sling/testing/mock/sling/MockJcrResourceResolverAdapter.java b/src/main/java/org/apache/sling/testing/mock/sling/MockJcrResourceResolverAdapter.java
index 87705b6..4ec0f72 100644
--- a/src/main/java/org/apache/sling/testing/mock/sling/MockJcrResourceResolverAdapter.java
+++ b/src/main/java/org/apache/sling/testing/mock/sling/MockJcrResourceResolverAdapter.java
@@ -18,7 +18,10 @@
  */
 package org.apache.sling.testing.mock.sling;
 
+import javax.jcr.NamespaceRegistry;
 import javax.jcr.Repository;
+import javax.jcr.RepositoryException;
+import javax.jcr.Session;
 
 import org.apache.sling.api.resource.ResourceResolverFactory;
 import org.apache.sling.jcr.api.SlingRepository;
@@ -38,6 +41,17 @@ class MockJcrResourceResolverAdapter implements ResourceResolverTypeAdapter {
     @Override
     public SlingRepository newSlingRepository() {
         Repository repository = MockJcr.newRepository();
+        
+        try {
+            Session session = repository.login();
+            NamespaceRegistry namespaceRegistry = session.getWorkspace().getNamespaceRegistry();
+            namespaceRegistry.registerNamespace("sling", "http://sling.apache.org/jcr/sling/1.0");
+            session.logout();
+        }
+        catch (RepositoryException ex) {
+            throw new RuntimeException("Unable to register namespaces in JCR Mock repository.", ex);
+        }
+        
         return new MockSlingRepository(repository);
     }
 
diff --git a/src/main/java/org/apache/sling/testing/mock/sling/context/ContextResourceResolverFactory.java b/src/main/java/org/apache/sling/testing/mock/sling/context/ContextResourceResolverFactory.java
index b8ba839..0b12486 100644
--- a/src/main/java/org/apache/sling/testing/mock/sling/context/ContextResourceResolverFactory.java
+++ b/src/main/java/org/apache/sling/testing/mock/sling/context/ContextResourceResolverFactory.java
@@ -18,12 +18,9 @@
  */
 package org.apache.sling.testing.mock.sling.context;
 
-import javax.jcr.NamespaceRegistry;
 import javax.jcr.RepositoryException;
-import javax.jcr.Session;
 
 import org.apache.sling.api.resource.LoginException;
-import org.apache.sling.api.resource.ResourceResolver;
 import org.apache.sling.api.resource.ResourceResolverFactory;
 import org.apache.sling.testing.mock.sling.MockSling;
 import org.apache.sling.testing.mock.sling.ResourceResolverType;
@@ -74,12 +71,7 @@ final class ContextResourceResolverFactory {
     }
 
     private static void initializeJcrMock(ResourceResolverFactory factory) throws RepositoryException, LoginException {
-        // register default namespaces
-        ResourceResolver resolver = factory.getResourceResolver(null);
-        Session session = resolver.adaptTo(Session.class);
-        NamespaceRegistry namespaceRegistry = session.getWorkspace().getNamespaceRegistry();
-        namespaceRegistry.registerNamespace("sling", "http://sling.apache.org/jcr/sling/1.0");
-        resolver.close();
+        // nothing to do
     }
 
     private static void initializeJcrJackrabbit(ResourceResolverFactory factory) {
diff --git a/src/test/java/org/apache/sling/testing/mock/sling/resource/AbstractJcrNamespaceTest.java b/src/test/java/org/apache/sling/testing/mock/sling/resource/AbstractJcrNamespaceTest.java
index f7acd25..297073d 100644
--- a/src/test/java/org/apache/sling/testing/mock/sling/resource/AbstractJcrNamespaceTest.java
+++ b/src/test/java/org/apache/sling/testing/mock/sling/resource/AbstractJcrNamespaceTest.java
@@ -74,8 +74,8 @@ public abstract class AbstractJcrNamespaceTest {
         ValueMap props = ResourceUtil.getValueMap(resource);
         assertEquals("fooType", props.get("sling:resourceType"));
         
-        // without proper sling namespace definition it is expected that the JCR resource implementation cannot detect the resource type properly
-        assertEquals("nt:unstructured", resource.getResourceType());
+        // since SLING-4773 sling namespace is readly registered in the MockJcrResourceResolverAdapter, so this will still work here
+        assertEquals("fooType", resource.getResourceType());
     }
 
     @Test
diff --git a/src/test/java/org/apache/sling/testing/mock/sling/resource/AbstractJcrResourceResolverTest.java b/src/test/java/org/apache/sling/testing/mock/sling/resource/AbstractJcrResourceResolverTest.java
index f17f6d6..c5867f6 100644
--- a/src/test/java/org/apache/sling/testing/mock/sling/resource/AbstractJcrResourceResolverTest.java
+++ b/src/test/java/org/apache/sling/testing/mock/sling/resource/AbstractJcrResourceResolverTest.java
@@ -155,7 +155,7 @@ public abstract class AbstractJcrResourceResolverTest {
     }
 
     @Test
-    public void testCreateNodeType() throws RepositoryException, PersistenceException {
+    public void testCreateNodeWithPrimaryType() throws RepositoryException, PersistenceException {
         Resource parent = resourceResolver.getResource(getTestRootNode().getPath());
 
         Resource child = resourceResolver.create(parent, "nodeTypeResource", ImmutableMap.<String, Object> builder()
@@ -164,5 +164,16 @@ public abstract class AbstractJcrResourceResolverTest {
         assertEquals(JcrConstants.NT_UNSTRUCTURED, child.getResourceType());
         assertEquals(JcrConstants.NT_UNSTRUCTURED, child.adaptTo(Node.class).getPrimaryNodeType().getName());
     }
+    
+    @Test
+    public void testCreateNodeWithResourceType() throws RepositoryException, PersistenceException {
+        Resource parent = resourceResolver.getResource(getTestRootNode().getPath());
+
+        Resource child = ResourceUtil.getOrCreateResource(resourceResolver, parent.getPath() + "/intermediate/child",
+                "sling/resource/type", JcrConstants.NT_UNSTRUCTURED, true);
+        assertNotNull(child);
+        assertEquals(JcrConstants.NT_UNSTRUCTURED, parent.getResourceType());
+        assertEquals("sling/resource/type", child.getResourceType());
+    }
 
 }

-- 
To stop receiving notification emails like this one, please contact
"commits@sling.apache.org" <co...@sling.apache.org>.