[ 
https://issues.apache.org/jira/browse/HIVE-23548?focusedWorklogId=856353&page=com.atlassian.jira.plugin.system.issuetabpanels:worklog-tabpanel#worklog-856353
 ]

ASF GitHub Bot logged work on HIVE-23548:
-----------------------------------------

                Author: ASF GitHub Bot
            Created on: 12/Apr/23 08:00
            Start Date: 12/Apr/23 08:00
    Worklog Time Spent: 10m 
      Work Description: veghlaci05 commented on code in PR #4214:
URL: https://github.com/apache/hive/pull/4214#discussion_r1163767143


##########
itests/hive-unit/src/test/java/org/apache/hive/jdbc/TestActivePassiveHA.java:
##########
@@ -665,7 +666,18 @@ private String sendAuthMethod(HttpRequestBase method, 
boolean enableAuth, boolea
 
       httpResponse = client.execute(method);
 
-      return EntityUtils.toString(httpResponse.getEntity());
+      if (httpResponse != null) {
+        StatusLine statusLine = httpResponse.getStatusLine();
+        if (statusLine != null) {
+           response = httpResponse.getStatusLine().getReasonPhrase();
+           statusCode = httpResponse.getStatusLine().getStatusCode();
+          if (statusCode == 200) {
+            return EntityUtils.toString(httpResponse.getEntity());
+          }

Review Comment:
   Why this is needed only for HTTP 200? For any other response code this 
function will return `response`, which is actually 
`httpResponse.getStatusLine().getReasonPhrase()`. I don't get why this is 
needed.





Issue Time Tracking
-------------------

    Worklog Id:     (was: 856353)
    Time Spent: 50m  (was: 40m)

> TestActivePassiveHA is unstable
> -------------------------------
>
>                 Key: HIVE-23548
>                 URL: https://issues.apache.org/jira/browse/HIVE-23548
>             Project: Hive
>          Issue Type: Sub-task
>            Reporter: Zoltan Haindrich
>            Assignee: KIRTI RUGE
>            Priority: Major
>              Labels: pull-request-available
>          Time Spent: 50m
>  Remaining Estimate: 0h
>




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

Reply via email to