[
https://issues.apache.org/jira/browse/HIVE-23548?focusedWorklogId=856381&page=com.atlassian.jira.plugin.system.issuetabpanels:worklog-tabpanel#worklog-856381
]
ASF GitHub Bot logged work on HIVE-23548:
-----------------------------------------
Author: ASF GitHub Bot
Created on: 12/Apr/23 10:08
Start Date: 12/Apr/23 10:08
Worklog Time Spent: 10m
Work Description: rkirtir commented on code in PR #4214:
URL: https://github.com/apache/hive/pull/4214#discussion_r1163919706
##########
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:
Only HTTP 200 contains response body other than this there is no/empty
response body. If we do not handle this
testManualFailoverUnauthorized() method fails at
assertTrue(sendDelete(url1, false).contains("Unauthorized"));
as it tries to get "Unauthorized" string from response body
Issue Time Tracking
-------------------
Worklog Id: (was: 856381)
Time Spent: 1h (was: 50m)
> 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: 1h
> Remaining Estimate: 0h
>
--
This message was sent by Atlassian Jira
(v8.20.10#820010)