NoSuchMethod в тесте JUnit после обновления Eclipse (с использованием Gradle) ⇐ JAVA
-
Гость
NoSuchMethod в тесте JUnit после обновления Eclipse (с использованием Gradle)
Я использовал Eclipse 2022-09, и все работало нормально.
Я управляю всеми зависимостями через Gradle. Версия JUnit 5 определяется плагином управления Spring Boot.
После того как я обновился до Eclipse 2023-09, тесты JUnit начали давать сбой при выполнении из Eclipse.
java.lang.NoSuchMethodError: 'java.util.Set org.junit.platform.engine.TestDescriptor.getAncestors()' в org.junit.platform.launcher.core.StackTracePruningEngineExecutionListener.getTestClassNames(StackTracePruningEngineExecutionListener.java:50) в org.junit.platform.launcher.core.StackTracePruningEngineExecutionListener.executionFinished (StackTracePruningEngineExecutionListener.java:39) в org.junit.platform.launcher.core.DelegatingEngineExecutionListener.executionFinished (DelegatingEngineExecutionListener.java:46) в org.junit.platform.launcher.core.OutcomeDelayingEngineExecutionListener.reportEngineFailure(OutcomeDelayingEngineExecutionListener.java:83) в org.junit.platform.launcher.core.EngineExecutionOrchestrator.execute(EngineExecutionOrchestrator.java:203) в org.junit.platform.launcher.core.EngineExecutionOrchestrator.execute(EngineExecutionOrchestrator.java:169) в org.junit.platform.launcher.core.EngineExecutionOrchestrator.execute(EngineExecutionOrchestrator.java:93) в org.junit.platform.launcher.core.EngineExecutionOrchestrator.lambda$execute$0(EngineExecutionOrchestrator.java:58) в org.junit.platform.launcher.core.EngineExecutionOrchestrator.withInterceptedStreams(EngineExecutionOrchestrator.java:141) в org.junit.platform.launcher.core.EngineExecutionOrchestrator.execute(EngineExecutionOrchestrator.java:57) в org.junit.platform.launcher.core.DefaultLauncher.execute(DefaultLauncher.java:103) в org.junit.platform.launcher.core.DefaultLauncher.execute(DefaultLauncher.java:94) в org.junit.platform.launcher.core.DelegatingLauncher.execute(DelegatingLauncher.java:52) в org.junit.platform.launcher.core.SessionPerRequestLauncher.execute(SessionPerRequestLauncher.java:70) в org.eclipse.jdt.internal.junit5.runner.JUnit5TestReference.run(JUnit5TestReference.java:98) в org.eclipse.jdt.internal.junit.runner.TestExecution.run(TestExecution.java:40) в org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTests(RemoteTestRunner.java:529) в org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTests(RemoteTestRunner.java:756) в org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.run(RemoteTestRunner.java:452) в org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.main(RemoteTestRunner.java:210) JVM — это Adoptium OpenJDK 17 (точка доступа 17.0.8.101).
Выполнение теста с помощью gradlew test --tests Xyz вполне подходит. Проблема в том, что я запускаю тесты в Eclipse (любой тест).
Я искал SO несколько часов и не смог найти подходящего решения или значимого объяснения.
Я использовал Eclipse 2022-09, и все работало нормально.
Я управляю всеми зависимостями через Gradle. Версия JUnit 5 определяется плагином управления Spring Boot.
После того как я обновился до Eclipse 2023-09, тесты JUnit начали давать сбой при выполнении из Eclipse.
java.lang.NoSuchMethodError: 'java.util.Set org.junit.platform.engine.TestDescriptor.getAncestors()' в org.junit.platform.launcher.core.StackTracePruningEngineExecutionListener.getTestClassNames(StackTracePruningEngineExecutionListener.java:50) в org.junit.platform.launcher.core.StackTracePruningEngineExecutionListener.executionFinished (StackTracePruningEngineExecutionListener.java:39) в org.junit.platform.launcher.core.DelegatingEngineExecutionListener.executionFinished (DelegatingEngineExecutionListener.java:46) в org.junit.platform.launcher.core.OutcomeDelayingEngineExecutionListener.reportEngineFailure(OutcomeDelayingEngineExecutionListener.java:83) в org.junit.platform.launcher.core.EngineExecutionOrchestrator.execute(EngineExecutionOrchestrator.java:203) в org.junit.platform.launcher.core.EngineExecutionOrchestrator.execute(EngineExecutionOrchestrator.java:169) в org.junit.platform.launcher.core.EngineExecutionOrchestrator.execute(EngineExecutionOrchestrator.java:93) в org.junit.platform.launcher.core.EngineExecutionOrchestrator.lambda$execute$0(EngineExecutionOrchestrator.java:58) в org.junit.platform.launcher.core.EngineExecutionOrchestrator.withInterceptedStreams(EngineExecutionOrchestrator.java:141) в org.junit.platform.launcher.core.EngineExecutionOrchestrator.execute(EngineExecutionOrchestrator.java:57) в org.junit.platform.launcher.core.DefaultLauncher.execute(DefaultLauncher.java:103) в org.junit.platform.launcher.core.DefaultLauncher.execute(DefaultLauncher.java:94) в org.junit.platform.launcher.core.DelegatingLauncher.execute(DelegatingLauncher.java:52) в org.junit.platform.launcher.core.SessionPerRequestLauncher.execute(SessionPerRequestLauncher.java:70) в org.eclipse.jdt.internal.junit5.runner.JUnit5TestReference.run(JUnit5TestReference.java:98) в org.eclipse.jdt.internal.junit.runner.TestExecution.run(TestExecution.java:40) в org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTests(RemoteTestRunner.java:529) в org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTests(RemoteTestRunner.java:756) в org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.run(RemoteTestRunner.java:452) в org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.main(RemoteTestRunner.java:210) JVM — это Adoptium OpenJDK 17 (точка доступа 17.0.8.101).
Выполнение теста с помощью gradlew test --tests Xyz вполне подходит. Проблема в том, что я запускаю тесты в Eclipse (любой тест).
Я искал SO несколько часов и не смог найти подходящего решения или значимого объяснения.
Мобильная версия