IMPALA-14103: Fix TestAdmissionControllerStress on Python 3

TestAdmissionControllerStress has an invalid except clause
where it catches Exception as well as ImpalaHiveServer2Service.
This is an error on Python 3, because ImpalaHiveServer2Service
is not an exception class. This changes the except clause to
only cause Exception.

Testing:
 - Ran TestAdmissionControllerStress locally

Change-Id: Iefe9306cd6b76bd27ca5be1d62b05aff1e5deafe
Reviewed-on: http://gerrit.cloudera.org:8080/22954
Reviewed-by: Riza Suminto <riza.suminto@cloudera.com>
Tested-by: Joe McDonnell <joemcdonnell@cloudera.com>
This commit is contained in:
Joe McDonnell
2025-05-27 15:23:28 -07:00
parent b37f4509fa
commit 71b47dfdb4

View File

@@ -2613,7 +2613,7 @@ class TestAdmissionControllerStress(TestAdmissionControllerBase):
# try fetch and confirm from exception message that query was timed out.
client.fetch(query, query_handle, discard_results=True)
assert False
except (Exception, ImpalaHiveServer2Service) as e:
except Exception as e:
assert 'expired due to client inactivity' in str(e)
elif self.query_end_behavior == 'EOS':
# Fetch all rows so we hit eos.