You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@jackrabbit.apache.org by GitBox <gi...@apache.org> on 2021/12/08 11:32:24 UTC

[GitHub] [jackrabbit-oak] LeoYimingLi opened a new pull request #433: Fix 4 flaky tests by using LinkedHashSet

LeoYimingLi opened a new pull request #433:
URL: https://github.com/apache/jackrabbit-oak/pull/433


   - Related 4 flaky tests:
     - org.apache.jackrabbit.oak.plugins.document.ClusterViewTest#testOneActiveSeveralInactive
    
     - org.apache.jackrabbit.oak.plugins.document.ClusterViewTest#testSeveralActiveOneInactive
    
     - org.apache.jackrabbit.oak.plugins.document.ClusterViewTest#testWithRecoveringAndBacklog
    
     - org.apache.jackrabbit.oak.plugins.document.ClusterViewTest#testWithRecoveringOnly
    
   - The flakiness is due to the nondeterministic iterative order of ```HashSet```
   
   - This proposed method is changing ```HashSet``` to ```LinkedHashSet``` to keep the order deterministic.    
   
   More Information
   - Version of ```jackrabbit-oak```
     SHA: 08eab301c869c227d8721da0e9b9bd3d2029d458
   
   - JVM version
     > openjdk version "1.8.0_292"
   OpenJDK Runtime Environment (build 1.8.0_292-8u292-b10-0ubuntu1~18.04-b10)
   OpenJDK 64-Bit Server VM (build 25.292-b10, mixed mode)
   
   - The way to reproduce the flaky test failure (using the test ```org.apache.jackrabbit.oak.plugins.document.ClusterViewTest#testOneActiveSeveralInactive``` as example)
     - 0.Environment setup: Maven 3.6.0 and Java 1.8.0_292
     - 1.clone the repo:
     ```
     git clone https://github.com/apache/jackrabbit-oak
     cd jackrabbit-oak
     git checkout 08eab301c869c227d8721da0e9b9bd3d2029d458
     ```
     - 2.run with [Nondex tool](https://github.com/TestingResearchIllinois/NonDex) (which explores different behaviors of under-determined APIs and reports test failures)
     ```
     mvn install -pl core -am -DskipTests
     mvn -pl core edu.illinois:nondex-maven-plugin:1.1.2:nondex -Dtest=org.apache.jackrabbit.oak.plugins.document.ClusterViewTest#testOneActiveSeveralInactive
     ```
     - 3.And we can get the test failure screenshot:
   ![image](https://user-images.githubusercontent.com/46290389/145200735-32b51ff6-d5f4-408a-961e-4e186796ac15.png)
   
     - 4.about the code trace:
     ```
     mvn -pl core edu.illinois:nondex-maven-plugin:1.1.2:debug -Dtest=org.apache.jackrabbit.oak.plugins.document.ClusterViewTest#testOneActiveSeveralInactive
     ```
     we can get the code trace result
   ![image](https://user-images.githubusercontent.com/46290389/145200761-17bfed55-59c5-4f83-8ab8-dd99cae8cc12.png)
   


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

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



[GitHub] [jackrabbit-oak] LeoYimingLi commented on pull request #433: OAK-9644 Fix 4 flaky tests by using LinkedHashSet

Posted by GitBox <gi...@apache.org>.
LeoYimingLi commented on pull request #433:
URL: https://github.com/apache/jackrabbit-oak/pull/433#issuecomment-998042922


   merged at https://github.com/apache/jackrabbit-oak/pull/442


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

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



[GitHub] [jackrabbit-oak] LeoYimingLi commented on pull request #433: Fix 4 flaky tests by using LinkedHashSet

Posted by GitBox <gi...@apache.org>.
LeoYimingLi commented on pull request #433:
URL: https://github.com/apache/jackrabbit-oak/pull/433#issuecomment-991155312


   wow, awesome! I try this method and test it,  it works :))
   the tentative PR: https://github.com/LeoYimingLi/jackrabbit-oak/pull/6/files


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

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



[GitHub] [jackrabbit-oak] LeoYimingLi commented on pull request #433: Fix 4 flaky tests by using LinkedHashSet

Posted by GitBox <gi...@apache.org>.
LeoYimingLi commented on pull request #433:
URL: https://github.com/apache/jackrabbit-oak/pull/433#issuecomment-995499944


   Gotcha. the JIRA issue link: https://issues.apache.org/jira/browse/OAK-9644
   Thanks : )


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

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



[GitHub] [jackrabbit-oak] mreutegg commented on pull request #433: Fix 4 flaky tests by using LinkedHashSet

Posted by GitBox <gi...@apache.org>.
mreutegg commented on pull request #433:
URL: https://github.com/apache/jackrabbit-oak/pull/433#issuecomment-993238602


   Good to hear it works. Can you please create a JIRA issue for this problem at https://issues.apache.org/jira/browse/OAK and reference the PR? I can then take it from there. Thanks.


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

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



[GitHub] [jackrabbit-oak] mreutegg commented on pull request #433: Fix 4 flaky tests by using LinkedHashSet

Posted by GitBox <gi...@apache.org>.
mreutegg commented on pull request #433:
URL: https://github.com/apache/jackrabbit-oak/pull/433#issuecomment-989601001


   Thanks for reporting. As indicated in the title of this PR the problem is rather with the test. I think it assumes that the clusterIds are in a certain order. At least the contract for the methods changed in this PR is quite clear that a returned Set is not ordered. Therefore I think this should be fixed differently.


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

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



[GitHub] [jackrabbit-oak] LeoYimingLi closed pull request #433: OAK-9644 Fix 4 flaky tests by using LinkedHashSet

Posted by GitBox <gi...@apache.org>.
LeoYimingLi closed pull request #433:
URL: https://github.com/apache/jackrabbit-oak/pull/433


   


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

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