You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@commons.apache.org by "Gary D. Gregory (Jira)" <ji...@apache.org> on 2020/11/15 17:21:00 UTC

[jira] [Updated] (LANG-1612) testGetAllFields and testGetFieldsWithAnnotation sometimes fail

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

Gary D. Gregory updated LANG-1612:
----------------------------------
    Summary: testGetAllFields and testGetFieldsWithAnnotation sometimes fail  (was: testGetAllFields and testGetFieldsWithAnnotation are flaky)

> testGetAllFields and testGetFieldsWithAnnotation sometimes fail
> ---------------------------------------------------------------
>
>                 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)