Skip to content

[FLINK-40382][tests] Execute the serializer test variants in flink-table-type-utils - #28962

Draft
spuru9 wants to merge 1 commit into
apache:masterfrom
spuru9:FLINK-nested-test-fix
Draft

[FLINK-40382][tests] Execute the serializer test variants in flink-table-type-utils#28962
spuru9 wants to merge 1 commit into
apache:masterfrom
spuru9:FLINK-nested-test-fix

Conversation

@spuru9

@spuru9 spuru9 commented Aug 12, 2026

Copy link
Copy Markdown
Contributor

What is the purpose of the change

RowDataSerializerTest, ExternalSerializerTest and TimestampDataSerializerTest declare their concrete variants as static nested classes of an abstract outer 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 @Nested inner classes — a static nested class falls through both. Because the outer class is abstract, surefire emits nothing for it either: no Running line, no report file, not even Tests 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.3 nightly. 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

  • TimestampDataSerializerTest and ExternalSerializerTest become plain container classes holding an abstract static base plus @Nested variants — the layout MaxWithRetractAggFunctionTest already uses.
  • 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.
  • 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-utils goes from 151 to 418 tests, all passing. The four/five/six variants now appear individually in surefire output; the container classes report Tests run: 0, as existing @Nested users such as GenericInMemoryCatalogTest already do.

In this PR's CI the module runs in the misc job (flink-table-type-utils is not listed in MODULES_TABLE, so MODULES_MISC's negation picks it up) — search that log for TimestampSerializer, ExternalSerializer1Test or SimpleRowDataSerializerTest.

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:

  • Dependencies (does it add or upgrade a dependency): no
  • The public API, i.e., is any changed class annotated with @Public(Evolving): no
  • The serializers: no (test-only; it restores coverage of RowDataSerializer, ExternalSerializer and TimestampDataSerializer)
  • The runtime per-record code paths (performance sensitive): no
  • Anything that affects deployment or recovery: no
  • The S3 file system connector: no

Documentation

  • Does this pull request introduce a new feature? no

AI assistance

  • This contribution was created with the assistance of an AI tool: Claude Code

@flinkbot

flinkbot commented Aug 12, 2026

Copy link
Copy Markdown
Collaborator

CI report:

Bot commands The @flinkbot bot supports the following commands:
  • @flinkbot run azure re-run the last Azure build

@spuru9
spuru9 force-pushed the FLINK-nested-test-fix branch from 0635e34 to b990445 Compare August 12, 2026 18:06
…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
spuru9 force-pushed the FLINK-nested-test-fix branch from b990445 to f9996cd Compare August 13, 2026 06:22
@spuru9 spuru9 changed the title [FLINK-XXXXX][tests] Execute TimestampDataSerializerTest variants [FLINK-40382][tests] Execute the serializer test variants in flink-table-type-utils Aug 13, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants