You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@sling.apache.org by ss...@apache.org on 2016/12/11 13:12:06 UTC

svn commit: r1773570 - in /sling/branches/testing/mocks/sling-mock-1.x/src: main/java/org/apache/sling/testing/mock/sling/context/ main/java/org/apache/sling/testing/mock/sling/junit/ main/java/org/apache/sling/testing/mock/sling/loader/ test/java/org/...

Author: sseifert
Date: Sun Dec 11 13:12:06 2016
New Revision: 1773570

URL: http://svn.apache.org/viewvc?rev=1773570&view=rev
Log:
SLING-6387 Allow to control autocommit mode for ContentLoader (patch provided by Dirk Rudolph, with modifications)

Added:
    sling/branches/testing/mocks/sling-mock-1.x/src/test/java/org/apache/sling/testing/mock/sling/jcrmock/loader/ContentLoaderAutoCommitTest.java   (with props)
    sling/branches/testing/mocks/sling-mock-1.x/src/test/java/org/apache/sling/testing/mock/sling/loader/AbstractContentLoaderAutoCommitTest.java   (with props)
    sling/branches/testing/mocks/sling-mock-1.x/src/test/java/org/apache/sling/testing/mock/sling/rrmock/loader/ContentLoaderAutoCommitTest.java   (with props)
Modified:
    sling/branches/testing/mocks/sling-mock-1.x/src/main/java/org/apache/sling/testing/mock/sling/context/SlingContextImpl.java
    sling/branches/testing/mocks/sling-mock-1.x/src/main/java/org/apache/sling/testing/mock/sling/context/package-info.java
    sling/branches/testing/mocks/sling-mock-1.x/src/main/java/org/apache/sling/testing/mock/sling/junit/package-info.java
    sling/branches/testing/mocks/sling-mock-1.x/src/main/java/org/apache/sling/testing/mock/sling/loader/ContentLoader.java
    sling/branches/testing/mocks/sling-mock-1.x/src/main/java/org/apache/sling/testing/mock/sling/loader/package-info.java

Modified: sling/branches/testing/mocks/sling-mock-1.x/src/main/java/org/apache/sling/testing/mock/sling/context/SlingContextImpl.java
URL: http://svn.apache.org/viewvc/sling/branches/testing/mocks/sling-mock-1.x/src/main/java/org/apache/sling/testing/mock/sling/context/SlingContextImpl.java?rev=1773570&r1=1773569&r2=1773570&view=diff
==============================================================================
--- sling/branches/testing/mocks/sling-mock-1.x/src/main/java/org/apache/sling/testing/mock/sling/context/SlingContextImpl.java (original)
+++ sling/branches/testing/mocks/sling-mock-1.x/src/main/java/org/apache/sling/testing/mock/sling/context/SlingContextImpl.java Sun Dec 11 13:12:06 2016
@@ -94,6 +94,7 @@ public class SlingContextImpl extends Os
     protected MockSlingHttpServletResponse response;
     protected SlingScriptHelper slingScriptHelper;
     protected ContentLoader contentLoader;
+    protected ContentLoader contentLoaderAutoCommit;
     protected ContentBuilder contentBuilder;
     protected ResourceBuilder resourceBuilder;
     protected UniqueRoot uniqueRoot;
@@ -215,6 +216,7 @@ public class SlingContextImpl extends Os
         this.response = null;
         this.slingScriptHelper = null;
         this.contentLoader = null;
+        this.contentLoaderAutoCommit = null;
         this.contentBuilder = null;
         this.resourceBuilder = null;
         this.uniqueRoot = null;
