[ 
https://issues.apache.org/jira/browse/FREEMARKER-156?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17270600#comment-17270600
 ] 

Siegfried Goeschl commented on FREEMARKER-156:
----------------------------------------------

Very strange bug

* I see nothing in there which actually expects "java.io.File#canExecute()" to 
be called
* The non-deterministic appearance makes me think it has something to do with 
JMockit
* Stepwise increase of JMockit version from 1.32 to 1.40 shows interesting 
other errors
* I settled for JMockit 1.40 to avoid updating the tests due to incompatible 
JMockit changes
* I bumped the library version as well, e.g. TestNG version was ancient

Tests are working on the command line but the spurious bug is still happening. 
Moreover starting the tests in IntelliJ fails - not good

I revert locally to JMockit 1.32 but 16 out of 32 tests are failing on the 
command line - with the updated versions of the other dependencies.

Overall felling is that the tests are brittle - thinking of 

* Migrating to JUnit and ditch TestNG
* Replace JMockit with Mockito or better avoid mocking altogether 

> [freemarker-generator] The Maven plugin unit tests failed randomly
> ------------------------------------------------------------------
>
>                 Key: FREEMARKER-156
>                 URL: https://issues.apache.org/jira/browse/FREEMARKER-156
>             Project: Apache Freemarker
>          Issue Type: Task
>            Reporter: Siegfried Goeschl
>            Assignee: Siegfried Goeschl
>            Priority: Major
>
> * For unknown reasons the unit test fail since the mocked execution misses an 
> invocation of "File#canExecute".
> * In addition the tests dump ugly stack traces :(



--
This message was sent by Atlassian Jira
(v8.3.4#803005)

Reply via email to