This is an automated email from the ASF dual-hosted git repository. rombert pushed a commit to annotated tag org.apache.sling.fsresource-2.0.0 in repository https://gitbox.apache.org/repos/asf/sling-org-apache-sling-fsresource.git
commit 110f28bafe9e25408c5c0809b65b9a5676896862 Author: Stefan Seifert <[email protected]> AuthorDate: Tue Feb 21 14:21:15 2017 +0000 SLING-6440 fix invalid path in unit test git-svn-id: https://svn.apache.org/repos/asf/sling/trunk/bundles/extensions/fsresource@1783893 13f79535-47bb-0310-9956-ffa450edef68 --- .../sling/fsprovider/internal/InvalidRootFolderTest.java | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) diff --git a/src/test/java/org/apache/sling/fsprovider/internal/InvalidRootFolderTest.java b/src/test/java/org/apache/sling/fsprovider/internal/InvalidRootFolderTest.java index 9f38c1a..6d080b1 100644 --- a/src/test/java/org/apache/sling/fsprovider/internal/InvalidRootFolderTest.java +++ b/src/test/java/org/apache/sling/fsprovider/internal/InvalidRootFolderTest.java @@ -21,11 +21,14 @@ package org.apache.sling.fsprovider.internal; import static org.junit.Assert.assertFalse; import static org.junit.Assert.assertNull; +import java.io.File; + import org.apache.sling.api.resource.Resource; import org.apache.sling.fsprovider.internal.TestUtils.RegisterFsResourcePlugin; import org.apache.sling.testing.mock.sling.ResourceResolverType; import org.apache.sling.testing.mock.sling.junit.SlingContext; import org.apache.sling.testing.mock.sling.junit.SlingContextBuilder; +import org.apache.sling.testing.mock.sling.junit.SlingContextCallback; import org.junit.Before; import org.junit.Rule; import org.junit.Test; @@ -39,7 +42,14 @@ public class InvalidRootFolderTest { @Rule public SlingContext context = new SlingContextBuilder(ResourceResolverType.JCR_MOCK) - .plugin(new RegisterFsResourcePlugin("provider.file", "/invalid-folder")) + .plugin(new RegisterFsResourcePlugin("provider.file", "target/temp/invalid-folder")) + .afterTearDown(new SlingContextCallback() { + @Override + public void execute(SlingContext context) throws Exception { + File file = new File("target/temp/invalid-folder"); + file.delete(); + } + }) .build(); @Before -- To stop receiving notification emails like this one, please contact "[email protected]" <[email protected]>.
