Skip to content

Comments

fix flaky test: testObserverMethodsInParentOfAlternativeAndSpecializedBeans#1

Open
ljmcr wants to merge 1 commit intomainfrom
fix-flaky-1
Open

fix flaky test: testObserverMethodsInParentOfAlternativeAndSpecializedBeans#1
ljmcr wants to merge 1 commit intomainfrom
fix-flaky-1

Conversation

@ljmcr
Copy link
Owner

@ljmcr ljmcr commented Sep 4, 2024

Running command:
mvn -pl webbeans-impl edu.illinois:nondex-maven-plugin:2.1.7:nondex -Dtest=org.apache.webbeans.test.specalization.observer.pub.PublicObserverTest#testObserverMethodsInParentOfAlternativeAndSpecializedBeans -DnondexRuns=10

Original error:
捕获
error stack trace:
捕获1
Specific line of code: Line 172 at SpecializationUtil.java:
捕获3

  1. What I am trying to do:
    Adding a hashset to store all the elements that should be remove in beanAttributeMap, and remove all those elements in the
    set together after looping through the whole map. This will avoid removing elements while looping with iteratorm, which
    may cause IndexOutOfBoundException or ConcurrentModificationException when doing parallel programming .
  2. I used hashset to store the elements since the hashset is better on adding/deleting elements compare to ArrayList, which will
    help reduce the time complexity.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant