Uploaded image for project: 'HBase'
  1. HBase
  2. HBASE-25370

Fix flaky test TestClassFinder#testClassFinderDefaultsToOwnPackage

VotersWatch issueWatchersCreate sub-taskLinkCloneUpdate Comment AuthorReplace String in CommentUpdate Comment VisibilityDelete Comments
    XMLWordPrintableJSON

    Details

      Description

      The test TestClassFinder#testClassFinderDefaultsToOwnPackage compares two sets from allClassesFinder.findClasses. However, the function allClassesFinder.findClasses does not return the deterministic order result. From code trace, the root cause is at ClassFinder.findClassesFromJar and ClassFinder.findClassesFromFiles. They use HashSet to store classes and listFiles to get file array. However, HashSet and listFiles do not guarantee that order, and the assertion can fail if the order differs.

        Attachments

          Activity

            People

            • Assignee:
              hsiang Adam Wang
              Reporter:
              hsiang Adam Wang

              Dates

              • Created:
                Updated:
                Resolved:

                Issue deployment