在带有JDK GraalVM 20.0.0和maven 3.6.3的IntelliJ IDE 2019.3.4上运行时发生。
“ C:\ Program Files \ Java \ graalvm-ce-java8-20.0.0 \ bin \ java.exe” -ea -Didea.test.cyclic.buffer.size = 1048576“ -javaagent:C:\ Program Files \ JetBrains \ IntelliJ IDEA社区版2019.3.4 \ lib \ idea_rt.jar = 52496:C:\ Program Files \ JetBrains \ IntelliJ IDEA社区版2019.3.4 \ bin“ -Dfile.encoding = UTF-8 -classpath” C:\ Program Files \ JetBrains \ IntelliJ IDEA Community Edition 2019.3.4 \ lib \ idea_rt.jar“ com.intellij.rt.execution.CommandLineWrapper C:\ Users \ emerson.santos \ AppData \ Local \ Temp \ idea_classpath268905905798 com.intellij.rt.junit .JUnitStarter -ideVersion5 -junit5 com.softexpert.analytics.services.materialization.MaterializationServiceIntegrationTest,测试 [INFO] H2数据库在TCP服务器模式下启动;服务器状态:TCP服务器运行在tcp://10.0.75.1:9092(仅本地连接) [INFO] H2数据库已关闭;服务器状态:未启动 java.lang.RuntimeException:java.lang.RuntimeException:java.lang.RuntimeException:java.lang.NoSuchMethodException:io.quarkus.runner.bootstrap.AugmentActionImpl。(io.quarkus.bootstrap.app.CuratedApplication,java.util.List ) 在 org.junit.jupiter.engine.descriptor.TestMethodTestDescriptor.lambda $ invokeBeforeEachCallbacks $ 1(TestMethodTestDescriptor.java:154) io.quarkus.test.junit.QuarkusTestExtension.beforeEach(QuarkusTestExtension.java:164)上 org.junit.jupiter.engine.descriptor.TestMethodTestDescriptor.invokeBeforeMethodsOrCallbacksUntilExceptionOccurs(TestMethodTestDescriptor.java:190)处的) 在org.junit.jupiter.engine.descriptor.TestMethodTestDescriptor.lambda $ invokeBeforeMethodsOrCallbacksUntilException发生$ 5(TestMethodTestDescriptor.java:190) 在org.junit.jupiter 上的org.junit.jupiter.engine.descriptor.TestMethodTestDescriptor.invokeBeforeEachCallbacks(TestMethodTestDescriptor.java:153) 上的org.junit.platform.engine.support.hierarchical.ThrowableCollector.execute (ThrowableCollector.java:73) org.junit.jupiter.engine.descriptor.TestMethodTestDescriptor.execute(TestMethodTestDescriptor.java:71)的.engine.descriptor.TestMethodTestDescriptor.execute(TestMethodTestDescriptor.java:131) org.junit.platform.engine.support.hierarchical.NodeTestTask org.junit.platform.engine.support.hierarchical.ThrowableCollector.execute(ThrowableCollector.java:73)的.lambda $ executeRecursively $ 5(NodeTestTask.java:135 ) 的org.junit.platform.engine.support的。 org.junit.platform.engine.support.hierarchical.Node.around(Node.java:135)上的boundary.NodeTestTask.lambda $ executeRecursively $ 7 (NodeTestTask.java:125) 在org.junit.platform.engine.support.hierarchical.ThrowableCollector.execute (ThrowableCollector.java:73) 在org.junit.platform.engine.support.hierarchical.NodeTestTask.lambda $ executeRecursively $ 8(NodeTestTask.java:123 )在org.junit.platform.engine.support.hierarchical.NodeTestTask.execute(NodeTestTask.java:80) 上的org.junit.platform.engine.support.hierarchical.NodeTestTask.executeRecursively(NodeTestTask.java:122) 在java.util上。 ArrayList.forEach(ArrayList.java:1257) org.junit.platform.engine.support.hierarchical.SameThreadHierarchicalTestExecutorService处的 .invokeAll(SameThreadHierarchicalTestExecutorService.java:38) 在org.junit.platform.engine.support.hierarchical.NodeTestTask.lambda $ executeRecursively $ 5(NodeTestTask.java:139) 在org.junit.platform.engine.support.hierarchical.ThrowableCollector .execute(ThrowableCollector.java:73) 位于org.junit.platform.engine.support.hierarchical.NodeTestTask.lambda $ executeRecursively $ 7(NodeTestTask.java:125) 位于org.junit.platform.engine.support.hierarchical.Node.around(Node.java:135) 位于org.org.junit.platform.engine.support.hierarchical.ThrowableCollector.execute (ThrowableCollector.java:73) 上的org.junit.platform.engine.support.hierarchical.NodeTestTask.lambda $ executeRecursively $ 8(NodeTestTask.java:123) org.junit.platform.engine.support.hierarchical.SameThreadHierarchicalTestExecutorService 。 junit.platform.engine.support.hierarchical.NodeTestTask.execute(NodeTestTask.java:80) 上的java.util.ArrayList.forEach(ArrayList.java:1257)上的.junit.platform.engine.support.hierarchical.NodeTestTask.executeRecursively(NodeTestTask.java:122).invokeAll(SameThreadHierarchicalTestExecutorService.java:38) 在org.junit.platform.engine.support.hierarchical.ThrowableCollector.execute (ThrowableCollector.java:73) 在org.junit.platform.engine.support.hierarchical.NodeTestTask.lambda $ executeRecursively $ 5(NodeTestTask.java:139 )在org.junit.platform.engine.support.hierarchical.NodeTestTask.lambda $ executeRecursively $ 7(NodeTestTask.java:125) 在org.junit.platform.engine.support.hierarchical.Node.around(Node.java:135) 在组织 在org.junit.platform.engine.support。分层。ThrowableCollector.execute(ThrowableCollector.java:73) org.junit.platform.engine.support.hierarchical.NodeTestTask.executeRecursively(NodeTestTask.java:122) 在org.junit.platform.engine.support.hierarchical.NodeTestTask.lambda $ executeRecursively $ 8(NodeTestTask.java:123)在org.org 。 junit.platform.engine.support.hierarchical.NodeTestTask.execute(NodeTestTask.java:80) 在org.junit.platform.engine.support.hierarchical.SameThreadHierarchicalTestExecutorService.submit(SameThreadHierarchicalTestExecutorService.java:32) 在org.junit。 org.junit.platform.engine.support.hierarchical.HierarchicalTestEngine.execute(HierarchicalTestEngine.java:51) 上的.platform.engine.support.hierarchical.HierarchicalTestExecutor.execute(HierarchicalTestExecutor.java:57 )在org.junit.platform.launcher .org.DefaultLauncher.execute(DefaultLauncher.java:248) 在org.junit.platform.launcher.core.DefaultLauncher.lambda $ execute $ 5(DefaultLauncher.java:211) 在 org.junit.platform.launcher.core.DefaultLauncher.withInterceptedStreams(DefaultLauncher.java:226 处的sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)上的) org.junit.platform.launcher.core.DefaultLauncher.execute(DefaultLauncher.java:199) 处的org.junit.platform.launcher.core.DefaultLauncher.execute(DefaultLauncher.java )处的:132) 在com.intellij.rt.junit.JUnitStartAnd.prepareStream 上的com.intellij.rt.junit.IdeaTestRunner $ Repeater.startRunnerWithArgs(IdeaTestRunner.java:33) 上的com.intellij.junit5.JUnit5IdeaTestRunner.startRunnerWithArgs (JUnit5IdeaTestRunner.java:69)(JUnitStarter.java:230) 在com.intellij.rt.junit.JUnitStarter.main (JUnitStarter.java:58)在sun.reflect.NativeMethodAccessorImpl.invoke0(本 机方法) 在sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java :62) , 位于com.intellij.rt.execution.CommandLineWrapper.main(CommandLineWrapper.java:66)的java.lang.reflect.Method.invoke(Method.java:498 ) 造成原因:java.lang.RuntimeException:java.lang.RuntimeException:java.lang.NoSuchMethodException:io.quarkus.runner.bootstrap.AugmentActionImpl。(io io.quarkus.test.junit.QuarkusTestExtension.doJavaStart (QuarkusTestExtension.java:125) 上的.quarkus.bootstrap.app.CuratedApplication,java.util.List),位于io.quarkus.test.junit.QuarkusTestExtension.ensureStarted(QuarkusTestExtension.java :180) , 位于org.junit.jupiter.engine.descriptor.ClassBasedTestDescriptor.lambda $ invokeBeforeAllCallbacks $ 7(ClassBasedTestDescriptor.java:359)的io.quarkus.test.junit.QuarkusTestExtension.beforeAll(QuarkusTestExtension.java:208)处 在org.junit.platform.engine.support.hierarchical.ThrowableCollector.execute(ThrowableCollector.java:73) 在io.quarkus.bootstrap.app.CuratedApplication.createAugmentor (CuratedApplication.java:119) 位于org.junit.jupiter.engine.descriptor.ClassBasedTestDescriptor.invokeBeforeAllCallbacks(ClassBasedTestDescriptor.java:359),) 在org.junit.jupiter.engine.descriptor.ClassBasedTestDescriptor.before(ClassBasedTestDescriptor.java:189) 处在org.junit.jupiter.engine.descriptor.ClassBasedTestDescriptor.before(ClassBasedTestDescriptor.java:78) 在org.junit.platform.engine .support.hierarchical.NodeTestTask.lambda $ executeRecursively $ 5(NodeTestTask.java:132) ... 34更多 原因:java.lang.RuntimeException:java.lang.NoSuchMethodException:io.quarkus.runner.bootstrap.AugmentActionImpl。(io .quarkus.bootstrap.app.CuratedApplication,java.util.List), 位于io.quarkus.test.junit.QuarkusTestExtension.doJavaStart(QuarkusTestExtension.java:87) ...另外42 java.lang.NoSuchMethodException:所致。io.quarkus.runner.bootstrap.AugmentActionImpl(io.quarkus.bootstrap.app.CuratedApplication,java.util.List中) 在java.lang.Class.getConstructor0(Class.java:3082 )的 io.quarkus.bootstrap.app.CuratedApplication.createAugmentor(CuratedApplication.java:117)的 java.lang.Class.getConstructor(Class.java:1825) ...还有43个 进程以退出代码-1完成
我的pom.xml:
<?xml version="1.0"?>
<project xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd" xmlns="http://maven.apache.org/POM/4.0.0"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
<modelVersion>4.0.0</modelVersion>
<groupId>com.xxxxx</groupId>
<artifactId>sesuite-analytics</artifactId>
<version>1.0.0-SNAPSHOT</version>
<properties>
<compiler-plugin.version>3.8.1</compiler-plugin.version>
<maven.compiler.parameters>true</maven.compiler.parameters>
<maven.compiler.source>1.8</maven.compiler.source>
<maven.compiler.target>1.8</maven.compiler.target>
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
<project.reporting.outputEncoding>UTF-8</project.reporting.outputEncoding>
<quarkus-plugin.version>1.3.0.Final</quarkus-plugin.version>
<quarkus.platform.artifact-id>quarkus-universe-bom</quarkus.platform.artifact-id>
<quarkus.platform.group-id>io.quarkus</quarkus.platform.group-id>
<quarkus.platform.version>1.3.0.Final</quarkus.platform.version>
<surefire-plugin.version>2.22.1</surefire-plugin.version>
<jacoco.version>0.8.4</jacoco.version>
<hamcrest-core.version>2.2</hamcrest-core.version>
<mockito-core.version>3.2.4</mockito-core.version>
<commons-lang3.version>3.9</commons-lang3.version>
</properties>
<dependencyManagement>
<dependencies>
<dependency>
<groupId>${quarkus.platform.group-id}</groupId>
<artifactId>${quarkus.platform.artifact-id}</artifactId>
<version>${quarkus.platform.version}</version>
<type>pom</type>
<scope>import</scope>
</dependency>
</dependencies>
</dependencyManagement>
<dependencies>
<dependency>
<groupId>io.quarkus</groupId>
<artifactId>quarkus-resteasy</artifactId>
</dependency>
<dependency>
<groupId>io.quarkus</groupId>
<artifactId>quarkus-junit5</artifactId>
<scope>test</scope>
</dependency>
<dependency>
<groupId>io.rest-assured</groupId>
<artifactId>rest-assured</artifactId>
<scope>test</scope>
</dependency>
<dependency>
<groupId>io.quarkus</groupId>
<artifactId>quarkus-test-h2</artifactId>
<scope>test</scope>
</dependency>
<dependency>
<groupId>org.hamcrest</groupId>
<artifactId>hamcrest-core</artifactId>
<version>${hamcrest-core.version}</version>
<scope>test</scope>
</dependency>
<dependency>
<groupId>org.mockito</groupId>
<artifactId>mockito-core</artifactId>
<version>${mockito-core.version}</version>
<scope>test</scope>
</dependency>
<dependency>
<groupId>io.quarkus</groupId>
<artifactId>quarkus-smallrye-opentracing</artifactId>
</dependency>
<dependency>
<groupId>io.opentracing.contrib</groupId>
<artifactId>opentracing-jdbc</artifactId>
</dependency>
<dependency>
<groupId>io.quarkus</groupId>
<artifactId>quarkus-rest-client</artifactId>
</dependency>
<dependency>
<groupId>io.quarkus</groupId>
<artifactId>quarkus-jdbc-mssql</artifactId>
</dependency>
<dependency>
<groupId>io.quarkus</groupId>
<artifactId>quarkus-smallrye-openapi</artifactId>
</dependency>
<dependency>
<groupId>io.quarkus</groupId>
<artifactId>quarkus-smallrye-fault-tolerance</artifactId>
</dependency>
<dependency>
<groupId>io.quarkus</groupId>
<artifactId>quarkus-hibernate-orm-panache</artifactId>
</dependency>
<dependency>
<groupId>io.quarkus</groupId>
<artifactId>quarkus-smallrye-jwt</artifactId>
</dependency>
<dependency>
<groupId>io.quarkus</groupId>
<artifactId>quarkus-agroal</artifactId>
</dependency>
<dependency>
<groupId>io.quarkus</groupId>
<artifactId>quarkus-smallrye-health</artifactId>
</dependency>
<dependency>
<groupId>io.quarkus</groupId>
<artifactId>quarkus-smallrye-metrics</artifactId>
</dependency>
<dependency>
<groupId>io.quarkus</groupId>
<artifactId>quarkus-jdbc-postgresql</artifactId>
</dependency>
<dependency>
<groupId>io.quarkus</groupId>
<artifactId>quarkus-logging-gelf</artifactId>
</dependency>
<dependency>
<groupId>com.google.guava</groupId>
<artifactId>guava</artifactId>
</dependency>
<dependency>
<groupId>org.apache.commons</groupId>
<artifactId>commons-lang3</artifactId>
<version>${commons-lang3.version}</version>
</dependency>
<dependency>
<groupId>io.quarkus</groupId>
<artifactId>quarkus-resteasy-jackson</artifactId>
</dependency>
<!--<dependency>
<groupId>io.quarkus</groupId>
<artifactId>quarkus-artemis-jms</artifactId>
</dependency>-->
</dependencies>
<build>
<plugins>
<plugin>
<groupId>io.quarkus</groupId>
<artifactId>quarkus-maven-plugin</artifactId>
<version>${quarkus-plugin.version}</version>
<executions>
<execution>
<goals>
<goal>build</goal>
</goals>
</execution>
</executions>
</plugin>
<plugin>
<artifactId>maven-compiler-plugin</artifactId>
<version>${compiler-plugin.version}</version>
</plugin>
<plugin>
<artifactId>maven-surefire-plugin</artifactId>
<version>${surefire-plugin.version}</version>
<configuration>
<excludedGroups>integration</excludedGroups>
<systemProperties>
<java.util.logging.manager>org.jboss.logmanager.LogManager</java.util.logging.manager>
</systemProperties>
</configuration>
<executions>
<execution>
<id>integration-tests</id>
<phase>integration-test</phase>
<goals>
<goal>test</goal>
</goals>
<configuration>
<excludedGroups>!integration</excludedGroups>
<groups>integration</groups>
</configuration>
</execution>
</executions>
</plugin>
</plugins>
</build>
<profiles>
<profile>
<id>native</id>
<activation>
<property>
<name>native</name>
</property>
</activation>
<build>
<plugins>
<plugin>
<artifactId>maven-failsafe-plugin</artifactId>
<version>${surefire-plugin.version}</version>
<executions>
<execution>
<goals>
<goal>integration-test</goal>
<goal>verify</goal>
</goals>
<configuration>
<systemProperties>
<native.image.path>${project.build.directory}/${project.build.finalName}-runner</native.image.path>
</systemProperties>
</configuration>
</execution>
</executions>
</plugin>
</plugins>
</build>
<properties>
<quarkus.package.type>native</quarkus.package.type>
</properties>
</profile>
</profiles>
</project>
编辑:
解决方法:我对Quarkus的master分支进行了测试,并且该测试有效,它可能会在1.3.1-Final版本中解决。
“使其生效的步骤:
参考:
无法使用IntelliJ IDEA运行@QuarkusTest带注释的单元测试
https://www.reddit.com/r/quarkus/comments/f2pf8t/quarkus_unit_test_issues/
本文收集自互联网,转载请注明来源。
如有侵权,请联系 [email protected] 删除。
我来说两句