From 31209393bc0b587fd8f213cdf3d614e9fa6492a7 Mon Sep 17 00:00:00 2001 From: Purushottam Sinha Date: Thu, 13 Aug 2026 23:51:21 +0530 Subject: [PATCH] [FLINK-40382][build] Stop surefire from hiding nested test classes Surefire's default excludes drop **/*$*, so a test class declared as a static nested class is never selected. JUnit Jupiter only auto-discovers @Nested inner classes, so such a class falls through both paths and never runs, with no log line, report file or skip count to show it. Override the excludes on the default-test execution. The include pattern there is name-based (**/*Test.*, **/*Tests.*), so only nested classes whose name ends in Test/Tests are picked up. The explicit **/*$* exclude on the integration-tests execution is left alone: its include is **/*.*, which would otherwise match Scala-generated names such as TypeInformationGenTest$$anon$85$$anon$86. This recovers the nested test classes without touching any test code: flink-table-type-utils goes from 151 to 418 tests, flink-core picks up both NullableSerializerTest variants (19 each) and flink-runtime picks up InputSelectionTest$BuilderTest (3). Of the 152 nested classes that newly match the include, 134 are existing @Nested classes that already ran (JUnit deduplicates, so they do not run twice) and 2 are abstract bases that JUnit ignores. Generated-by: Claude Code (claude-opus-5) --- pom.xml | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/pom.xml b/pom.xml index b67166326c5622..505739dfc11afd 100644 --- a/pom.xml +++ b/pom.xml @@ -1824,6 +1824,14 @@ under the License. ${test.unit.pattern} + + + **/*$*$*.class + ${flink.forkCountUnitTest} ${flink.surefire.baseArgLine} -Xmx${flink.XmxUnitTest}