Skip to content

Commit 30c3397

Browse files
committed
Add disabled reproducer for quarkusio#38987
1 parent 583e154 commit 30c3397

File tree

6 files changed

+208
-0
lines changed

6 files changed

+208
-0
lines changed

integration-tests/maven/src/test/java/io/quarkus/maven/it/DevMojoIT.java

+15
Original file line numberDiff line numberDiff line change
@@ -1381,6 +1381,21 @@ public void testPropertyExpansion() throws IOException, MavenInvocationException
13811381
assertThat(devModeClient.getHttpResponse("/app/hello/applicationName")).isEqualTo("myapp");
13821382
}
13831383

1384+
@Disabled("See https://github.com/quarkusio/quarkus/issues/38987")
1385+
@Test
1386+
public void testMockitoForNonPublicInnerClass() throws MavenInvocationException, IOException {
1387+
// Scenario discussed in https://github.com/quarkusio/quarkus/issues/38987
1388+
testDir = initProject("projects/mockito-non-public-inner-class", "projects/mockito-non-public-inner-class-out");
1389+
runAndCheck();
1390+
1391+
ContinuousTestingMavenTestUtils testingTestUtils = new ContinuousTestingMavenTestUtils();
1392+
ContinuousTestingMavenTestUtils.TestStatus results = testingTestUtils.waitForNextCompletion();
1393+
1394+
//check that the tests ran green
1395+
Assertions.assertEquals(0, results.getTestsFailed());
1396+
Assertions.assertEquals(1, results.getTestsPassed());
1397+
}
1398+
13841399
@Test
13851400
public void testMultiJarModuleDevModeMocks() throws MavenInvocationException, IOException {
13861401
testDir = initProject("projects/multijar-module", "projects/multijar-module-devmode-mocks");
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,43 @@
1+
#Maven
2+
target/
3+
pom.xml.tag
4+
pom.xml.releaseBackup
5+
pom.xml.versionsBackup
6+
release.properties
7+
.flattened-pom.xml
8+
9+
# Eclipse
10+
.project
11+
.classpath
12+
.settings/
13+
bin/
14+
15+
# IntelliJ
16+
.idea
17+
*.ipr
18+
*.iml
19+
*.iws
20+
21+
# NetBeans
22+
nb-configuration.xml
23+
24+
# Visual Studio Code
25+
.vscode
26+
.factorypath
27+
28+
# OSX
29+
.DS_Store
30+
31+
# Vim
32+
*.swp
33+
*.swo
34+
35+
# patch
36+
*.orig
37+
*.rej
38+
39+
# Local environment
40+
.env
41+
42+
# Plugin directory
43+
/.quarkus/cli/plugins/
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,112 @@
1+
<?xml version="1.0"?>
2+
<project xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 https://maven.apache.org/xsd/maven-4.0.0.xsd" xmlns="http://maven.apache.org/POM/4.0.0"
3+
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
4+
<modelVersion>4.0.0</modelVersion>
5+
<groupId>org.acme</groupId>
6+
<artifactId>code-with-quarkus</artifactId>
7+
<version>1.0.0-SNAPSHOT</version>
8+
<properties>
9+
<compiler-plugin.version>3.12.1</compiler-plugin.version>
10+
<maven.compiler.release>17</maven.compiler.release>
11+
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
12+
<project.reporting.outputEncoding>UTF-8</project.reporting.outputEncoding>
13+
<quarkus.platform.artifact-id>quarkus-bom</quarkus.platform.artifact-id>
14+
<quarkus.platform.group-id>io.quarkus</quarkus.platform.group-id>
15+
<quarkus.platform.version>@project.version@</quarkus.platform.version>
16+
<skipITs>true</skipITs>
17+
<surefire-plugin.version>3.2.5</surefire-plugin.version>
18+
</properties>
19+
<dependencyManagement>
20+
<dependencies>
21+
<dependency>
22+
<groupId>${quarkus.platform.group-id}</groupId>
23+
<artifactId>${quarkus.platform.artifact-id}</artifactId>
24+
<version>${quarkus.platform.version}</version>
25+
<type>pom</type>
26+
<scope>import</scope>
27+
</dependency>
28+
</dependencies>
29+
</dependencyManagement>
30+
<dependencies>
31+
<dependency>
32+
<groupId>io.quarkus</groupId>
33+
<artifactId>quarkus-arc</artifactId>
34+
</dependency>
35+
<dependency>
36+
<groupId>io.quarkus</groupId>
37+
<artifactId>quarkus-junit5-mockito</artifactId>
38+
<scope>test</scope>
39+
</dependency>
40+
</dependencies>
41+
<build>
42+
<plugins>
43+
<plugin>
44+
<groupId>${quarkus.platform.group-id}</groupId>
45+
<artifactId>quarkus-maven-plugin</artifactId>
46+
<version>${quarkus.platform.version}</version>
47+
<extensions>true</extensions>
48+
<executions>
49+
<execution>
50+
<goals>
51+
<goal>build</goal>
52+
<goal>generate-code</goal>
53+
<goal>generate-code-tests</goal>
54+
</goals>
55+
</execution>
56+
</executions>
57+
</plugin>
58+
<plugin>
59+
<artifactId>maven-compiler-plugin</artifactId>
60+
<version>${compiler-plugin.version}</version>
61+
<configuration>
62+
<compilerArgs>
63+
<arg>-parameters</arg>
64+
</compilerArgs>
65+
</configuration>
66+
</plugin>
67+
<plugin>
68+
<artifactId>maven-surefire-plugin</artifactId>
69+
<version>${surefire-plugin.version}</version>
70+
<configuration>
71+
<systemPropertyVariables>
72+
<java.util.logging.manager>org.jboss.logmanager.LogManager</java.util.logging.manager>
73+
<maven.home>${maven.home}</maven.home>
74+
</systemPropertyVariables>
75+
</configuration>
76+
</plugin>
77+
<plugin>
78+
<artifactId>maven-failsafe-plugin</artifactId>
79+
<version>${surefire-plugin.version}</version>
80+
<executions>
81+
<execution>
82+
<goals>
83+
<goal>integration-test</goal>
84+
<goal>verify</goal>
85+
</goals>
86+
</execution>
87+
</executions>
88+
<configuration>
89+
<systemPropertyVariables>
90+
<native.image.path>${project.build.directory}/${project.build.finalName}-runner</native.image.path>
91+
<java.util.logging.manager>org.jboss.logmanager.LogManager</java.util.logging.manager>
92+
<maven.home>${maven.home}</maven.home>
93+
</systemPropertyVariables>
94+
</configuration>
95+
</plugin>
96+
</plugins>
97+
</build>
98+
<profiles>
99+
<profile>
100+
<id>native</id>
101+
<activation>
102+
<property>
103+
<name>native</name>
104+
</property>
105+
</activation>
106+
<properties>
107+
<skipITs>false</skipITs>
108+
<quarkus.package.type>native</quarkus.package.type>
109+
</properties>
110+
</profile>
111+
</profiles>
112+
</project>
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
package org.acme;
2+
3+
public class Foo {
4+
5+
static class Inner {
6+
}
7+
}
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
quarkus.test.continuous-testing=enabled
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,30 @@
1+
/*
2+
* Created on 23.02.2024
3+
*
4+
* Copyright(c) 1995 - 2022 T-Systems Multimedia Solutions GmbH
5+
* Riesaer Str. 5, 01129 Dresden
6+
* All rights reserved.
7+
*/
8+
package org.acme;
9+
10+
import org.junit.jupiter.api.Test;
11+
import org.junit.jupiter.api.extension.ExtendWith;
12+
import org.mockito.Mock;
13+
import org.mockito.junit.jupiter.MockitoExtension;
14+
15+
/**
16+
* JAVADOC
17+
*
18+
* @author fmo
19+
*/
20+
@ExtendWith(MockitoExtension.class)
21+
public class FooTest {
22+
23+
@Mock
24+
private Foo.Inner mock;
25+
26+
@Test
27+
public void test() {
28+
29+
}
30+
}

0 commit comments

Comments
 (0)