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


   The tests `org.apache.struts2.json.SMDMethodInterfaceTest#testBaseClassOnly` 
and `org.apache.struts2.json.SMDMethodInterfaceTest#testInterfaces` can fail 
due to a different iteration order of `Object.getMethods()`. The failures are 
as follows:
   ```
   [ERROR] org.apache.struts2.json.SMDMethodInterfaceTest.testBaseClassOnly  
Time elapsed: 0.008 s  <<< FAILURE!
   junit.framework.ComparisonFailure: expected:<get[Z]> but was:<get[X]>
       at 
org.apache.struts2.json.SMDMethodInterfaceTest.testBaseClassOnly(SMDMethodInterfaceTest.java:136)
   
   [ERROR] org.apache.struts2.json.SMDMethodInterfaceTest.testInterfaces  Time 
elapsed: 0 s  <<< FAILURE!
   junit.framework.ComparisonFailure: expected:<get[Z]> but was:<get[X]>
       at 
org.apache.struts2.json.SMDMethodInterfaceTest.testInterfaces(SMDMethodInterfaceTest.java:155)
   ```
   
   The fix is to sort the result of `getMethods()` 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