Yilinwang opened a new pull request #458:
URL: https://github.com/apache/struts/pull/458


   The tests 
`com.opensymphony.xwork2.validator.AnnotationActionValidatorManagerTest.testGetValidatorsForInterface`
 and 
`com.opensymphony.xwork2.validator.AnnotationActionValidatorManagerTest.testSkipUserMarkerActionLevelShortCircuit`
 can fail due to a different iteration order of `Object.getAnnotations()`. The 
failures are as follows:
   
   ```
   [ERROR]   
AnnotationActionValidatorManagerTest.testGetValidatorsForInterface:157
   [ERROR]   FreemarkerResultMockedTest.testDynamicAttributesSupport:130 
expected:<... value="" id="test" [foo="bar" placeholder="input]"/><input 
type="text...> but was:<... value="" id="test" [placeholder="input" 
foo="bar]"/><input type="text...>  
   
   [ERROR] 
com.opensymphony.xwork2.validator.AnnotationActionValidatorManagerTest.testSkipUserMarkerActionLevelShortCircuit
  Time elapsed: 0.033 s  <<< FAILURE!
   junit.framework.AssertionFailedError: expected:<1> but was:<2>
       at 
com.opensymphony.xwork2.validator.AnnotationActionValidatorManagerTest.testSkipUserMarkerActionLevelShortCircuit(AnnotationActionValidatorManagerTest.java:307)
   ```
   
   The fix is to sort the result of `getAnnotations()` so that the iteration 
order remains stable and the failure will not occur any more. In this way, the 
test will be more stable.


----------------------------------------------------------------
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.

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



---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscr...@struts.apache.org
For additional commands, e-mail: dev-h...@struts.apache.org

Reply via email to