JCgH4164838Gh792C124B5 commented on pull request #457: URL: https://github.com/apache/struts/pull/457#issuecomment-748517389
Hi @Troy-Peng-97 . Thanks for replying with the additional information. 😃 From your last reply, it looks like the test `testValidationFails()` is only actually failing when you are running it using the NonDex tool, correct ? I tried out NonDex briefly (_thanks for providing the reference link to the project_), and if I understand correctly, that tool creates instrumented versions of classes and uses those to change the order-of-execution. So the `testValidationFails()` is only failing when NonDex instruments it, and not when running the standard build for Struts2 Core, correct ? Assuming the standard build does not appear to fail after repeated-runs (only failing when running NonDex instrumentation), whether the test is really flaky or not may depend on how the ordering of the annotations is handled by a particular JVM. It seems that the processing ordering must be pretty stable, otherwise we would expect the test to fail randomly, even without NonDex instrumentation involved. Internet searches did not uncover an absolute answer concerning annotation ordering (in terms of execution or values returned by `getAnnotations()`). There may be an implicit order that works most of the time, but it seems it may not be explicitly guaranteed by any specification. Given what you reported, and the discussion so far, updating this particular test to not depend on a particular ordering of the annotation result probably makes some sense. If anyone thinks otherwise, they can add a comment ? ---------------------------------------------------------------- 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: [email protected]
