You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
a recent change used a Java 1.7+ API which results in broken tests when running on Java 1.6 or earlier:
:compileJava/home/runner/work/picocli/picocli/src/main/java/picocli/CommandLine.java:11634:
<T>emptyEnumeration() is not public in java.util.Collections;
cannot be accessed from outside package
The solution is to use Collections.enumeration(Collections.emptyList()) instead.
ManPageGeneratorTest has 3 failing tests (testEndOfOptionsWithoutOptions - line 307, testNamelessCommand line 489 and testHiddenOptions line 242), likely related to Update option rendering (fixes #1886) #1896
Java 10 on Ubuntu fails the build due to a problem in release-tasks.gradle:
> startup failed:
script '/home/runner/work/picocli/picocli/gradle/release-tasks.gradle': 1:
Can't have an abstract method in a non-abstract class.
The class '_BuildScript_' must be declared abstract or the method
'void init(java.lang.Object, org.gradle.internal.service.ServiceRegistry)' must be implemented.
@ line 1, column 1.
task bumpReadmeVersion {
This may be caused by this change in gradle/wrapper/gradle-wrapper.properties, which bumped Gradle from 7.4 to 7.6...
Temporary fix is to revert to Gradle 7.4.
Flaky tests? Broken tests on Java 10 ubuntu:
picocli.HelpAnsiTest > testUsageMainCommand_ANSI FAILED
org.junit.ComparisonFailure at HelpAnsiTest.java:442
stty: /dev/tty: No such device or address
picocli.HelpTest > testMapFieldHelp_with_unlimitedSplit FAILED
org.junit.ComparisonFailure at HelpTest.java:2926
2327 tests completed, 2 failed, 27 skipped
@remkop , In regards to the chanes made to ManPageGenerator from PR #1896, I'm currently looking at the three failed tests in ManPageGeneratorTest and I have a few questions/comments for you so that I can update the tests appropriately.
Test testEndOfOptionsWithoutOptions:
This test expects that if a command has no options, then the "options" section in the ascii doc will still get generated. Now that PR #1896 has been merged, do you still want an empty "options" section in the ascii docs to be generated, or would you like for the test to be updated to expect for that section to be missing?
For reference, here's a screenshot showing a diff of the expected ascii doc vs the ascii doc that got generated:
Tests testNamelessCommand and testHiddenOptions:
These tests are failing simply because of an extra white space in various locations or newlines that get added. Not sure if this behavior is acceptable, but I looks harmeless to me, so I'll just update the test cases to accept the extra new lines and white spaces. Based on the updates in #1896, it's not immediately obvious to me why this is now happening. Here's a screenshot of the diffs for reference.
Diff from testNamelessCommand failed test outputs. This one is when compairing main_class.adoc:
Diff from testHiddenOptions failed test output:
To try and not hold you up, I've raised PR with updated test that just accept the whatever the newly generated stuff in the ascii docs. Please see PR #1940.
Activity
[#1930] Bugfix: Ensure tests pass in environments for Java 5-18
[#1930] downgrade back to Gradle 7.4 from 7.6
[#1930] add CI task showing Gradle version
[#1930] ignore #1896 related broken tests for now
[#1930] CI test matrix add java versions 18, 19, 20ea
[#1930] remove java 20: groovy asm issue
[#1930] Update CI matrix remove java 19
[#1930] update CI: only fail LTS versions of Java
[#1930] Update CI fix syntax error
[#1930] Update CI fix syntax error
[#1930] fix syntax
[#1930] fix CI with conditionals
[#1930] fix CI continue-on-error
[#1930] codeql replace Autobuild with command
[-]Fix broken CI/CD[/-][+]Fix broken CI/CD pipeline[/+]MikeTheSnowman commentedon Jan 27, 2023
@remkop , In regards to the chanes made to
ManPageGeneratorfrom PR #1896, I'm currently looking at the three failed tests inManPageGeneratorTestand I have a few questions/comments for you so that I can update the tests appropriately.Test
testEndOfOptionsWithoutOptions:This test expects that if a command has no options, then the "options" section in the ascii doc will still get generated. Now that PR #1896 has been merged, do you still want an empty "options" section in the ascii docs to be generated, or would you like for the test to be updated to expect for that section to be missing?
For reference, here's a screenshot showing a diff of the expected ascii doc vs the ascii doc that got generated:

Tests
testNamelessCommandandtestHiddenOptions:These tests are failing simply because of an extra white space in various locations or newlines that get added. Not sure if this behavior is acceptable, but I looks harmeless to me, so I'll just update the test cases to accept the extra new lines and white spaces. Based on the updates in #1896, it's not immediately obvious to me why this is now happening. Here's a screenshot of the diffs for reference.
Diff from

testNamelessCommandfailed test outputs. This one is when compairingmain_class.adoc:Diff from

testHiddenOptionsfailed test output:To try and not hold you up, I've raised PR with updated test that just accept the whatever the newly generated stuff in the ascii docs. Please see PR #1940.
[#1930] fix failing tests for testEndOfOptionsWithoutOptions, testNam…
remkop commentedon Jan 27, 2023
@wtfacoconut Thank you for the PR! Looks good and it is merged. Many thanks!