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

Upgrade to latest checkstyle library results in test failures #76

Open
romani opened this issue Apr 30, 2023 · 0 comments
Open

Upgrade to latest checkstyle library results in test failures #76

romani opened this issue Apr 30, 2023 · 0 comments

Comments

@romani
Copy link
Member

romani commented Apr 30, 2023

update to 10.10.0

[INFO] --- maven-surefire-plugin:2.12.4:test (default-test) @ methods-distance ---
[INFO] Surefire report directory: /home/rivanov/java/github/sevntu-checkstyle
  /methods-distance/methods-distance/target/surefire-reports

-------------------------------------------------------
 T E S T S
-------------------------------------------------------
Running com.github.sevntu.checkstyle.domain.MethodDefinitionTest
Tests run: 2, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 0.412 sec
Running com.github.sevntu.checkstyle.domain.MethodOrderTest
Tests run: 13, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 0.205 sec
Running com.github.sevntu.checkstyle.domain.ClassDefinitionTest
Tests run: 1, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 0.006 sec
Running com.github.sevntu.checkstyle.domain.MethodOrderReorderTest
Tests run: 1, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 0.027 sec
Running com.github.sevntu.checkstyle.analysis.MethodCallDependencyCheckstyleModuleTest
Tests run: 14, Failures: 0, Errors: 1, Skipped: 1, Time elapsed: 0.182 sec <<< FAILURE!
testMethodSignatures(com.github.sevntu.checkstyle.analysis
  .MethodCallDependencyCheckstyleModuleTest)  Time elapsed: 0.032 sec  <<< ERROR!
java.lang.IllegalStateException: Duplicate key m(int) (attempted merging values m(int) and m(int))
	at java.base/java.util.stream.Collectors.duplicateKeyException(Collectors.java:133)
	at java.base/java.util.stream.Collectors.lambda$uniqKeysMapAccumulator$1(Collectors.java:180)
	at java.base/java.util.stream.ReduceOps$3ReducingSink.accept(ReduceOps.java:169)
	at java.base/java.util.ArrayList$ArrayListSpliterator.forEachRemaining(ArrayList.java:1655)
	at java.base/java.util.stream.AbstractPipeline.copyInto(AbstractPipeline.java:484)
	at java.base/java.util.stream.AbstractPipeline.wrapAndCopyInto(AbstractPipeline.java:474)
	at java.base/java.util.stream.ReduceOps$ReduceOp.evaluateSequential(ReduceOps.java:913)
	at java.base/java.util.stream.AbstractPipeline.evaluate(AbstractPipeline.java:234)
	at java.base/java.util.stream.ReferencePipeline.collect(ReferencePipeline.java:578)
	at com.github.sevntu.checkstyle.ordering.MethodOrder.getAllMethods(MethodOrder.java:326)
	at com.github.sevntu.checkstyle.ordering.MethodOrder.<init>(MethodOrder.java:61)
	at com.github.sevntu.checkstyle.analysis.MethodCallDependenciesModuleTestSupport.invokeCheckAndGetOrdering(MethodCallDependenciesModuleTestSupport.java:63)
	at com.github.sevntu.checkstyle.analysis.MethodCallDependenciesModuleTestSupport.verifyInfo(MethodCallDependenciesModuleTestSupport.java:51)
	at com.github.sevntu.checkstyle.analysis.MethodCallDependencyCheckstyleModuleTest.testMethodSignatures(MethodCallDependencyCheckstyleModuleTest.java:124)
	at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
	at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
	at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
	at java.base/java.lang.reflect.Method.invoke(Method.java:566)
	at org.junit.runners.model.FrameworkMethod$1.runReflectiveCall(FrameworkMethod.java:59)
	at org.junit.internal.runners.model.ReflectiveCallable.run(ReflectiveCallable.java:12)
	at org.junit.runners.model.FrameworkMethod.invokeExplosively(FrameworkMethod.java:56)
	at org.junit.internal.runners.statements.InvokeMethod.evaluate(InvokeMethod.java:17)
	at org.junit.runners.ParentRunner$3.evaluate(ParentRunner.java:306)
	at org.junit.runners.BlockJUnit4ClassRunner$1.evaluate(BlockJUnit4ClassRunner.java:100)
	at org.junit.runners.ParentRunner.runLeaf(ParentRunner.java:366)
	at org.junit.runners.BlockJUnit4ClassRunner.runChild(BlockJUnit4ClassRunner.java:103)
	at org.junit.runners.BlockJUnit4ClassRunner.runChild(BlockJUnit4ClassRunner.java:63)
	at org.junit.runners.ParentRunner$4.run(ParentRunner.java:331)
	at org.junit.runners.ParentRunner$1.schedule(ParentRunner.java:79)
	at org.junit.runners.ParentRunner.runChildren(ParentRunner.java:329)
	at org.junit.runners.ParentRunner.access$100(ParentRunner.java:66)
	at org.junit.runners.ParentRunner$2.evaluate(ParentRunner.java:293)
	at org.junit.runners.ParentRunner$3.evaluate(ParentRunner.java:306)
	at org.junit.runners.ParentRunner.run(ParentRunner.java:413)
	at org.apache.maven.surefire.junit4.JUnit4Provider.execute(JUnit4Provider.java:252)
	at org.apache.maven.surefire.junit4.JUnit4Provider.executeTestSet(JUnit4Provider.java:141)
	at org.apache.maven.surefire.junit4.JUnit4Provider.invoke(JUnit4Provider.java:112)
	at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
	at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
	at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
	at java.base/java.lang.reflect.Method.invoke(Method.java:566)
	at org.apache.maven.surefire.util.ReflectionUtils.invokeMethodWithArray(ReflectionUtils.java:189)
	at org.apache.maven.surefire.booter.ProviderFactory$ProviderProxy.invoke(ProviderFactory.java:165)
	at org.apache.maven.surefire.booter.ProviderFactory.invokeProvider(ProviderFactory.java:85)
	at org.apache.maven.surefire.booter.ForkedBooter.runSuitesInProcess(ForkedBooter.java:115)
	at org.apache.maven.surefire.booter.ForkedBooter.main(ForkedBooter.java:75)


Results :

Tests in error: 
  testMethodSignatures(com.github.sevntu.checkstyle.analysis
    .MethodCallDependencyCheckstyleModuleTest): 
  Duplicate key m(int) (attempted merging values m(int) and m(int))


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

No branches or pull requests

1 participant