in src/main/java/org/apache/sling/testing/clients/util/ServerErrorRetryStrategy.java [49:68]
public boolean retryRequest(final HttpResponse response, final int executionCount, final HttpContext context) {
int[] expectedStatus = (int[]) context.getAttribute(EXPECTED_STATUS);
boolean needsRetry = executionCount <= SystemPropertiesConfig.getHttpRetries() &&
responseRetryCondition(response, expectedStatus);
if (SystemPropertiesConfig.isHttpLogRetries() && needsRetry && LOG.isWarnEnabled()) {
LOG.warn("Request retry condition met: [count={}/{}], [expected-codes={}], [retry-codes={}]",
executionCount, SystemPropertiesConfig.getHttpRetries(), expectedStatus,
httpRetriesErrorCodes);
LOG.warn("Request: {}", getRequestDetails(context));
LOG.warn("Response: {}", getResponseDetails(response));
try {
String content = EntityUtils.toString(response.getEntity());
LOG.warn("Response Body: {}", content);
} catch (IOException exc) {
LOG.warn("Failed to read the response body: {}", exc.getMessage());
}
}
return needsRetry;
}