Jose Luis López created HDFS-17957:
--------------------------------------

             Summary: 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


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]

Reply via email to