Uploaded image for project: 'Commons Lang'
  1. Commons Lang
  2. LANG-1612

testGetAllFields and testGetFieldsWithAnnotation sometimes fail

    XMLWordPrintableJSON

Details

    Description

      The testGetAllFields() and testGetFieldsWithAnnotation() functions in FieldUtilsTest are flaky because they contain assertArraysEquals() on two arrays that may not be exactly equal. The arrays are guaranteed to contain the exact same elements, but the elements may be ordered differently, causing the assertion to sometimes fail.

      More specifically, FieldUtils.getAllFields() does not necessarily return an array in the order that the current tests assume.

      Github PR: https://github.com/apache/commons-lang/pull/640 

      Attachments

        Activity

          People

            Unassigned Unassigned
            xint5 XinT
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:

              Time Tracking

                Estimated:
                Original Estimate - Not Specified
                Not Specified
                Remaining:
                Remaining Estimate - 0h
                0h
                Logged:
                Time Spent - 40m
                40m