Uploaded image for project: 'Sling'
  1. Sling
  2. SLING-11748

Improve logging output of HTTP retries in testing clients

    XMLWordPrintableJSON

Details

    Description

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

      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):

      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
      

      Proposed improvement (example from the unit test):

      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, ]
      

       

      Attachments

        Issue Links

          Activity

            People

              andrei.dulvac Andrei Dulvac
              pfaffm@adobe.com Marc Pfaff
              Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved:

                Time Tracking

                  Estimated:
                  Original Estimate - Not Specified
                  Not Specified
                  Remaining:
                  Remaining Estimate - 0h
                  0h
                  Logged:
                  Time Spent - 2.5h
                  2.5h