You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@sling.apache.org by "Marc Pfaff (Jira)" <ji...@apache.org> on 2023/01/11 08:42:00 UTC

[jira] [Created] (SLING-11748) Improve logging output of HTTP retries in testing clients

Marc Pfaff created SLING-11748:
----------------------------------

             Summary: Improve logging output of HTTP retries in testing clients
                 Key: SLING-11748
                 URL: https://issues.apache.org/jira/browse/SLING-11748
             Project: Sling
          Issue Type: Improvement
          Components: Apache Sling Testing Clients
    Affects Versions: Apache Sling Testing Clients 3.0.16
            Reporter: Marc Pfaff


The ServerErrorRetryStrategy used in the testing clients logs when a retry condition is met. I

I propose to improve this output with more request/response details and retry condition details, in order to help troubleshooting test failures. 

Current output (example from the unit test):
{code:java}
Request retry needed due to service unavailable response
Response headers contained:
Header Date:Wed, 11 Jan 2023 08:36:43 GMT
Header Server:TEST/1.1
Header Content-Length:8
Header Content-Type:text/plain; charset=ISO-8859-1
Header Connection:Keep-Alive
Response content: TEST_NOK
{code}
Proposed improvement (example from the unit test):
{code:java}
Request retry condition met: [count=1/4], [expected-codes=[200]], [retry-codes=[500, 503]]
Request: GET /test/internalerror/resource HTTP/1.1 [Host: 127.0.0.1:32953, Connection: Keep-Alive, User-Agent: Java, Accept-Encoding: gzip,deflate, Authorization: Basic dXNlcjpwYXNz]
Response: HTTP/1.1 500 Internal Server Error [Date: Wed, 11 Jan 2023 08:39:59 GMT, Server: TEST/1.1, Content-Length: 8, Content-Type: text/plain; charset=ISO-8859-1, Connection: Keep-Alive, ]
{code}
 



--
This message was sent by Atlassian Jira
(v8.20.10#820010)