Skip to content

Commit bf316a9

Browse files
Merge pull request quarkusio#47890 from holly-cummins/tougher-nesting-test
Add deeper nesting in nesting test to exercise it a bit more rigorously
2 parents dcef943 + e0d04c4 commit bf316a9

File tree

2 files changed

+30
-1
lines changed

2 files changed

+30
-1
lines changed

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

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,8 @@
1212
import org.junit.jupiter.api.Assertions;
1313
import org.junit.jupiter.api.Disabled;
1414
import org.junit.jupiter.api.Test;
15+
import org.junit.jupiter.api.condition.DisabledOnOs;
16+
import org.junit.jupiter.api.condition.OS;
1517

1618
import io.quarkus.maven.it.continuoustesting.ContinuousTestingMavenTestUtils;
1719
import io.quarkus.maven.it.verifier.MavenProcessInvocationResult;
@@ -73,6 +75,7 @@ public void testNestedQuarkusTestMixedWithNormalTests()
7375

7476
}
7577

78+
@DisabledOnOs(OS.WINDOWS) // Tracked by https://github.com/quarkusio/quarkus/issues/47913
7679
@Test
7780
public void testNestedQuarkusTestMixedWithNormalTestsContinuousTesting()
7881
throws MavenInvocationException, FileNotFoundException {
@@ -87,7 +90,7 @@ public void testNestedQuarkusTestMixedWithNormalTestsContinuousTesting()
8790
// This is a bit brittle when we add tests, but failures are often so catastrophic they're not even reported as failures,
8891
// so we need to check the pass count explicitly
8992
Assertions.assertEquals(0, results.getTestsFailed());
90-
Assertions.assertEquals(2, results.getTestsPassed());
93+
Assertions.assertEquals(4, results.getTestsPassed());
9194
Assertions.assertEquals(1, results.getTestsSkipped());
9295
}
9396

integration-tests/maven/src/test/resources-filtered/projects/test-nested-tests-mixed-with-normal-tests/src/test/java/org/acme/HelloResourceTest.java

Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -22,5 +22,31 @@ public void testHelloEndpoint() {
2222
.statusCode(200)
2323
.body(is("Hello from Quarkus REST via config"));
2424
}
25+
26+
@Nested
27+
class DeeperNestedInnerClass {
28+
@Test
29+
public void testHelloEndpointAgain() {
30+
given()
31+
.when()
32+
.get("/app/hello")
33+
.then()
34+
.statusCode(200)
35+
.body(is("Hello from Quarkus REST via config"));
36+
}
37+
38+
@Nested
39+
class EvenDeeperNestedInnerClass {
40+
@Test
41+
public void testHelloEndpointYetAgain() {
42+
given()
43+
.when()
44+
.get("/app/hello")
45+
.then()
46+
.statusCode(200)
47+
.body(is("Hello from Quarkus REST via config"));
48+
}
49+
}
50+
}
2551
}
2652
}

0 commit comments

Comments
 (0)