incubator-sling-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From bdelacre...@apache.org
Subject svn commit: r1489401 - /sling/trunk/launchpad/integration-tests/src/main/java/org/apache/sling/launchpad/webapp/integrationtest/ServerSideScriptsTest.java
Date Tue, 04 Jun 2013 12:12:56 GMT
Author: bdelacretaz
Date: Tue Jun  4 12:12:56 2013
New Revision: 1489401

URL: http://svn.apache.org/r1489401
Log:
Avoid confusing exception if scriptPath creation fails

Modified:
    sling/trunk/launchpad/integration-tests/src/main/java/org/apache/sling/launchpad/webapp/integrationtest/ServerSideScriptsTest.java

Modified: sling/trunk/launchpad/integration-tests/src/main/java/org/apache/sling/launchpad/webapp/integrationtest/ServerSideScriptsTest.java
URL: http://svn.apache.org/viewvc/sling/trunk/launchpad/integration-tests/src/main/java/org/apache/sling/launchpad/webapp/integrationtest/ServerSideScriptsTest.java?rev=1489401&r1=1489400&r2=1489401&view=diff
==============================================================================
--- sling/trunk/launchpad/integration-tests/src/main/java/org/apache/sling/launchpad/webapp/integrationtest/ServerSideScriptsTest.java
(original)
+++ sling/trunk/launchpad/integration-tests/src/main/java/org/apache/sling/launchpad/webapp/integrationtest/ServerSideScriptsTest.java
Tue Jun  4 12:12:56 2013
@@ -157,6 +157,7 @@ public class ServerSideScriptsTest exten
         for(final Description test : this.tests) {
             final String resourceType = RESOURCE_TYPE_PREFIX + '/' + test.testName;
             final String scriptPath = "/apps/" + resourceType;
+            String toDelete = null;
 
             try {
                 // create test node
@@ -164,6 +165,7 @@ public class ServerSideScriptsTest exten
                         "jcr:primaryType", "sling:Folder",
                         "jcr:mixinTypes", "sling:Test",
                         "sling:resourceType", RESOURCE_TYPE_PREFIX + '/' + test.testName);
+                toDelete = scriptPath;
 
                 final String destPath = scriptPath + "/test.txt" + test.scriptExtension;
                 logger.info("Setting up node {} for {}", destPath, test.testScriptFile.getAbsoluteFile());
@@ -207,7 +209,9 @@ public class ServerSideScriptsTest exten
                 }
 
             } finally {
-                this.slingClient.delete(scriptPath);
+                if(toDelete != null) {
+                    this.slingClient.delete(toDelete);
+                }
             }
         }
     }



Mime
View raw message