Uploaded image for project: 'XWiki Commons'
  1. XWiki Commons
  2. XCOMMONS-1561

IsolatedTestRunner fails to run on Java 10+

    XMLWordPrintable

Details

    • Unknown
    • N/A
    • N/A

    Description

      [INFO] --- maven-surefire-plugin:2.22.0:test (default-test) @ xwiki-platform-security-api ---
      [INFO] 
      [INFO] -------------------------------------------------------
      [INFO]  T E S T S
      [INFO] -------------------------------------------------------
      [INFO] Running org.xwiki.security.SecurityReferenceTest
      [INFO] Tests run: 9, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 0.584 s - in org.xwiki.security.SecurityReferenceTest
      [INFO] Running DefaultSecurityCacheTest
      [INFO] Tests run: 6, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 0.505 s - in DefaultSecurityCacheTest
      [INFO] Running DefaultSecurityCacheLoaderTest
      [INFO] Tests run: 1, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 0.076 s - in DefaultSecurityCacheLoaderTest
      [INFO] Running SecurityAccessTest
      [INFO] Tests run: 2, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 0 s - in SecurityAccessTest
      [INFO] Running DefaultAuthorizationSettlerTest
      [ERROR] Tests run: 1, Failures: 0, Errors: 1, Skipped: 0, Time elapsed: 0.014 s <<< FAILURE! - in DefaultAuthorizationSettlerTest
      [ERROR] initializationError  Time elapsed: 0.014 s  <<< ERROR!
      java.lang.ClassCastException: java.base/jdk.internal.loader.ClassLoaders$AppClassLoader cannot be cast to java.base/java.net.URLClassLoader
      	at org.xwiki.test.isolation.IsolatedTestRunner$IsolatedTestClassLoader.<init>(IsolatedTestRunner.java:149)
      	at org.xwiki.test.isolation.IsolatedTestRunner.getFromTestClassloader(IsolatedTestRunner.java:126)
      	at org.xwiki.test.isolation.IsolatedTestRunner.<init>(IsolatedTestRunner.java:86)
      	at java.base/jdk.internal.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
      	at java.base/jdk.internal.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:62)
      	at java.base/jdk.internal.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45)
      	at java.base/java.lang.reflect.Constructor.newInstance(Constructor.java:488)
      	at org.junit.internal.builders.AnnotatedBuilder.buildRunner(AnnotatedBuilder.java:104)
      	at org.junit.vintage.engine.discovery.DefensiveAllDefaultPossibilitiesBuilder$DefensiveAnnotatedBuilder.buildRunner(DefensiveAllDefaultPossibilitiesBuilder.java:113)
      	at org.junit.internal.builders.AnnotatedBuilder.runnerForClass(AnnotatedBuilder.java:86)
      	at org.junit.runners.model.RunnerBuilder.safeRunnerForClass(RunnerBuilder.java:59)
      	at org.junit.internal.builders.AllDefaultPossibilitiesBuilder.runnerForClass(AllDefaultPossibilitiesBuilder.java:26)
      	at org.junit.vintage.engine.discovery.DefensiveAllDefaultPossibilitiesBuilder.runnerForClass(DefensiveAllDefaultPossibilitiesBuilder.java:56)
      	at org.junit.runners.model.RunnerBuilder.safeRunnerForClass(RunnerBuilder.java:59)
      	at org.junit.vintage.engine.discovery.TestClassRequestResolver.createRunnerTestDescriptor(TestClassRequestResolver.java:55)
      	at org.junit.vintage.engine.discovery.VintageDiscoverer.lambda$discover$0(VintageDiscoverer.java:53)
      	at java.base/java.util.stream.ReferencePipeline$3$1.accept(ReferencePipeline.java:195)
      	at java.base/java.util.stream.ReferencePipeline$3$1.accept(ReferencePipeline.java:195)
      	at java.base/java.util.Iterator.forEachRemaining(Iterator.java:133)
      	at java.base/java.util.Spliterators$IteratorSpliterator.forEachRemaining(Spliterators.java:1801)
      	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.StreamSpliterators$WrappingSpliterator.forEachRemaining(StreamSpliterators.java:312)
      	at java.base/java.util.stream.Streams$ConcatSpliterator.forEachRemaining(Streams.java:734)
      	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.ForEachOps$ForEachOp.evaluateSequential(ForEachOps.java:150)
      	at java.base/java.util.stream.ForEachOps$ForEachOp$OfRef.evaluateSequential(ForEachOps.java:173)
      	at java.base/java.util.stream.AbstractPipeline.evaluate(AbstractPipeline.java:234)
      	at java.base/java.util.stream.ReferencePipeline.forEach(ReferencePipeline.java:497)
      	at org.junit.vintage.engine.discovery.VintageDiscoverer.discover(VintageDiscoverer.java:55)
      	at org.junit.vintage.engine.VintageTestEngine.discover(VintageTestEngine.java:61)
      	at org.junit.platform.launcher.core.DefaultLauncher.discoverEngineRoot(DefaultLauncher.java:168)
      	at org.junit.platform.launcher.core.DefaultLauncher.discoverRoot(DefaultLauncher.java:155)
      	at org.junit.platform.launcher.core.DefaultLauncher.execute(DefaultLauncher.java:128)
      	at org.apache.maven.surefire.junitplatform.JUnitPlatformProvider.invokeAllTests(JUnitPlatformProvider.java:142)
      	at org.apache.maven.surefire.junitplatform.JUnitPlatformProvider.invoke(JUnitPlatformProvider.java:117)
      	at org.apache.maven.surefire.booter.ForkedBooter.invokeProviderInSameClassLoader(ForkedBooter.java:383)
      	at org.apache.maven.surefire.booter.ForkedBooter.runSuitesInProcess(ForkedBooter.java:344)
      	at org.apache.maven.surefire.booter.ForkedBooter.execute(ForkedBooter.java:125)
      	at org.apache.maven.surefire.booter.ForkedBooter.main(ForkedBooter.java:417)
      
      [INFO] Running RightSetTest
      [INFO] Tests run: 206, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 0.187 s - in RightSetTest
      [INFO] Running DefaultAuthorizationManagerIntegrationTest
      16:38:55.974 [main] INFO  o.x.s.a.DefaultAuthorizationManager - [admin] access has been denied for user [Public] on [any Main Wiki:anySpace.an empty main wiki]: security checkpoint
      [INFO] Tests run: 14, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 0.899 s - in DefaultAuthorizationManagerIntegrationTest
      [INFO] Running TestDefinitionParserTest
      [INFO] Tests run: 1, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 0.004 s - in TestDefinitionParserTest
      [INFO] Running RightMapTest
      [INFO] Tests run: 56, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 0.018 s - in RightMapTest
      [INFO] 
      [INFO] Results:
      [INFO] 
      [ERROR] Errors: 
      [ERROR]   DefaultAuthorizationSettlerTest ยป ClassCast java.base/jdk.internal.loader.Clas...
      [INFO] 
      [ERROR] Tests run: 296, Failures: 0, Errors: 1, Skipped: 0
      [INFO] 
      [INFO] ------------------------------------------------------------------------
      [INFO] Reactor Summary for XWiki Platform - Security 11.1-SNAPSHOT:
      [INFO] 
      [INFO] XWiki Platform - Security .......................... SUCCESS [  4.327 s]
      [INFO] XWiki Platform - Security - API .................... FAILURE [ 11.051 s]
      [INFO] XWiki Platform - Security - Bridge ................. SKIPPED
      [INFO] XWiki Platform - Security - Script ................. SKIPPED
      [INFO] ------------------------------------------------------------------------
      [INFO] BUILD FAILURE
      [INFO] ------------------------------------------------------------------------
      [INFO] Total time:  16.942 s
      [INFO] Finished at: 2019-01-28T16:38:57+01:00
      [INFO] ------------------------------------------------------------------------
      

      Attachments

        Issue Links

          Activity

            People

              tmortagne Thomas Mortagne
              vmassol Vincent Massol
              Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: