Uploaded image for project: 'Hippo CMS'
  1. Hippo CMS
  2. CMS-15863

JUnit/Jupiter/Hamcrest/EasyMock/Powermock/Assertj/Mockito upgrades

    XMLWordPrintable

Details

    • Task
    • Status: Closed
    • Normal
    • Resolution: Fixed
    • None
    • 16.0.0
    • None
    • None

    Description

      On Jakarta branch, sync JUnit to the version used by Spring Boot

      There's a ClassNotFoundException: org.junit.jupiter.api.io.CleanupMode.
      CleanupMode is a JUnit 5 class while we have JUnit 4.

      Full stack trace:

      Caused by: java.lang.ClassNotFoundException: org.junit.jupiter.api.io.CleanupMode
      15:51:56      at java.net.URLClassLoader.findClass (URLClassLoader.java:445)
      15:51:56      at java.lang.ClassLoader.loadClass (ClassLoader.java:587)
      15:51:56      at java.lang.ClassLoader.loadClass (ClassLoader.java:520)
      15:51:56      at org.apache.maven.surefire.booter.IsolatedClassLoader.loadClass (IsolatedClassLoader.java:82)
      15:51:56      at org.junit.jupiter.engine.JupiterTestEngine.discover (JupiterTestEngine.java:66)
      15:51:56      at org.junit.platform.launcher.core.EngineDiscoveryOrchestrator.discoverEngineRoot (EngineDiscoveryOrchestrator.java:152)
      15:51:56      at org.junit.platform.launcher.core.EngineDiscoveryOrchestrator.discoverSafely (EngineDiscoveryOrchestrator.java:132)
      15:51:56      at org.junit.platform.launcher.core.EngineDiscoveryOrchestrator.discover (EngineDiscoveryOrchestrator.java:107)
      15:51:56      at org.junit.platform.launcher.core.EngineDiscoveryOrchestrator.discover (EngineDiscoveryOrchestrator.java:78)
      15:51:56      at org.junit.platform.launcher.core.DefaultLauncher.discover (DefaultLauncher.java:99)
      15:51:56      at org.junit.platform.launcher.core.DefaultLauncher.discover (DefaultLauncher.java:77)
      15:51:56      at org.junit.platform.launcher.core.DelegatingLauncher.discover (DelegatingLauncher.java:42)
      15:51:56      at org.apache.maven.surefire.junitplatform.LazyLauncher.discover (LazyLauncher.java:50)
      15:51:56      at org.apache.maven.surefire.junitplatform.TestPlanScannerFilter.accept (TestPlanScannerFilter.java:52)
      15:51:56      at org.apache.maven.surefire.api.util.DefaultScanResult.applyFilter (DefaultScanResult.java:87)
      15:51:56      at org.apache.maven.surefire.junitplatform.JUnitPlatformProvider.scanClasspath (JUnitPlatformProvider.java:142)
      15:51:56      at org.apache.maven.surefire.junitplatform.JUnitPlatformProvider.getSuites (JUnitPlatformProvider.java:102)
      15:51:56      at jdk.internal.reflect.NativeMethodAccessorImpl.invoke0 (Native Method)
      15:51:56      at jdk.internal.reflect.NativeMethodAccessorImpl.invoke (NativeMethodAccessorImpl.java:77)
      15:51:56      at jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke (DelegatingMethodAccessorImpl.java:43)
      15:51:56      at java.lang.reflect.Method.invoke (Method.java:568)
      15:51:56      at org.apache.maven.surefire.api.util.ReflectionUtils.invokeMethodWithArray (ReflectionUtils.java:125)
      15:51:56      at org.apache.maven.surefire.api.util.ReflectionUtils.invokeGetter (ReflectionUtils.java:62)
      15:51:56      at org.apache.maven.surefire.api.util.ReflectionUtils.invokeGetter (ReflectionUtils.java:57)
      15:51:56      at org.apache.maven.surefire.booter.ProviderFactory$ProviderProxy.getSuites (ProviderFactory.java:137)
      15:51:56      at org.apache.maven.plugin.surefire.booterclient.ForkStarter.getSuitesIterator (ForkStarter.java:676)
      15:51:56      at org.apache.maven.plugin.surefire.booterclient.ForkStarter.runSuitesForkPerTestSet (ForkStarter.java:385)
      15:51:56      at org.apache.maven.plugin.surefire.booterclient.ForkStarter.run (ForkStarter.java:297)
      15:51:56      at org.apache.maven.plugin.surefire.booterclient.ForkStarter.run (ForkStarter.java:250)
      15:51:56      at org.apache.maven.plugin.surefire.AbstractSurefireMojo.executeProvider (AbstractSurefireMojo.java:1203)
      15:51:56      at org.apache.maven.plugin.surefire.AbstractSurefireMojo.executeAfterPreconditionsChecked (AbstractSurefireMojo.java:1055)
      15:51:56      at org.apache.maven.plugin.surefire.AbstractSurefireMojo.execute (AbstractSurefireMojo.java:871)
      15:51:56      at org.apache.maven.plugin.DefaultBuildPluginManager.executeMojo (DefaultBuildPluginManager.java:137)
      

      Also, these can be bumped and moved to project/pom.xml because they are scattered across modules:

          <junit.version>4.13.2</junit.version>
          <hamcrest.version>1.3</hamcrest.version>
          <assertj.version>3.8.0</assertj.version>
          <!-- Wicket 9 uses junit5 jupiter assertions -->
          <junit-jupiter.version>5.7.2</junit-jupiter.version>
          <!-- Make sure that powermock and easymock are compatible -->
          <easymock.version>4.3</easymock.version>
          <powermock.version>2.0.9</powermock.version>
          <mockito.version>4.1.0</mockito.version>
      

      Attachments

        Issue Links

          Activity

            People

              jhoffman Jeroen Hoffman
              jhoffman Jeroen Hoffman
              Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: