Author: bdelacretaz
Date: Wed May 11 14:21:49 2016
New Revision: 1743378
URL: http://svn.apache.org/viewvc?rev=1743378&view=rev
Log:
SLING-5452 - also check for console readiness before uninstalling bundle,
contributed by Thierry Ygé, thanks!
Modified:
sling/trunk/testing/junit/teleporter/src/main/java/org/apache/sling/testing/teleporter/client/ClientSideTeleporter.java
sling/trunk/testing/junit/teleporter/src/main/java/org/apache/sling/testing/teleporter/client/TeleporterHttpClient.java
Modified:
sling/trunk/testing/junit/teleporter/src/main/java/org/apache/sling/testing/teleporter/client/ClientSideTeleporter.java
URL:
http://svn.apache.org/viewvc/sling/trunk/testing/junit/teleporter/src/main/java/org/apache/sling/testing/teleporter/client/ClientSideTeleporter.java?rev=1743378&r1=1743377&r2=1743378&view=diff
==============================================================================
---
sling/trunk/testing/junit/teleporter/src/main/java/org/apache/sling/testing/teleporter/client/ClientSideTeleporter.java
(original)
+++
sling/trunk/testing/junit/teleporter/src/main/java/org/apache/sling/testing/teleporter/client/ClientSideTeleporter.java
Wed May 11 14:21:49 2016
@@ -199,9 +199,9 @@ public class ClientSideTeleporter extend
try {
httpClient.runTests(testPath, testReadyTimeoutSeconds);
} finally {
- httpClient.uninstallBundle(bundleSymbolicName);
+ httpClient.uninstallBundle(bundleSymbolicName,
webConsoleReadyTimeoutSeconds);
}
}
};
}
-}
\ No newline at end of file
+}
Modified:
sling/trunk/testing/junit/teleporter/src/main/java/org/apache/sling/testing/teleporter/client/TeleporterHttpClient.java
URL:
http://svn.apache.org/viewvc/sling/trunk/testing/junit/teleporter/src/main/java/org/apache/sling/testing/teleporter/client/TeleporterHttpClient.java?rev=1743378&r1=1743377&r2=1743378&view=diff
==============================================================================
---
sling/trunk/testing/junit/teleporter/src/main/java/org/apache/sling/testing/teleporter/client/TeleporterHttpClient.java
(original)
+++
sling/trunk/testing/junit/teleporter/src/main/java/org/apache/sling/testing/teleporter/client/TeleporterHttpClient.java
Wed May 11 14:21:49 2016
@@ -109,12 +109,14 @@ class TeleporterHttpClient {
}
}
- void uninstallBundle(String bundleSymbolicName) throws
MalformedURLException, IOException {
+ void uninstallBundle(String bundleSymbolicName, int
webConsoleReadyTimeoutSeconds) throws MalformedURLException, IOException {
// equivalent of
// curl -u admin:admin -F action=uninstall
http://localhost:8080/system/console/bundles/$N
final String url = baseUrl + "/system/console/bundles/" +
bundleSymbolicName;
final HttpURLConnection c = (HttpURLConnection)new
URL(url).openConnection();
+ waitForStatus(url, 200, webConsoleReadyTimeoutSeconds * 1000);
+
try {
setConnectionCredentials(c);
new MultipartAdapter(c, CHARSET)
@@ -187,4 +189,4 @@ class TeleporterHttpClient {
c.disconnect();
}
}
-}
\ No newline at end of file
+}