You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@openwebbeans.apache.org by GitBox <gi...@apache.org> on 2022/10/28 04:27:35 UTC

[GitHub] [openwebbeans] tt0suzy opened a new pull request, #45: Fixed non determininstic(flaky) tests in BeanCacheKeyUnitTest.java

tt0suzy opened a new pull request, #45:
URL: https://github.com/apache/openwebbeans/pull/45

   Hi,
   I am from the Software Testing research group at the University of Illinois. We want to inform that the tests org.apache.webbeans.test.annotation.binding.BeanCacheKeyUnitTest.testEquals2Annotations and
   org.apache.webbeans.test.annotation.binding.BeanCacheKeyUnitTest.testEquals2AnnotationsUnorderedParam are non deterministic. The non determinism has been discovered using the NonDex tool for catching non-deterministic/flaky tests (https://github.com/TestingResearchIllinois/NonDex).
   
   You may reproduce the non deterministic behavior using the following steps:
   
   - Clone the repo and cd into it.
   - mvn install -am -pl webbeans-impl -DskipTests
   - mvn -pl webbeans-impl test 
   -Dtest=org.apache.webbeans.test.annotation.binding.BeanCacheKeyUnitTest#testEquals2Annotations 
   - Confirm that the test passes as is.
   mvn -pl webbeans-impl edu.illinois:nondex-maven-plugin:1.1.2:nondex 
   -Dtest=rg.apache.webbeans.test.annotation.binding.BeanCacheKeyUnitTest#testEquals2Annotations  
   - This will run the NonDex tool on the test. You will find the test fails.
   
   Proposed fix:
   As you have indicated in line 298 of BeanCacheKey.java, the order of list members are actually non determininstic because the nature of getDeclaredMethods(). I wrote a simple comparator that simply compares the describing string of the Method object, and sort the array based on that to make the order determininstic


-- 
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-unsubscribe@openwebbeans.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [openwebbeans] rmannibucau commented on pull request #45: Fixed non determininstic(flaky) tests in BeanCacheKeyUnitTest.java

Posted by GitBox <gi...@apache.org>.
rmannibucau commented on PR #45:
URL: https://github.com/apache/openwebbeans/pull/45#issuecomment-1294521925

   Hi @tt0suzy , AFAIK the order is deterministic _per run_ so code is fine and we don't need the overhead of the sort at runtime.


-- 
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-unsubscribe@openwebbeans.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [openwebbeans] tt0suzy closed pull request #45: Fixed non determininstic(flaky) tests in BeanCacheKeyUnitTest.java

Posted by GitBox <gi...@apache.org>.
tt0suzy closed pull request #45: Fixed non determininstic(flaky) tests in BeanCacheKeyUnitTest.java
URL: https://github.com/apache/openwebbeans/pull/45


-- 
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-unsubscribe@openwebbeans.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org