Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Test failure in CommandlineTest#testExecuteBinaryOnPath with Maven 3.5.4 or later #50

Merged
merged 2 commits into from Dec 1, 2018
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
Expand Up @@ -103,7 +103,7 @@ public void testExecuteBinaryOnPath()
assertTrue( out.contains( "Apache Maven" ) );
assertTrue( out.contains( "Maven home:" ) );
assertTrue( out.contains( "Java version:" ) );
assertTrue( out.contains( "Java home:" ) );
assertTrue( out.contains( "OS name:" ) );
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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)

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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).

}
catch ( Exception e )
{
Expand Down