jmeter-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From artem-fedorov <...@git.apache.org>
Subject [GitHub] jmeter pull request #429: Fix 62887. Customized SampleLabel is ignored and o...
Date Tue, 13 Nov 2018 08:32:11 GMT
Github user artem-fedorov commented on a diff in the pull request:

    https://github.com/apache/jmeter/pull/429#discussion_r232936723
  
    --- Diff: bin/testfiles/TEST_HTTP_HttpClient4.xml ---
    @@ -144,7 +144,7 @@
       <httpSample s="true" lb="HR-FollowRedirect-18" rc="302" dt="text"/>
       <httpSample s="true" lb="HR-FollowRedirect-19" rc="302" dt="text"/>
       <httpSample s="true" lb="HR-FollowRedirect-20" rc="302" dt="text"/>
    -  <httpSample s="false" lb="HR-FollowRedirect-21" rc="Non HTTP response code: java.io.IOException"
dt="text"/>
    --- End diff --
    
    If you expect `HR-FollowRedirect-21` here we can  fix it using this small hack:
    ```
    if (redirect >= MAX_REDIRECTS) {
                lastRes = errorResult(new IOException("Exceeded maximum number of redirects:
" + MAX_REDIRECTS), new HTTPSampleResult(lastRes));
                lastRes.setSampleLabel(totalRes.getSampleLabel()); // use parent label 
                totalRes.addSubResult(lastRes);
    }
    ```


---

Mime
View raw message