You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@struts.apache.org by GitBox <gi...@apache.org> on 2020/12/12 17:33:52 UTC

[GitHub] [struts] JCgH4164838Gh792C124B5 commented on pull request #457: Fix json validation interceptor test

JCgH4164838Gh792C124B5 commented on pull request #457:
URL: https://github.com/apache/struts/pull/457#issuecomment-743788703


   Hi @Troy-Peng-97 .
   
   Were you able to cause the `testValidationFails()` to fail during a unit test execution ?  If so, how frequently can you cause the failure to happen ?   (I tried re-running the test several times with no failures).
   
   Could you indicate what Java JDK Type / JDK version / OS combination you were using when you saw the test failure ?
   
   The `TestUtils.normalize()` method does not appear to capable of changing string content order, unless `Matcher` is doing something weird.  As @yasserzamani mentioned, only "whitespace" characters should be impacted.
   
   If the test is occasionally failing, it could mean the _validator annotations_ for the `setText()` are sometimes being executed in a different order than they are declared (or ending up with a result "as if" they were executed in a different order).
   
   It definitely seems weird, given the conditions.  If `testValidationFails()` is failing randomly, it could point to an intermittent issue somewhere else.  If possible, that should be confirmed before changing the unit test, just to make sure it is the unit test that has the problem (and not code elsewhere).  :smile:


----------------------------------------------------------------
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:
users@infra.apache.org