@@ -292,10 +294,26 @@ public class SlingContextImpl extends Os
      * @return Content loader
      */
     public ContentLoader load() {
-        if (this.contentLoader == null) {
-            this.contentLoader = new ContentLoader(resourceResolver(), bundleContext());
+        return load(true);
+    }
+
+    /**
+     * @param autoCommit Automatically commit changes after loading content (default: true)
+     * @return Content loader
+     */
+    public ContentLoader load(boolean autoCommit) {
+        if (autoCommit) {
+            if (this.contentLoaderAutoCommit == null) {
+                this.contentLoaderAutoCommit = new ContentLoader(resourceResolver(), bundleContext(), true);
+            }
+            return this.contentLoaderAutoCommit;
+        }
+        else {
+            if (this.contentLoader == null) {
+                this.contentLoader = new ContentLoader(resourceResolver(), bundleContext(), false);
+            }
+            return this.contentLoader;
         }
-        return this.contentLoader;
     }
 
     /**

Modified: sling/branches/testing/mocks/sling-mock-1.x/src/main/java/org/apache/sling/testing/mock/sling/context/package-info.java
URL: http://svn.apache.org/viewvc/sling/branches/testing/mocks/sling-mock-1.x/src/main/java/org/apache/sling/testing/mock/sling/context/package-info.java?rev=1773570&r1=1773569&r2=1773570&view=diff
==============================================================================
--- sling/branches/testing/mocks/sling-mock-1.x/src/main/java/org/apache/sling/testing/mock/sling/context/package-info.java (original)
+++ sling/branches/testing/mocks/sling-mock-1.x/src/main/java/org/apache/sling/testing/mock/sling/context/package-info.java Sun Dec 11 13:12:06 2016
@@ -19,5 +19,5 @@
 /**
  * Sling context implementation for unit tests.
  */
-@aQute.bnd.annotation.Version("3.4")
+@aQute.bnd.annotation.Version("3.5")
 package org.apache.sling.testing.mock.sling.context;

Modified: sling/branches/testing/mocks/sling-mock-1.x/src/main/java/org/apache/sling/testing/mock/sling/junit/package-info.java
URL: http://svn.apache.org/viewvc/sling/branches/testing/mocks/sling-mock-1.x/src/main/java/org/apache/sling/testing/mock/sling/junit/package-info.java?rev=1773570&r1=1773569&r2=1773570&view=diff
==============================================================================
--- sling/branches/testing/mocks/sling-mock-1.x/src/main/java/org/apache/sling/testing/mock/sling/junit/package-info.java (original)
+++ sling/branches/testing/mocks/sling-mock-1.x/src/main/java/org/apache/sling/testing/mock/sling/junit/package-info.java Sun Dec 11 13:12:06 2016
@@ -19,5 +19,5 @@
 /**
  * Rule for providing easy access to Sling context in JUnit tests.
  */
-@aQute.bnd.annotation.Version("4.0")
+@aQute.bnd.annotation.Version("4.1")
 package org.apache.sling.testing.mock.sling.junit;

Modified: sling/branches/testing/mocks/sling-mock-1.x/src/main/java/org/apache/sling/testing/mock/sling/loader/ContentLoader.java
URL: http://svn.apache.org/viewvc/sling/branches/testing/mocks/sling-mock-1.x/src/main/java/org/apache/sling/testing/mock/sling/loader/ContentLoader.java?rev=1773570&r1=1773569&r2=1773570&view=diff
==============================================================================
--- sling/branches/testing/mocks/sling-mock-1.x/src/main/java/org/apache/sling/testing/mock/sling/loader/ContentLoader.java (original)
+++ sling/branches/testing/mocks/sling-mock-1.x/src/main/java/org/apache/sling/testing/mock/sling/loader/ContentLoader.java Sun Dec 11 13:12:06 2016
@@ -52,7 +52,7 @@ import com.google.common.collect.Immutab
 
 /**
  * Imports JSON data and binary data into Sling resource hierarchy.
- * After all import operations from json or binaries {@link ResourceResolver#commit()} is called.
+ * After all import operations from json or binaries {@link ResourceResolver#commit()} is called (when autocommit mode is active).
  */
 public final class ContentLoader {
 
@@ -77,6 +77,7 @@ public final class ContentLoader {
     private final ResourceResolver resourceResolver;
     private final BundleContext bundleContext;
     private final DateFormat calendarFormat;
+    private final boolean autoCommit;
 
     /**
      * @param resourceResolver Resource resolver
@@ -90,9 +91,19 @@ public final class ContentLoader {
      * @param bundleContext Bundle context
      */
     public ContentLoader(ResourceResolver resourceResolver, BundleContext bundleContext) {
+        this (resourceResolver, bundleContext, true);
+    }
+
+    /**
+     * @param resourceResolver Resource resolver
+     * @param bundleContext Bundle context
+     * @param autoCommit Automatically commit changes after loading content (default: true)
+     */
+    public ContentLoader(ResourceResolver resourceResolver, BundleContext bundleContext, boolean autoCommit) {
         this.resourceResolver = resourceResolver;
         this.bundleContext = bundleContext;
         this.calendarFormat = new SimpleDateFormat(JsonItemWriter.ECMA_DATE_FORMAT, JsonItemWriter.DATE_FORMAT_LOCALE);
+        this.autoCommit = autoCommit;
     }
 
     /**
@@ -175,7 +186,9 @@ public final class ContentLoader {
             String jsonString = convertToJsonString(inputStream).trim();
             JSONObject json = new JSONObject(jsonString);
             Resource resource = this.createResource(parentResource, childName, json);
-            resourceResolver.commit();
+            if (autoCommit) {
+                resourceResolver.commit();
+            }
             return resource;
         } catch (JSONException ex) {
             throw new RuntimeException(ex);
@@ -470,7 +483,9 @@ public final class ContentLoader {
             resourceResolver.create(file, JcrConstants.JCR_CONTENT,
                     ImmutableMap.<String, Object> builder().put(JcrConstants.JCR_PRIMARYTYPE, JcrConstants.NT_RESOURCE)
                             .put(JcrConstants.JCR_DATA, inputStream).put(JcrConstants.JCR_MIMETYPE, mimeType).build());
-            resourceResolver.commit();
+            if (autoCommit) {
+                resourceResolver.commit();
+            }
             return file;
         } catch (PersistenceException ex) {
             throw new RuntimeException("Unable to create resource at " + parentResource.getPath() + "/" + name, ex);
@@ -586,7 +601,9 @@ public final class ContentLoader {
             Resource resource = resourceResolver.create(parentResource, name,
                     ImmutableMap.<String, Object> builder().put(JcrConstants.JCR_PRIMARYTYPE, JcrConstants.NT_RESOURCE)
                             .put(JcrConstants.JCR_DATA, inputStream).put(JcrConstants.JCR_MIMETYPE, mimeType).build());
-            resourceResolver.commit();
+            if (autoCommit) {
+                resourceResolver.commit();
+            }
             return resource;
         } catch (PersistenceException ex) {
             throw new RuntimeException("Unable to create resource at " + parentResource.getPath() + "/" + name, ex);

Modified: sling/branches/testing/mocks/sling-mock-1.x/src/main/java/org/apache/sling/testing/mock/sling/loader/package-info.java
URL: http://svn.apache.org/viewvc/sling/branches/testing/mocks/sling-mock-1.x/src/main/java/org/apache/sling/testing/mock/sling/loader/package-info.java?rev=1773570&r1=1773569&r2=1773570&view=diff
==============================================================================
--- sling/branches/testing/mocks/sling-mock-1.x/src/main/java/org/apache/sling/testing/mock/sling/loader/package-info.java (original)
+++ sling/branches/testing/mocks/sling-mock-1.x/src/main/java/org/apache/sling/testing/mock/sling/loader/package-info.java Sun Dec 11 13:12:06 2016
@@ -19,5 +19,5 @@
 /**
  * Helpers for importing test content into the mocked repositories / resource hierarchies.
  */
-@aQute.bnd.annotation.Version("1.0")
+@aQute.bnd.annotation.Version("1.1")
 package org.apache.sling.testing.mock.sling.loader;

Added: sling/branches/testing/mocks/sling-mock-1.x/src/test/java/org/apache/sling/testing/mock/sling/jcrmock/loader/ContentLoaderAutoCommitTest.java
URL: http://svn.apache.org/viewvc/sling/branches/testing/mocks/sling-mock-1.x/src/test/java/org/apache/sling/testing/mock/sling/jcrmock/loader/ContentLoaderAutoCommitTest.java?rev=1773570&view=auto
==============================================================================
--- sling/branches/testing/mocks/sling-mock-1.x/src/test/java/org/apache/sling/testing/mock/sling/jcrmock/loader/ContentLoaderAutoCommitTest.java (added)
+++ sling/branches/testing/mocks/sling-mock-1.x/src/test/java/org/apache/sling/testing/mock/sling/jcrmock/loader/ContentLoaderAutoCommitTest.java Sun Dec 11 13:12:06 2016
@@ -0,0 +1,29 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *   http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+package org.apache.sling.testing.mock.sling.jcrmock.loader;
+
+import org.apache.sling.testing.mock.sling.ResourceResolverType;
+import org.apache.sling.testing.mock.sling.loader.AbstractContentLoaderAutoCommitTest;
+
+public class ContentLoaderAutoCommitTest extends AbstractContentLoaderAutoCommitTest {
+
+    @Override protected ResourceResolverType getResourceResolverType() {
+        return ResourceResolverType.JCR_MOCK;
+    }
+}

Propchange: sling/branches/testing/mocks/sling-mock-1.x/src/test/java/org/apache/sling/testing/mock/sling/jcrmock/loader/ContentLoaderAutoCommitTest.java
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: sling/branches/testing/mocks/sling-mock-1.x/src/test/java/org/apache/sling/testing/mock/sling/jcrmock/loader/ContentLoaderAutoCommitTest.java
------------------------------------------------------------------------------
--- svn:keywords (added)
+++ svn:keywords Sun Dec 11 13:12:06 2016
@@ -0,0 +1 @@
+LastChangedDate LastChangedRevision LastChangedBy HeadURL Id Author

Propchange: sling/branches/testing/mocks/sling-mock-1.x/src/test/java/org/apache/sling/testing/mock/sling/jcrmock/loader/ContentLoaderAutoCommitTest.java
------------------------------------------------------------------------------
    svn:mime-type = text/plain

Added: sling/branches/testing/mocks/sling-mock-1.x/src/test/java/org/apache/sling/testing/mock/sling/loader/AbstractContentLoaderAutoCommitTest.java
URL: http://svn.apache.org/viewvc/sling/branches/testing/mocks/sling-mock-1.x/src/test/java/org/apache/sling/testing/mock/sling/loader/AbstractContentLoaderAutoCommitTest.java?rev=1773570&view=auto
==============================================================================
--- sling/branches/testing/mocks/sling-mock-1.x/src/test/java/org/apache/sling/testing/mock/sling/loader/AbstractContentLoaderAutoCommitTest.java (added)
+++ sling/branches/testing/mocks/sling-mock-1.x/src/test/java/org/apache/sling/testing/mock/sling/loader/AbstractContentLoaderAutoCommitTest.java Sun Dec 11 13:12:06 2016
@@ -0,0 +1,242 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *   http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+package org.apache.sling.testing.mock.sling.loader;
+
+import static org.junit.Assert.assertFalse;
+import static org.junit.Assert.assertTrue;
+
+import java.io.ByteArrayInputStream;
+import java.io.InputStream;
+
+import org.apache.sling.api.resource.Resource;
+import org.apache.sling.testing.mock.sling.ResourceResolverType;
+import org.apache.sling.testing.mock.sling.junit.SlingContext;
+import org.junit.Rule;
+import org.junit.Test;
+
+public abstract class AbstractContentLoaderAutoCommitTest {
+
+    private static String DEST_RES_NAME = "dest";
+    private static String MIME_TYPE_JSON = "application/json";
+    private static String CLP_CONTENT = "/json-import-samples/content.json";
+    private static byte[] MEM_CONTENT = ("{"
+            + "\"jcr:primaryType\":\"sling:Folder\""
+            + "}").getBytes();
+
+    private int destResCount = 1;
+
+    @Rule
+    public SlingContext context = new SlingContext(getResourceResolverType());
+
+    protected abstract ResourceResolverType getResourceResolverType();
+
+    @Test
+    public void testJsonAutocommitExplicitly() {
+        doTestJsonAutocommitExplicitly(false, new HasChangesAssertion());
+        doTestJsonAutocommitExplicitly(true, new NoChangesAssertion());
+    }
+
+    private void doTestJsonAutocommitExplicitly(final boolean commit, final Runnable assertion) {
+        final ContentLoader loader = context.load(commit);
+
+        final Resource a1 = context.create().resource(nextDestResource());
+        loader.json(CLP_CONTENT, a1, "child");
+        assertion.run();
+
+        loader.json(CLP_CONTENT, nextDestResource());
+        assertion.run();
+
+        final InputStream data = new ByteArrayInputStream(MEM_CONTENT);
+        final Resource a3 = context.create().resource(nextDestResource());
+        loader.json(data, a3, "child");
+        assertion.run();
+
+        final InputStream data2 = new ByteArrayInputStream(MEM_CONTENT);
+        loader.json(data2, nextDestResource());
+        assertion.run();
+    }
+
+    @Test
+    public void testJsonAutocommitImplicitly() {
+        final ContentLoader loader = context.load();
+        final Runnable assertion = new NoChangesAssertion();
+
+        final Resource r = context.create().resource(nextDestResource());
+        loader.json(CLP_CONTENT, r, "child");
+        assertion.run();
+
+        loader.json(CLP_CONTENT, nextDestResource());
+        assertion.run();
+
+        final InputStream data = new ByteArrayInputStream(MEM_CONTENT);
+        final Resource r2 = context.create().resource(nextDestResource());
+        loader.json(data, r2, "child");
+        assertion.run();
+
+        final InputStream data2 = new ByteArrayInputStream(MEM_CONTENT);
+        loader.json(data2, nextDestResource());
+        assertion.run();
+    }
+
+    @Test
+    public void testBinaryFileAutocommitExplicitly() {
+        doTestBinaryFileAutocommitExplicitly(false, new HasChangesAssertion());
+        doTestBinaryFileAutocommitExplicitly(true, new NoChangesAssertion());
+    }
+
+    private void doTestBinaryFileAutocommitExplicitly(final boolean commit, final Runnable assertion) {
+        final ContentLoader loader = context.load(commit);
+
+        loader.binaryFile(CLP_CONTENT, nextDestResource());
+        assertion.run();
+
+        loader.binaryFile(CLP_CONTENT, nextDestResource(), MIME_TYPE_JSON);
+        assertion.run();
+
+        final InputStream data = new ByteArrayInputStream(MEM_CONTENT);
+        loader.binaryFile(data, nextDestResource());
+        assertion.run();
+
+        final InputStream data2 = new ByteArrayInputStream(MEM_CONTENT);
+        loader.binaryFile(data2, nextDestResource(), MIME_TYPE_JSON);
+        assertion.run();
+
+        final InputStream data3 = new ByteArrayInputStream(MEM_CONTENT);
+        final Resource r = context.create().resource(nextDestResource());
+        loader.binaryFile(data3, r, "child");
+        assertion.run();
+
+        final InputStream data4 = new ByteArrayInputStream(MEM_CONTENT);
+        final Resource r2 = context.create().resource(nextDestResource());
+        loader.binaryFile(data4, r2, "child", MIME_TYPE_JSON);
+        assertion.run();
+    }
+
+    @Test
+    public void testBinaryFileAutocommitImplicitly() {
+        final ContentLoader loader = context.load();
+        final Runnable assertion = new NoChangesAssertion();
+
+        loader.binaryFile(CLP_CONTENT, nextDestResource());
+        assertion.run();
+
+        loader.binaryFile(CLP_CONTENT, nextDestResource(), MIME_TYPE_JSON);
+        assertion.run();
+
+        final InputStream data = new ByteArrayInputStream(MEM_CONTENT);
+        loader.binaryFile(data, nextDestResource());
+        assertion.run();
+
+        final InputStream data2 = new ByteArrayInputStream(MEM_CONTENT);
+        loader.binaryFile(data2, nextDestResource(), MIME_TYPE_JSON);
+        assertion.run();
+
+        final InputStream data3 = new ByteArrayInputStream(MEM_CONTENT);
+        final Resource r = context.create().resource(nextDestResource());
+        loader.binaryFile(data3, r, "child");
+        assertion.run();
+
+        final InputStream data4 = new ByteArrayInputStream(MEM_CONTENT);
+        final Resource r2 = context.create().resource(nextDestResource());
+        loader.binaryFile(data4, r2, "child", MIME_TYPE_JSON);
+        assertion.run();
+    }
+
+    @Test
+    public void testBinaryResourceAutocommitExplicitly() {
+        doTestBinaryResourceAutocommitExplicitly(false, new HasChangesAssertion());
+        doTestBinaryResourceAutocommitExplicitly(true, new NoChangesAssertion());
+    }
+
+    private void doTestBinaryResourceAutocommitExplicitly(final boolean commit, final Runnable assertion) {
+        final ContentLoader loader = context.load(commit);
+
+        loader.binaryResource(CLP_CONTENT, nextDestResource());
+        assertion.run();
+
+        loader.binaryResource(CLP_CONTENT, nextDestResource(), MIME_TYPE_JSON);
+        assertion.run();
+
+        final InputStream data = new ByteArrayInputStream(MEM_CONTENT);
+        loader.binaryResource(data, nextDestResource());
+        assertion.run();
+
+        final InputStream data2 = new ByteArrayInputStream(MEM_CONTENT);
+        loader.binaryResource(data2, nextDestResource(), MIME_TYPE_JSON);
+        assertion.run();
+
+        final InputStream data3 = new ByteArrayInputStream(MEM_CONTENT);
+        final Resource r = context.create().resource(nextDestResource());
+        loader.binaryResource(data3, r, "child");
+        assertion.run();
+
+        final InputStream data4 = new ByteArrayInputStream(MEM_CONTENT);
+        final Resource r2 = context.create().resource(nextDestResource());
+        loader.binaryResource(data4, r2, "child", MIME_TYPE_JSON);
+        assertion.run();
+    }
+
+    @Test
+    public void testBinaryResourceAutocommitImplicitly() {
+        final ContentLoader loader = context.load();
+        final Runnable assertion = new NoChangesAssertion();
+
+        loader.binaryResource(CLP_CONTENT, nextDestResource());
+        assertion.run();
+
+        loader.binaryResource(CLP_CONTENT, nextDestResource(), MIME_TYPE_JSON);
+        assertion.run();
+
+        final InputStream data = new ByteArrayInputStream(MEM_CONTENT);
+        loader.binaryResource(data, nextDestResource());
+        assertion.run();
+
+        final InputStream data2 = new ByteArrayInputStream(MEM_CONTENT);
+        loader.binaryResource(data2, nextDestResource(), MIME_TYPE_JSON);
+        assertion.run();
+
+        final InputStream data3 = new ByteArrayInputStream(MEM_CONTENT);
+        final Resource r = context.create().resource(nextDestResource());
+        loader.binaryResource(data3, r, "child");
+        assertion.run();
+
+        final InputStream data4 = new ByteArrayInputStream(MEM_CONTENT);
+        final Resource r2 = context.create().resource(nextDestResource());
+        loader.binaryResource(data4, r2, "child", MIME_TYPE_JSON);
+        assertion.run();
+    }
+
+    private synchronized String nextDestResource() {
+        return '/' + DEST_RES_NAME + destResCount++;
+    }
+
+    private class HasChangesAssertion implements Runnable {
+        @Override
+        public void run() {
+            assertTrue(context.resourceResolver().hasChanges());
+        }
+    }
+
+    private class NoChangesAssertion implements Runnable {
+        @Override
+        public void run() {
+            assertFalse(context.resourceResolver().hasChanges());
+        }
+    }
+}

Propchange: sling/branches/testing/mocks/sling-mock-1.x/src/test/java/org/apache/sling/testing/mock/sling/loader/AbstractContentLoaderAutoCommitTest.java
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: sling/branches/testing/mocks/sling-mock-1.x/src/test/java/org/apache/sling/testing/mock/sling/loader/AbstractContentLoaderAutoCommitTest.java
------------------------------------------------------------------------------
--- svn:keywords (added)
+++ svn:keywords Sun Dec 11 13:12:06 2016
@@ -0,0 +1 @@
+LastChangedDate LastChangedRevision LastChangedBy HeadURL Id Author

Propchange: sling/branches/testing/mocks/sling-mock-1.x/src/test/java/org/apache/sling/testing/mock/sling/loader/AbstractContentLoaderAutoCommitTest.java
------------------------------------------------------------------------------
    svn:mime-type = text/plain

Added: sling/branches/testing/mocks/sling-mock-1.x/src/test/java/org/apache/sling/testing/mock/sling/rrmock/loader/ContentLoaderAutoCommitTest.java
URL: http://svn.apache.org/viewvc/sling/branches/testing/mocks/sling-mock-1.x/src/test/java/org/apache/sling/testing/mock/sling/rrmock/loader/ContentLoaderAutoCommitTest.java?rev=1773570&view=auto
==============================================================================
--- sling/branches/testing/mocks/sling-mock-1.x/src/test/java/org/apache/sling/testing/mock/sling/rrmock/loader/ContentLoaderAutoCommitTest.java (added)
+++ sling/branches/testing/mocks/sling-mock-1.x/src/test/java/org/apache/sling/testing/mock/sling/rrmock/loader/ContentLoaderAutoCommitTest.java Sun Dec 11 13:12:06 2016
@@ -0,0 +1,30 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *   http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+package org.apache.sling.testing.mock.sling.rrmock.loader;
+
+import org.apache.sling.testing.mock.sling.ResourceResolverType;
+import org.apache.sling.testing.mock.sling.loader.AbstractContentLoaderAutoCommitTest;
+
+public class ContentLoaderAutoCommitTest extends AbstractContentLoaderAutoCommitTest {
+
+    @Override
+    protected ResourceResolverType getResourceResolverType() {
+        return ResourceResolverType.RESOURCERESOLVER_MOCK;
+    }
+}

Propchange: sling/branches/testing/mocks/sling-mock-1.x/src/test/java/org/apache/sling/testing/mock/sling/rrmock/loader/ContentLoaderAutoCommitTest.java
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: sling/branches/testing/mocks/sling-mock-1.x/src/test/java/org/apache/sling/testing/mock/sling/rrmock/loader/ContentLoaderAutoCommitTest.java
------------------------------------------------------------------------------
--- svn:keywords (added)
+++ svn:keywords Sun Dec 11 13:12:06 2016
@@ -0,0 +1 @@
+LastChangedDate LastChangedRevision LastChangedBy HeadURL Id Author

Propchange: sling/branches/testing/mocks/sling-mock-1.x/src/test/java/org/apache/sling/testing/mock/sling/rrmock/loader/ContentLoaderAutoCommitTest.java
------------------------------------------------------------------------------
    svn:mime-type = text/plain