Details
-
Bug
-
Status: Resolved
-
Minor
-
Resolution: Fixed
-
3.11
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.