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

EclipseCheckstyleProjectConfigurationTest failure #229

Closed
vorburger opened this issue Feb 8, 2020 · 1 comment · Fixed by #230
Closed

EclipseCheckstyleProjectConfigurationTest failure #229

vorburger opened this issue Feb 8, 2020 · 1 comment · Fixed by #230

Comments

@vorburger
Copy link
Member

Following the resolution of #227, the build now fails due to a EclipseCheckstyleProjectConfigurationTest failure:

[INFO] --- tycho-surefire-plugin:1.5.1:test (default-test) @ com.basistech.m2e.code.quality.checkstyle.test ---

[INFO] Expected eclipse log file: /home/travis/build/m2e-code-quality/m2e-code-quality/com.basistech.m2e.code.quality.checkstyle.test/target/work/data/.metadata/.log

[INFO] Command line:

	[/usr/lib/jvm/java-8-openjdk-amd64/jre/bin/java, -Dosgi.noShutdown=false, -Dosgi.os=linux, -Dosgi.ws=gtk, -Dosgi.arch=x86_64, -Dosgi.clean=true, -jar, /home/travis/.m2/repository/p2/osgi/bundle/org.eclipse.equinox.launcher/1.5.0.v20180512-1130/org.eclipse.equinox.launcher-1.5.0.v20180512-1130.jar, -data, /home/travis/build/m2e-code-quality/m2e-code-quality/com.basistech.m2e.code.quality.checkstyle.test/target/work/data, -install, /home/travis/build/m2e-code-quality/m2e-code-quality/com.basistech.m2e.code.quality.checkstyle.test/target/work, -configuration, /home/travis/build/m2e-code-quality/m2e-code-quality/com.basistech.m2e.code.quality.checkstyle.test/target/work/configuration, -application, org.eclipse.tycho.surefire.osgibooter.uitest, -testproperties, /home/travis/build/m2e-code-quality/m2e-code-quality/com.basistech.m2e.code.quality.checkstyle.test/target/surefire.properties, -timeout, 7200000]

** (java:4682): WARNING **: Error retrieving accessibility bus address: org.freedesktop.DBus.Error.ServiceUnknown: The name org.a11y.Bus was not provided by any .service files

Running com.basistech.m2e.code.quality.checkstyle.test.CheckstyleUtilTest

Tests run: 1, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 0.134 s - in com.basistech.m2e.code.quality.checkstyle.test.CheckstyleUtilTest

testAntToCheckstyleConversion(com.basistech.m2e.code.quality.checkstyle.test.CheckstyleUtilTest)  Time elapsed: 0.099 s

Running com.basistech.m2e.code.quality.checkstyle.test.EclipseCheckstyleProjectConfigurationTest

SLF4J: Failed to load class "org.slf4j.impl.StaticLoggerBinder".

SLF4J: Defaulting to no-operation (NOP) logger implementation

SLF4J: See http://www.slf4j.org/codes.html#StaticLoggerBinder for further details.

TEST-SETUP: testCheckstyleMultipleExecutionsSkipAll

TEST-SETUP: testCheckstyleMultipleExecutionsSkipOne

TEST-SETUP: testCheckstyleCheck

TEST-SETUP: testCheckstyleMultipleExecutions

TEST-SETUP: testCheckstylePresent

TEST-SETUP: testCheckstyleSkip

TEST-SETUP: testCheckstyleReconfigureReactivate

TEST-SETUP: testCheckstyleReconfigureSkip

Tests run: 8, Failures: 1, Errors: 0, Skipped: 0, Time elapsed: 31.583 s <<< FAILURE! - in com.basistech.m2e.code.quality.checkstyle.test.EclipseCheckstyleProjectConfigurationTest

testCheckstyleMultipleExecutionsSkipAll(com.basistech.m2e.code.quality.checkstyle.test.EclipseCheckstyleProjectConfigurationTest)  Time elapsed: 15.404 s

testCheckstyleMultipleExecutionsSkipOne(com.basistech.m2e.code.quality.checkstyle.test.EclipseCheckstyleProjectConfigurationTest)  Time elapsed: 1.372 s

testCheckstyleCheck(com.basistech.m2e.code.quality.checkstyle.test.EclipseCheckstyleProjectConfigurationTest)  Time elapsed: 2.107 s  <<< FAILURE!

junit.framework.AssertionFailedError

	at com.basistech.m2e.code.quality.checkstyle.test.EclipseCheckstyleProjectConfigurationTest.testCheckstyleCheck(EclipseCheckstyleProjectConfigurationTest.java:37)

testCheckstyleMultipleExecutions(com.basistech.m2e.code.quality.checkstyle.test.EclipseCheckstyleProjectConfigurationTest)  Time elapsed: 1.775 s

testCheckstylePresent(com.basistech.m2e.code.quality.checkstyle.test.EclipseCheckstyleProjectConfigurationTest)  Time elapsed: 1.63 s

testCheckstyleSkip(com.basistech.m2e.code.quality.checkstyle.test.EclipseCheckstyleProjectConfigurationTest)  Time elapsed: 1.739 s

testCheckstyleReconfigureReactivate(com.basistech.m2e.code.quality.checkstyle.test.EclipseCheckstyleProjectConfigurationTest)  Time elapsed: 3.3 s

testCheckstyleReconfigureSkip(com.basistech.m2e.code.quality.checkstyle.test.EclipseCheckstyleProjectConfigurationTest)  Time elapsed: 2.502 s

Running com.basistech.m2e.code.quality.checkstyle.test.SimpleTest

Tests run: 1, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 0.001 s - in com.basistech.m2e.code.quality.checkstyle.test.SimpleTest

test(com.basistech.m2e.code.quality.checkstyle.test.SimpleTest)  Time elapsed: 0 s

Results:

Failures: 

  EclipseCheckstyleProjectConfigurationTest>AbstractMavenProjectTestCase.runTest:611->testCheckstyleCheck:37->AbstractMavenProjectConfiguratorTestCase.importProjectRunBuildAndFindMarkers:72->AbstractMavenProjectConfiguratorTestCase.importProjectRunBuildAndFindMarkers:79->AbstractMavenProjectConfiguratorTestCase.runBuildAndAssertMarkers:91->AbstractMavenProjectConfiguratorTestCase.assertMarkers:115

Tests run: 10, Failures: 1, Errors: 0, Skipped: 0

Is anyone who's using this project interested in contributing a fix for this? (I won't be able to.)

@adangel
Copy link
Member

adangel commented Feb 10, 2020

I'm looking into this.

Here's the error message from the test workspace:

!ENTRY net.sf.eclipsecs.core 4 0 2020-02-10 20:41:48.479
!MESSAGE Checkstyle-Plugin: cannot initialize module TreeWalker - TreeWalker is not allowed as a parent of LineLength Please review 'Parent Module' section for this Check in web documentation if Check is standard.
!STACK 0
com.puppycrawl.tools.checkstyle.api.CheckstyleException: cannot initialize module TreeWalker - TreeWalker is not allowed as a parent of LineLength Please review 'Parent Module' section for this Check in web documentation if Check is standard.
	at com.puppycrawl.tools.checkstyle.Checker.setupChild(Checker.java:473)
	at com.puppycrawl.tools.checkstyle.api.AutomaticBean.configure(AutomaticBean.java:198)
...

It seems, we are running the latest checkstyle plugin 8.29.0. The test projects use the default maven configurations and use version 3.0.0 - which ships with checkstyle 8.19. And we use the default checkstyle ruleset sun_checks.xml - which is incompatible with 8.29.0 (actually since 8.24.0).

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 a pull request may close this issue.

2 participants