[
https://issues.apache.org/jira/browse/HDFS-17957?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]
ASF GitHub Bot updated HDFS-17957:
----------------------------------
Labels: pull-request-available (was: )
> Cleanup of leaked mini-cluster instances in tests
> -------------------------------------------------
>
> Key: HDFS-17957
> URL: https://issues.apache.org/jira/browse/HDFS-17957
> Project: Hadoop HDFS
> Issue Type: Test
> Components: test
> Reporter: Jose Luis López
> Priority: Minor
> Labels: pull-request-available
> Original Estimate: 8m
> Remaining Estimate: 8m
>
> While analyzing HDFS-17951, I found that many tests leak mini-cluster
> instances (MiniDFSCluster, MiniQJMHACluster, MiniJournalCluster,
> MiniRouterDFSCluster, MiniYARNCluster, MiniMRYarnCluster and variants).
> A static scan of the test sources — vetted by hand to remove false positives
> such as clusters owned by harnesses or torn down through wrapper objects —
> found 86 cases in ~60 files, in three categories:
> A) 27 tests create a local cluster and never shut it down on any path.
> B) 38 tests shut the cluster down only on the happy path (no finally /
> try-with-resources), so the cluster leaks exactly when the test fails.
> C) 21 classes hold a cluster in a field with no teardown in the class or
> its superclasses.
> Impact: leaks stay within the class, but a leaked cluster keeps CI resources
> under the remaining tests, and one failure can cascade into bogus failures of
> later tests in the class.
>
> There is no impact on production, only improvement for CI testing.
--
This message was sent by Atlassian Jira
(v8.20.10#820010)
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]