asha-boyapati opened a new pull request, #53: URL: https://github.com/apache/openwebbeans/pull/53
### Description The test `com.intuit.karate.core.KarateHttpMockHandlerTest.testMultipleCookies` fails under environment [NonDex](https://github.com/TestingResearchIllinois/NonDex) which detects flakiness under non-deterministic usages. The potential problem is that the order of Methods returned by `GetDeclaredMethods` ([reference](https://github.com/apache/openwebbeans/blob/main/webbeans-impl/src/main/java/org/apache/webbeans/container/BeanCacheKey.java#L298)) is not deterministic. Quote from [Oracle Java 8 Doc](https://docs.oracle.com/javase/8/docs/api/java/lang/Class.html#getDeclaredMethods--): > The elements in the returned array are not sorted and are not in any particular order. ### Reproduce ``` mvn edu.illinois:nondex-maven-plugin:1.1.2:nondex \ -pl webbeans-impl \ -Dtest=org.apache.webbeans.test.annotation.binding.BeanCacheKeyUnitTest#testEquals2Annotations ``` Please see the following Continuous Integration log that shows the flakiness: https://github.com/asha-boyapati/openwebbeans/actions/runs/5041879894 This PR fixes the flaky test by removing the non-determinism in BeanCacheKey.java. Please see the following Continuous Integration log that shows that the flakiness is fixed by this change: https://github.com/asha-boyapati/openwebbeans/actions/runs/5041912235 -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: dev-unsubscr...@openwebbeans.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org