diff --git a/cf-smoke/pom.xml b/cf-smoke/pom.xml
index 819e8294..9f46c113 100644
--- a/cf-smoke/pom.xml
+++ b/cf-smoke/pom.xml
@@ -40,7 +40,7 @@
org.apache.maven.plugins
maven-enforcer-plugin
- 3.6.1
+ 3.6.2
enforce-maven-version
@@ -77,15 +77,13 @@
-
+
org.apache.maven.plugins
maven-compiler-plugin
3.14.1
- 8
- 8
- 8
+ 11
@@ -257,7 +255,7 @@
com.adobe.cq
aem-cloud-testing-clients
- 1.3.0
+ 2.0.0-SNAPSHOT
diff --git a/cf-smoke/src/main/java/com/adobe/cq/cloud/testing/it/cf/smoke/rules/InstallPackageRule.java b/cf-smoke/src/main/java/com/adobe/cq/cloud/testing/it/cf/smoke/rules/InstallPackageRule.java
index 6a10dbb0..87b823b6 100644
--- a/cf-smoke/src/main/java/com/adobe/cq/cloud/testing/it/cf/smoke/rules/InstallPackageRule.java
+++ b/cf-smoke/src/main/java/com/adobe/cq/cloud/testing/it/cf/smoke/rules/InstallPackageRule.java
@@ -46,7 +46,7 @@
import java.util.stream.Stream;
import static java.lang.Integer.MAX_VALUE;
-import static org.apache.http.HttpStatus.SC_OK;
+import static org.apache.hc.core5.http.HttpStatus.SC_OK;
/**
* Install the test content package from resources.
diff --git a/smoke/pom.xml b/smoke/pom.xml
index c4c79cd1..dd48a725 100644
--- a/smoke/pom.xml
+++ b/smoke/pom.xml
@@ -41,7 +41,7 @@
org.apache.maven.plugins
maven-enforcer-plugin
- 3.6.1
+ 3.6.2
enforce-maven-version
@@ -78,15 +78,13 @@
-
+
org.apache.maven.plugins
maven-compiler-plugin
3.14.1
- 8
- 8
- 8
+ 11
@@ -304,7 +302,7 @@
com.adobe.cq
aem-cloud-testing-clients
- 1.3.0
+ 2.0.0-SNAPSHOT
diff --git a/smoke/src/main/java/com/adobe/cq/cloud/testing/it/smoke/CreatePageAsAuthorUserIT.java b/smoke/src/main/java/com/adobe/cq/cloud/testing/it/smoke/CreatePageAsAuthorUserIT.java
index 7e8be522..bc64991a 100644
--- a/smoke/src/main/java/com/adobe/cq/cloud/testing/it/smoke/CreatePageAsAuthorUserIT.java
+++ b/smoke/src/main/java/com/adobe/cq/cloud/testing/it/smoke/CreatePageAsAuthorUserIT.java
@@ -24,7 +24,7 @@
import com.adobe.cq.testing.junit.rules.TemporaryContentAuthorGroup;
import com.adobe.cq.testing.junit.rules.TemporaryUser;
import org.apache.commons.lang3.StringUtils;
-import org.apache.http.HttpStatus;
+import org.apache.hc.core5.http.HttpStatus;
import org.apache.sling.testing.clients.ClientException;
import org.apache.sling.testing.clients.SlingClient;
import org.apache.sling.testing.clients.SlingHttpResponse;
@@ -87,7 +87,7 @@ public void testCreatePageAsAuthor() throws InterruptedException, ClientExceptio
SlingHttpResponse response = createTestPage(pageName, 1)
) {
assert response != null;
- if (response.getStatusLine().getStatusCode() == HttpStatus.SC_UNAUTHORIZED) {
+ if (response.getCode() == HttpStatus.SC_UNAUTHORIZED) {
AssumptionViolatedException e = new AssumptionViolatedException("Author User " + userRule.getClient().getUser() + " not authorized to create page. Skipping...");
LOG.error("Unable to create test page", e);
throw e;
@@ -138,7 +138,7 @@ private SlingHttpResponse createTestPage(String pageName, int authRetries) throw
);
// retry in case not fully synced on time
- if (response.getStatusLine().getStatusCode() == HttpStatus.SC_UNAUTHORIZED && authRetries > 0) {
+ if (response.getCode() == HttpStatus.SC_UNAUTHORIZED && authRetries > 0) {
LOG.info("Got response status {} while creating page {}, retrying...", HttpStatus.SC_UNAUTHORIZED, pageName);
SECONDS.sleep(5);
return createTestPage(pageName, --authRetries);
diff --git a/smoke/src/main/java/com/adobe/cq/cloud/testing/it/smoke/ErrorHandlerIT.java b/smoke/src/main/java/com/adobe/cq/cloud/testing/it/smoke/ErrorHandlerIT.java
index 4c1ef488..9ba62c78 100644
--- a/smoke/src/main/java/com/adobe/cq/cloud/testing/it/smoke/ErrorHandlerIT.java
+++ b/smoke/src/main/java/com/adobe/cq/cloud/testing/it/smoke/ErrorHandlerIT.java
@@ -28,8 +28,8 @@
import java.util.UUID;
-import static org.apache.http.HttpStatus.SC_FORBIDDEN;
-import static org.apache.http.HttpStatus.SC_UNAUTHORIZED;
+import static org.apache.hc.core5.http.HttpStatus.SC_FORBIDDEN;
+import static org.apache.hc.core5.http.HttpStatus.SC_UNAUTHORIZED;
/**
* This test class is protecting from flawed AEM error handler implementations that are not returning 404s in case
@@ -85,7 +85,7 @@ public void testAuthorResponseCode404() throws ClientException {
SlingHttpResponse response = adminAuthor.doGet(path, 404, SC_UNAUTHORIZED, SC_FORBIDDEN);
if (response != null &&
- (response.getStatusLine().getStatusCode() == SC_UNAUTHORIZED || response.getStatusLine().getStatusCode() == SC_FORBIDDEN)) {
+ (response.getCode() == SC_UNAUTHORIZED || response.getCode() == SC_FORBIDDEN)) {
throw new AssumptionViolatedException("Skipping test...");
}
} catch (ClientException e) {
@@ -108,7 +108,7 @@ public void testPublishResponseCode404() throws ClientException {
SlingHttpResponse response = adminPublish.doGet(path, 404, SC_UNAUTHORIZED, SC_FORBIDDEN);
if (response != null &&
- (response.getStatusLine().getStatusCode() == SC_UNAUTHORIZED || response.getStatusLine().getStatusCode() == SC_FORBIDDEN)) {
+ (response.getCode() == SC_UNAUTHORIZED || response.getCode() == SC_FORBIDDEN)) {
throw new AssumptionViolatedException("Skipping test...");
}
} catch (ClientException e) {
diff --git a/smoke/src/main/java/com/adobe/cq/cloud/testing/it/smoke/ValidateAntiSamyConfigurationIT.java b/smoke/src/main/java/com/adobe/cq/cloud/testing/it/smoke/ValidateAntiSamyConfigurationIT.java
index a9843318..a9e7fa44 100644
--- a/smoke/src/main/java/com/adobe/cq/cloud/testing/it/smoke/ValidateAntiSamyConfigurationIT.java
+++ b/smoke/src/main/java/com/adobe/cq/cloud/testing/it/smoke/ValidateAntiSamyConfigurationIT.java
@@ -4,9 +4,9 @@
import java.util.concurrent.TimeUnit;
import java.util.concurrent.TimeoutException;
-import org.apache.http.HttpEntity;
-import org.apache.http.entity.ContentType;
-import org.apache.http.entity.InputStreamEntity;
+import org.apache.hc.core5.http.ContentType;
+import org.apache.hc.core5.http.HttpEntity;
+import org.apache.hc.core5.http.io.entity.InputStreamEntity;
import org.apache.sling.testing.clients.SlingHttpResponse;
import org.apache.sling.testing.clients.util.poller.Polling;
import org.junit.BeforeClass;
diff --git a/smoke/src/main/java/com/adobe/cq/cloud/testing/it/smoke/replication/ReplicationClient.java b/smoke/src/main/java/com/adobe/cq/cloud/testing/it/smoke/replication/ReplicationClient.java
index 2d1e0be6..315d736b 100644
--- a/smoke/src/main/java/com/adobe/cq/cloud/testing/it/smoke/replication/ReplicationClient.java
+++ b/smoke/src/main/java/com/adobe/cq/cloud/testing/it/smoke/replication/ReplicationClient.java
@@ -38,8 +38,8 @@
import com.google.gson.JsonObject;
import com.google.gson.JsonParser;
import org.apache.commons.lang3.StringUtils;
-import org.apache.http.HttpStatus;
-import org.apache.http.impl.client.CloseableHttpClient;
+import org.apache.hc.client5.http.impl.classic.CloseableHttpClient;
+import org.apache.hc.core5.http.HttpStatus;
import org.apache.sling.testing.clients.ClientException;
import org.apache.sling.testing.clients.SlingClientConfig;
import org.apache.sling.testing.clients.SlingHttpResponse;
diff --git a/smoke/src/main/java/com/adobe/cq/cloud/testing/it/smoke/replication/data/ReplicationResponse.java b/smoke/src/main/java/com/adobe/cq/cloud/testing/it/smoke/replication/data/ReplicationResponse.java
index 14653a8d..ed8240dd 100644
--- a/smoke/src/main/java/com/adobe/cq/cloud/testing/it/smoke/replication/data/ReplicationResponse.java
+++ b/smoke/src/main/java/com/adobe/cq/cloud/testing/it/smoke/replication/data/ReplicationResponse.java
@@ -18,7 +18,7 @@
import com.fasterxml.jackson.databind.JsonNode;
import org.apache.commons.lang3.StringUtils;
-import org.apache.http.Header;
+import org.apache.hc.core5.http.Header;
import org.apache.sling.testing.clients.ClientException;
import org.apache.sling.testing.clients.SlingHttpResponse;
@@ -37,7 +37,7 @@ public class ReplicationResponse {
public static ReplicationResponse from(SlingHttpResponse response) {
ReplicationResponse res = new ReplicationResponse();
- res.setCode(response.getStatusLine().getStatusCode());
+ res.setCode(response.getCode());
Header[] ct = response.getHeaders(HEADER_CONTENT_TYPE);
if (ct.length == 0) {
res.setContentType("(no content header set)");
diff --git a/smoke/src/main/java/com/adobe/cq/cloud/testing/it/smoke/rules/ContentPublishRule.java b/smoke/src/main/java/com/adobe/cq/cloud/testing/it/smoke/rules/ContentPublishRule.java
index 921cd398..482f1be3 100644
--- a/smoke/src/main/java/com/adobe/cq/cloud/testing/it/smoke/rules/ContentPublishRule.java
+++ b/smoke/src/main/java/com/adobe/cq/cloud/testing/it/smoke/rules/ContentPublishRule.java
@@ -32,11 +32,11 @@
import com.adobe.cq.cloud.testing.it.smoke.replication.data.ReplicationResponse;
import com.adobe.cq.testing.client.CQClient;
import com.adobe.cq.testing.junit.rules.Page;
-import org.apache.http.NameValuePair;
-import org.apache.http.client.methods.HttpGet;
-import org.apache.http.client.methods.HttpUriRequest;
-import org.apache.http.client.utils.URIBuilder;
-import org.apache.http.message.BasicNameValuePair;
+import org.apache.hc.client5.http.classic.methods.HttpGet;
+import org.apache.hc.client5.http.classic.methods.HttpUriRequest;
+import org.apache.hc.core5.http.NameValuePair;
+import org.apache.hc.core5.http.message.BasicNameValuePair;
+import org.apache.hc.core5.net.URIBuilder;
import org.apache.sling.testing.clients.ClientException;
import org.apache.sling.testing.clients.SlingHttpResponse;
import org.apache.sling.testing.clients.util.poller.Polling;
@@ -51,12 +51,12 @@
import static com.adobe.cq.cloud.testing.it.smoke.exception.ReplicationException.QUEUE_BLOCKED;
import static com.adobe.cq.cloud.testing.it.smoke.exception.ReplicationException.REPLICATION_NOT_AVAILABLE;
import static com.adobe.cq.cloud.testing.it.smoke.replication.ReplicationClient.checkPackageInQueue;
-import static org.apache.http.HttpStatus.SC_FORBIDDEN;
-import static org.apache.http.HttpStatus.SC_MOVED_PERMANENTLY;
-import static org.apache.http.HttpStatus.SC_MOVED_TEMPORARILY;
-import static org.apache.http.HttpStatus.SC_NOT_FOUND;
-import static org.apache.http.HttpStatus.SC_OK;
-import static org.apache.http.HttpStatus.SC_UNAUTHORIZED;
+import static org.apache.hc.core5.http.HttpStatus.SC_FORBIDDEN;
+import static org.apache.hc.core5.http.HttpStatus.SC_MOVED_PERMANENTLY;
+import static org.apache.hc.core5.http.HttpStatus.SC_MOVED_TEMPORARILY;
+import static org.apache.hc.core5.http.HttpStatus.SC_NOT_FOUND;
+import static org.apache.hc.core5.http.HttpStatus.SC_OK;
+import static org.apache.hc.core5.http.HttpStatus.SC_UNAUTHORIZED;
/**
* Junit test rule to check content distribution functionality
@@ -167,16 +167,16 @@ private void checkPage(boolean skipDispatcherCache, final int expectedStatus) th
res = getPublishClient().doStreamRequest(request, null);
// Special handling for 401,403, logging for 301,302
- if (null != res && (res.getStatusLine().getStatusCode() == SC_UNAUTHORIZED
- || res.getStatusLine().getStatusCode() == SC_FORBIDDEN)) {
- log.warn("Got status {} while checking page, expected status {}", res.getStatusLine().getStatusCode(),
+ if (null != res && (res.getCode() == SC_UNAUTHORIZED
+ || res.getCode() == SC_FORBIDDEN)) {
+ log.warn("Got status {} while checking page, expected status {}", res.getCode(),
expectedStatus);
throw new AssumptionViolatedException("Publish requires auth for (SAML?) or not authorized. Skipping...");
- } else if (null != res && (res.getStatusLine().getStatusCode() == SC_MOVED_PERMANENTLY
- || res.getStatusLine().getStatusCode() == SC_MOVED_TEMPORARILY)) {
- log.info("Redirect status {} detected for page {}", res.getStatusLine().getStatusCode(), path);
- } else if (null != res && (res.getStatusLine().getStatusCode() == expectedStatus)) {
- log.info("Page check completed with status {}", res.getStatusLine().getStatusCode());
+ } else if (null != res && (res.getCode() == SC_MOVED_PERMANENTLY
+ || res.getCode() == SC_MOVED_TEMPORARILY)) {
+ log.info("Redirect status {} detected for page {}", res.getCode(), path);
+ } else if (null != res && (res.getCode() == expectedStatus)) {
+ log.info("Page check completed with status {}", res.getCode());
return;
}
@@ -190,7 +190,7 @@ private void checkPage(boolean skipDispatcherCache, final int expectedStatus) th
: Collections.emptyList();
SlingHttpResponse slingHttpResponse =
getPublishClient().doGet(path, newQueryParams, Collections.emptyList(), expectedStatus);
- log.info("Page check completed with status {}", slingHttpResponse.getStatusLine().getStatusCode());
+ log.info("Page check completed with status {}", slingHttpResponse.getCode());
return true;
});
// Changing the delay to be 10 seconds so that the check page runs every 10 seconds
diff --git a/smoke/src/main/java/com/adobe/cq/cloud/testing/it/smoke/rules/ServiceAccessibleRule.java b/smoke/src/main/java/com/adobe/cq/cloud/testing/it/smoke/rules/ServiceAccessibleRule.java
index ec541325..831ee61a 100644
--- a/smoke/src/main/java/com/adobe/cq/cloud/testing/it/smoke/rules/ServiceAccessibleRule.java
+++ b/smoke/src/main/java/com/adobe/cq/cloud/testing/it/smoke/rules/ServiceAccessibleRule.java
@@ -23,11 +23,12 @@
import com.adobe.cq.cloud.testing.it.smoke.exception.ServiceException;
import com.adobe.cq.testing.client.CQClient;
-import org.apache.http.HttpResponse;
-import org.apache.http.client.config.RequestConfig;
-import org.apache.http.client.methods.HttpGet;
-import org.apache.http.impl.client.HttpClientBuilder;
-import org.apache.http.util.EntityUtils;
+import org.apache.hc.client5.http.classic.methods.HttpGet;
+import org.apache.hc.client5.http.config.RequestConfig;
+import org.apache.hc.client5.http.impl.classic.CloseableHttpResponse;
+import org.apache.hc.client5.http.impl.classic.HttpClientBuilder;
+import org.apache.hc.core5.http.io.entity.EntityUtils;
+import org.apache.hc.core5.util.Timeout;
import org.apache.sling.testing.clients.util.poller.Polling;
import org.apache.sling.testing.clients.ClientException;
import org.apache.sling.testing.clients.SlingClient;
@@ -67,8 +68,8 @@ public Statement apply(Statement base, Description description) {
try {
// Alternatively, rely on setting -Dsling.client.connection.timeout.seconds=10 from the outside
RequestConfig requestConfig = RequestConfig.custom()
- .setConnectTimeout(10000)
- .setSocketTimeout(10000)
+ .setConnectTimeout(Timeout.ofMilliseconds(10000))
+ .setResponseTimeout(Timeout.ofMilliseconds(10000))
.build();
// See https://github.com/apache/sling-org-apache-sling-testing-clients#how-can-i-customize-the-underlying-httpclient
@@ -80,8 +81,8 @@ public Statement apply(Statement base, Description description) {
AtomicInteger counter = new AtomicInteger();
polling = new Polling(() -> {
counter.incrementAndGet();
- HttpResponse httpResponse = client.execute(new HttpGet(adminClient.getUrl(SYSTEM_READY)));
- int status = httpResponse.getStatusLine().getStatusCode();
+ CloseableHttpResponse httpResponse = client.execute(new HttpGet(adminClient.getUrl(SYSTEM_READY)));
+ int status = httpResponse.getCode();
String response = EntityUtils.toString(httpResponse.getEntity());
if (status != 200) {
String errMsg = String.format("Status Code - %s, response - %s", status, response);
diff --git a/wcm-smoke/pom.xml b/wcm-smoke/pom.xml
index f305ff93..ac6117f5 100644
--- a/wcm-smoke/pom.xml
+++ b/wcm-smoke/pom.xml
@@ -40,7 +40,7 @@
org.apache.maven.plugins
maven-enforcer-plugin
- 3.6.1
+ 3.6.2
enforce-maven-version
@@ -77,15 +77,13 @@
-
+
org.apache.maven.plugins
maven-compiler-plugin
3.14.1
- 8
- 8
- 8
+ 11
@@ -256,14 +254,19 @@
org.htmlunit
htmlunit
- 4.13.0
+ 4.17.0
+
+
+ org.apache.httpcomponents
+ httpmime
+ 4.5.14
com.adobe.cq
aem-cloud-testing-clients
- 1.3.0
+ 2.0.0-SNAPSHOT
diff --git a/wcm-smoke/src/main/java/com/adobe/cq/cloud/testing/it/wcm/smoke/DeepGetPageIT.java b/wcm-smoke/src/main/java/com/adobe/cq/cloud/testing/it/wcm/smoke/DeepGetPageIT.java
index d8c4cad9..13a4f419 100644
--- a/wcm-smoke/src/main/java/com/adobe/cq/cloud/testing/it/wcm/smoke/DeepGetPageIT.java
+++ b/wcm-smoke/src/main/java/com/adobe/cq/cloud/testing/it/wcm/smoke/DeepGetPageIT.java
@@ -155,7 +155,7 @@ private static void verifyPageAndResources(HtmlUnitClient client, String path) t
for (URI ref : client.getResourceRefs(path)) {
if (isSameOrigin(baseURI, ref)) {
SlingHttpResponse response = client.doGet(ref.getRawPath());
- int statusCode = response.getStatusLine().getStatusCode();
+ int statusCode = response.getCode();
assertEquals("Unexpected status returned from [" + ref + "]", 200, statusCode);
}
}
diff --git a/wcm-smoke/src/main/java/com/adobe/cq/cloud/testing/it/wcm/smoke/HtmlUnitClient.java b/wcm-smoke/src/main/java/com/adobe/cq/cloud/testing/it/wcm/smoke/HtmlUnitClient.java
index 9064e413..586865ee 100644
--- a/wcm-smoke/src/main/java/com/adobe/cq/cloud/testing/it/wcm/smoke/HtmlUnitClient.java
+++ b/wcm-smoke/src/main/java/com/adobe/cq/cloud/testing/it/wcm/smoke/HtmlUnitClient.java
@@ -15,11 +15,11 @@
*/
package com.adobe.cq.cloud.testing.it.wcm.smoke;
+import org.apache.hc.client5.http.impl.classic.CloseableHttpClient;
import org.apache.http.auth.AuthScope;
import org.apache.http.auth.Credentials;
import org.apache.http.auth.UsernamePasswordCredentials;
import org.apache.http.impl.client.BasicCredentialsProvider;
-import org.apache.http.impl.client.CloseableHttpClient;
import org.apache.http.impl.client.HttpClientBuilder;
import org.apache.sling.testing.clients.ClientException;
import org.apache.sling.testing.clients.SlingClientConfig;
diff --git a/xf-smoke/pom.xml b/xf-smoke/pom.xml
index 23e14b2e..0095ea68 100644
--- a/xf-smoke/pom.xml
+++ b/xf-smoke/pom.xml
@@ -40,7 +40,7 @@
org.apache.maven.plugins
maven-enforcer-plugin
- 3.6.1
+ 3.6.2
enforce-maven-version
@@ -77,15 +77,13 @@
-
+
org.apache.maven.plugins
maven-compiler-plugin
3.14.1
- 8
- 8
- 8
+ 11
@@ -257,7 +255,7 @@
com.adobe.cq
aem-cloud-testing-clients
- 1.3.0
+ 2.0.0-SNAPSHOT
diff --git a/xf-smoke/src/main/java/com/adobe/cq/cloud/testing/it/xf/smoke/XfSmokeIT.java b/xf-smoke/src/main/java/com/adobe/cq/cloud/testing/it/xf/smoke/XfSmokeIT.java
index d2ae2672..92e0c12e 100644
--- a/xf-smoke/src/main/java/com/adobe/cq/cloud/testing/it/xf/smoke/XfSmokeIT.java
+++ b/xf-smoke/src/main/java/com/adobe/cq/cloud/testing/it/xf/smoke/XfSmokeIT.java
@@ -24,7 +24,7 @@
import com.adobe.cq.testing.junit.rules.CQAuthorPublishClassRule;
import com.adobe.cq.testing.junit.rules.CQRule;
-import org.apache.http.HttpStatus;
+import org.apache.hc.core5.http.HttpStatus;
import org.apache.sling.testing.clients.ClientException;
import org.apache.sling.testing.clients.SlingHttpResponse;
import org.apache.sling.testing.clients.exceptions.TestingIOException;