incubator-sling-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From bdelacre...@apache.org
Subject svn commit: r921430 - /sling/trunk/launchpad/testing/src/test/java/org/apache/sling/launchpad/webapp/integrationtest/JsonRenderingTest.java
Date Wed, 10 Mar 2010 16:22:24 GMT
Author: bdelacretaz
Date: Wed Mar 10 16:22:24 2010
New Revision: 921430

URL: http://svn.apache.org/viewvc?rev=921430&view=rev
Log:
Fix test, failed when testing against Sling mounted at /

Modified:
    sling/trunk/launchpad/testing/src/test/java/org/apache/sling/launchpad/webapp/integrationtest/JsonRenderingTest.java

Modified: sling/trunk/launchpad/testing/src/test/java/org/apache/sling/launchpad/webapp/integrationtest/JsonRenderingTest.java
URL: http://svn.apache.org/viewvc/sling/trunk/launchpad/testing/src/test/java/org/apache/sling/launchpad/webapp/integrationtest/JsonRenderingTest.java?rev=921430&r1=921429&r2=921430&view=diff
==============================================================================
--- sling/trunk/launchpad/testing/src/test/java/org/apache/sling/launchpad/webapp/integrationtest/JsonRenderingTest.java
(original)
+++ sling/trunk/launchpad/testing/src/test/java/org/apache/sling/launchpad/webapp/integrationtest/JsonRenderingTest.java
Wed Mar 10 16:22:24 2010
@@ -131,8 +131,10 @@ public class JsonRenderingTest extends H
       System.err.println("Url: " + url + "\npostUrl: " + postUrl);
       // Get the resource url. (everything after the port)
       // We skip http://localhost:8888/org.apache.sling.launchpad.testing-6-SNAPSHOT/
+      // or http://localhost:8888/
       String resourceUrl = url;
-      for (int i = 4;i>0;i--) {
+      final int toSkip = resourceUrl.contains("/org.apache.sling.launchpad") ? 4 : 3;
+      for (int i = toSkip;i>0;i--) {
         resourceUrl = resourceUrl.substring(resourceUrl.indexOf("/") + 1);
       }
       for (int i = 10; i >=0; i--) {



Mime
View raw message