Test failure in CommandlineTest#testExecuteBinaryOnPath with Maven 3.5.4 or later#50
Conversation
Changed text to assert by "OS name:", which appears in both 3.5.x Maven versions and Maven 3.6.0.
| assertTrue( out.contains( "Maven home:" ) ); | ||
| assertTrue( out.contains( "Java version:" ) ); | ||
| assertTrue( out.contains( "Java home:" ) ); | ||
| assertTrue( out.contains( "OS name:" ) ); |
There was a problem hiding this comment.
This will only work if there's an enforcer-rule to require Maven 3.5.4 to build this project, not really nice. Better make an if/else based on the Maven version (or remove the assertion, not sure what it is trying to prove)
There was a problem hiding this comment.
It was just a quick fix to make it work in both 3.5.3 and 3.5.4. Not sure either if it is trying to execute any given script or actually succeed executing the "mvn" script. There is plenty of assertions that prove the command returned the expected result, so removing the last assertion should prove it too. Unfortunately, the test executes "mvn -version", so its result actually depends on the build tool version it is used to run the test (an undesirable side effect IMHO).
Solved #48: Changed text to assert by "OS name:", which appears in both 3.5.x Maven
versions and Maven 3.6.0.