[ 
https://issues.apache.org/jira/browse/LANG-1612?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

XinT updated LANG-1612:
-----------------------
    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 

  was:
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.

 


> testGetAllFields and testGetFieldsWithAnnotation are flaky
> ----------------------------------------------------------
>
>                 Key: LANG-1612
>                 URL: https://issues.apache.org/jira/browse/LANG-1612
>             Project: Commons Lang
>          Issue Type: Bug
>          Components: lang.reflect.*
>    Affects Versions: 3.11
>            Reporter: XinT
>            Priority: Minor
>              Labels: pull-request-available, test
>          Time Spent: 10m
>  Remaining Estimate: 0h
>
> 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 



--
This message was sent by Atlassian Jira
(v8.3.4#803005)

Reply via email to