[FLINK-40382][tests] Execute the serializer test variants in flink-table-type-utils - #28962
Draft
spuru9 wants to merge 1 commit into
Draft
[FLINK-40382][tests] Execute the serializer test variants in flink-table-type-utils#28962spuru9 wants to merge 1 commit into
spuru9 wants to merge 1 commit into
Conversation
spuru9
force-pushed
the
FLINK-nested-test-fix
branch
from
August 12, 2026 18:06
0635e34 to
b990445
Compare
…ble-type-utils RowDataSerializerTest, ExternalSerializerTest and TimestampDataSerializerTest declare their concrete variants as static nested classes of an abstract outer class, so none of the 15 variants was ever executed. Surefire excludes **/*$* when scanning class files and JUnit Jupiter only discovers @nested inner classes, so a static nested class falls through both. The abstract outer class produces no output either, so nothing in the build indicated it. TimestampDataSerializerTest and ExternalSerializerTest become plain container classes holding an abstract static base plus @nested variants, matching MaxWithRetractAggFunctionTest. RowDataSerializerTest cannot use @nested: its variants declare private static helpers called from super(...), which an inner class may not do at source level 11. Its variants become package-private top-level classes in the same file, which requires widening createArray, createMap, createRow and WrappedString to package-private so the subclasses inherit them. No test logic changes. The module goes from 151 to 418 tests. Generated-by: Claude Code (claude-opus-5)
spuru9
force-pushed
the
FLINK-nested-test-fix
branch
from
August 13, 2026 06:22
b990445 to
f9996cd
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What is the purpose of the change
RowDataSerializerTest,ExternalSerializerTestandTimestampDataSerializerTestdeclare their concrete variants asstaticnested classes of anabstractouter class, so 15 variants and 267 tests never execute. The module reports 151 tests instead of 418.Surefire excludes
**/*$*when scanning class files, and JUnit Jupiter only discovers@Nestedinner classes — astaticnested class falls through both. Because the outer class isabstract, surefire emits nothing for it either: noRunningline, no report file, not evenTests run: 0. Nothing in a build indicates the omission.The variant class names appear zero times in any of the 13 jobs of green master build 31416084933, and identically on five further green builds plus the
release-2.3nightly. Meanwhile the top-level siblings (MapDataSerializerTest,BinaryRowSerializerTest, …) each report 17 tests, so the log format is not the reason for the zeros.Brief change log
TimestampDataSerializerTestandExternalSerializerTestbecome plain container classes holding anabstract staticbase plus@Nestedvariants — the layoutMaxWithRetractAggFunctionTestalready uses.RowDataSerializerTestcannot use@Nested: its variants declareprivate statichelpers called fromsuper(...), which an inner class may not do at source level 11. Its variants become package-private top-level classes in the same file, which requires wideningcreateArray,createMap,createRowandWrappedStringto package-private so the subclasses inherit them.ExternalSerializerTest's variants were extending the base raw; they are now typed (<Integer>,<Row>,<ImmutableTestPojo>,<List<ImmutableTestPojo>>,<Integer[]>).No test logic changes — same serializers, same data, same assertions.
Most of this diff is re-indentation from moving class bodies across a nesting boundary. Review with
git diff -w, which reduces 595 lines to 167.Verifying this change
mvn verify -pl flink-table/flink-table-type-utilsgoes from 151 to 418 tests, all passing. The four/five/six variants now appear individually in surefire output; the container classes reportTests run: 0, as existing@Nestedusers such asGenericInMemoryCatalogTestalready do.In this PR's CI the module runs in the
miscjob (flink-table-type-utilsis not listed inMODULES_TABLE, soMODULES_MISC's negation picks it up) — search that log forTimestampSerializer,ExternalSerializer1TestorSimpleRowDataSerializerTest.The same bug affects 7 more classes in flink-core, flink-python, flink-runtime and flink-azure-fs-hadoop (~92 tests); those are handled separately.
Does this pull request potentially affect one of the following parts:
@Public(Evolving): noRowDataSerializer,ExternalSerializerandTimestampDataSerializer)Documentation
AI assistance