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

Issue #6397: upgraded picocli to 3.9.5 #6438

Merged
merged 1 commit into from Feb 19, 2019

Conversation

Projects
None yet
2 participants
@rnveach
Copy link
Member

rnveach commented Feb 19, 2019

Issue #6397

@romani Do we have a suppression somewhere that prevented this library from being upgraded until the issue was resolved?

@@ -292,7 +292,8 @@ public void testNonExistentOutputFormat() throws Exception {
exit.checkAssertionAfterwards(() -> {
assertEquals("Unexpected output log", "", systemOut.getLog());
assertEquals("Unexpected system error log",
"Invalid value for option '-f': expected one of [xml, plain] but was 'xmlp'"
"Invalid value for option '-f': expected one of [XML, PLAIN]"
+ " (case-insensitive) but was 'xmlp'"

This comment has been minimized.

Copy link
@rnveach

rnveach Feb 19, 2019

Author Member

This was the reason for the failure.

checkAssertionAfterwards must execute before expectSystemExitWithStatus. When checkAssertionAfterwards fails it throws an AssertionException and this probably triggers another System.exit which then expectSystemExitWithStatus catches and tries to match against thinking it came from the main code.

This comment has been minimized.

Copy link
@rnveach

rnveach Feb 19, 2019

Author Member

According to ExpectedSystemExit it checks system exit before the output assertions.

This comment has been minimized.

Copy link
@rnveach

rnveach Feb 19, 2019

Author Member

@romani Somehow powermock is again interfering when the junit results in this case. Removing the powermock annotations, I get the following junit failure:

[INFO] Running com.puppycrawl.tools.checkstyle.MainTest
[ERROR] Tests run: 73, Failures: 2, Errors: 0, Skipped: 0, Time elapsed: 5.611 s <<< FAILURE! - in com.puppycrawl.tools.checkstyle.MainTest
[ERROR] testJacocoWorkaround(com.puppycrawl.tools.checkstyle.MainTest)  Time elapsed: 0.035 s  <<< FAILURE!
java.lang.AssertionError: Unexpected call of System.exit(-1).

[ERROR] testNonExistentOutputFormat(com.puppycrawl.tools.checkstyle.MainTest)  Time elapsed: 0.25 s  <<< FAILURE!
org.junit.ComparisonFailure: 
Unexpected system error log expected:<...': expected one of [[xml, plain]] but was 'xmlp'
Usa...> but was:<...': expected one of [[XML, PLAIN] (case-insensitive)] but was 'xmlp'
Usa...>
	at com.puppycrawl.tools.checkstyle.MainTest.lambda$testNonExistentOutputFormat$7(MainTest.java:294)

I can only assume powermock is trying to take this exception as it's own and mangle it in the process.

@rnveach rnveach force-pushed the rnveach:issue_6397 branch from f0904f1 to 323d8a8 Feb 19, 2019

@rnveach

This comment has been minimized.

@rnveach rnveach referenced this pull request Feb 19, 2019

Closed

Remove powermock #6439

@romani romani merged commit cb46811 into checkstyle:master Feb 19, 2019

17 checks passed

IDEA Inspections Pull Request (Checkstyle) TeamCity build finished
Details
Shippable Run 8778 status is SUCCESS.
Details
ci/circleci: build-caches Your tests passed on CircleCI!
Details
ci/circleci: pitest1 Your tests passed on CircleCI!
Details
ci/circleci: pitest2 Your tests passed on CircleCI!
Details
ci/circleci: pitest3 Your tests passed on CircleCI!
Details
ci/circleci: pitest4 Your tests passed on CircleCI!
Details
ci/circleci: pitest5 Your tests passed on CircleCI!
Details
ci/circleci: pitest6 Your tests passed on CircleCI!
Details
ci/circleci: pitest8 Your tests passed on CircleCI!
Details
codecov/patch Coverage not affected when comparing 9ae0a6f...323d8a8
Details
codecov/project 100% remains the same compared to 9ae0a6f
Details
continuous-integration/appveyor/pr AppVeyor build succeeded
Details
continuous-integration/travis-ci/pr The Travis CI build passed
Details
jenkins Build succeeded
Details
security/snyk - pom.xml (romani) No new issues
Details
wercker/build Wercker pipeline passed
Details

@rnveach rnveach deleted the rnveach:issue_6397 branch Feb 19, 2019

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.