Skip to content

Data: Split BaseFormatModelTests into read and read-write test classes - #17711

Merged
pvary merged 1 commit into
apache:mainfrom
joyhaldar:read-format-model-tests
Aug 20, 2026
Merged

Data: Split BaseFormatModelTests into read and read-write test classes#17711
pvary merged 1 commit into
apache:mainfrom
joyhaldar:read-format-model-tests

Conversation

@joyhaldar

@joyhaldar joyhaldar commented Aug 18, 2026

Copy link
Copy Markdown
Contributor

Splits the format model TCK base class so engines that only support reads can inherit the read tests without the write ones.

  • New ReadFormatModelTests holds the read tests and shared helpers
  • BaseFormatModelTests extends it and holds the engine write tests
  • No existing subclass changes its extends
  • Verified the refactor is behaviour preserving, TestSparkFormatModel and TestFlinkFormatModel both report 361 tests / 0 failures before and after the split.

Pure refactor, no test bodies changed.

import org.junit.jupiter.params.provider.Arguments;
import org.junit.jupiter.params.provider.FieldSource;

public abstract class ReadFormatModelTests<T> {

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please add javadoc

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Done Péter.


TestTables.clearTables();
}
public abstract class BaseFormatModelTests<T> extends ReadFormatModelTests<T> {

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Javadoc

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Done Péter.

@pvary

pvary commented Aug 19, 2026

Copy link
Copy Markdown
Contributor

Please add javadoc to the 2 classes.

Co-authored-by: Joy Haldar <joy.haldar@target.com>
@joyhaldar
joyhaldar force-pushed the read-format-model-tests branch from 4a03fad to 31507f2 Compare August 19, 2026 14:32
@joyhaldar
joyhaldar marked this pull request as ready for review August 19, 2026 14:35
@pvary
pvary merged commit 84cfd6f into apache:main Aug 20, 2026
38 checks passed
@pvary

pvary commented Aug 20, 2026

Copy link
Copy Markdown
Contributor

Merged to main.
Thanks @joyhaldar for the PR and @Guosmilesmile for the review!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants