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

Conversation

belingueres
Copy link
Contributor

@belingueres belingueres commented Nov 30, 2018

Solved #48: Changed text to assert by "OS name:", which appears in both 3.5.x Maven
versions and Maven 3.6.0.

Changed text to assert by "OS name:", which appears in both 3.5.x Maven
versions and Maven 3.6.0.
@belingueres belingueres changed the title Solved issue #48. Test failure in CommandlineTest#testExecuteBinaryOnPath with Maven 3.5.4 or later Nov 30, 2018
@@ -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).

@rfscholte rfscholte merged commit 7143d9b into codehaus-plexus:master Dec 1, 2018
@hboutemy hboutemy added this to the 3.1.1 milestone Mar 10, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants