Hello Jason Fehr, Csaba Ringhofer, Impala Public Jenkins,
I'd like you to reexamine a change. Please visit
http://gerrit.cloudera.org:8080/24026
to look at the new patch set (#3).
Change subject: IMPALA-14776 (part 1): Auto-close manually created impala
clients
......................................................................
IMPALA-14776 (part 1): Auto-close manually created impala clients
There are several APIs in ImpalaTestSuite that tests can use to
create a new client:
- create_impala_client()
- create_impala_client_from_vector()
- create_client_for_nth_impalad()
If the tests don't close the client properly, pytest will report
a leak of a socket. It seems possible that this type of leak can
also result in leaving an unclosed session on the impalad. This can
trigger TestValidateMetrics.test_metrics_are_zero(), which has
been an issue since switching to pytest 6.2.5.
This modifies those APIs to register the clients in a list and
close them during test method teardown. That should prevent
resource leaks (sockets, sessions) associated with these clients.
The clients may have been cleaned up by other means (with-as or
try-finally or a manual close), so it is heavily relying on
close() being idempotent.
ImpalaTestSuite's built-in clients use an internal API so that
they can be reused across test methods. They instead are scoped
at the class level.
This also bundles a few other minor fixes for resource leaks of
sockets.
Testing:
- Ran a core job
Change-Id: Ib550527838a81cd2aaf69bb715080f6ac6da3786
---
M tests/common/impala_test_suite.py
M tests/hs2/test_hs2.py
M tests/statestore/test_statestore.py
3 files changed, 63 insertions(+), 16 deletions(-)
git pull ssh://gerrit.cloudera.org:29418/Impala-ASF refs/changes/26/24026/3
--
To view, visit http://gerrit.cloudera.org:8080/24026
To unsubscribe, visit http://gerrit.cloudera.org:8080/settings
Gerrit-Project: Impala-ASF
Gerrit-Branch: master
Gerrit-MessageType: newpatchset
Gerrit-Change-Id: Ib550527838a81cd2aaf69bb715080f6ac6da3786
Gerrit-Change-Number: 24026
Gerrit-PatchSet: 3
Gerrit-Owner: Joe McDonnell <[email protected]>
Gerrit-Reviewer: Csaba Ringhofer <[email protected]>
Gerrit-Reviewer: Impala Public Jenkins <[email protected]>
Gerrit-Reviewer: Jason Fehr <[email protected]>
Gerrit-Reviewer: Joe McDonnell <[email protected]>