Skip to content

MINOR: Remove boilerplate code from header serializer test#21837

Open
iit2009060 wants to merge 4 commits intoapache:trunkfrom
iit2009060:minor-remove-bolierplate-header-serializer
Open

MINOR: Remove boilerplate code from header serializer test#21837
iit2009060 wants to merge 4 commits intoapache:trunkfrom
iit2009060:minor-remove-bolierplate-header-serializer

Conversation

@iit2009060
Copy link
Contributor

@iit2009060 iit2009060 commented Mar 20, 2026

Introduces HeadersSerializer.serialize(Headers) as a one-line
alternative to the two-phase serialization API (prepareSerialization +
serialize), reducing boilerplate in test code.

Reviewers: Matthias J. Sax matthias@confluent.io, Nilesh Kumar
nileshkumar3@gmail.com

@github-actions github-actions bot added streams triage PRs from the community small Small PRs labels Mar 20, 2026
@iit2009060 iit2009060 force-pushed the minor-remove-bolierplate-header-serializer branch from 2d42c9a to 0dc445f Compare March 20, 2026 15:21
Copy link
Member

@mjsax mjsax left a comment

Choose a reason for hiding this comment

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

There is three more test classes with the same pattern, which we should update, too.

}
}

public static byte[] serialize(final Headers headers) {
Copy link
Member

Choose a reason for hiding this comment

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

Suggested change
public static byte[] serialize(final Headers headers) {
// for testing
public static byte[] serialize(final Headers headers) {

Copy link
Contributor Author

Choose a reason for hiding this comment

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

done

@iit2009060
Copy link
Contributor Author

There is three more test classes with the same pattern, which we should update, too.
@mjsax Added , Please review.

@iit2009060 iit2009060 requested a review from mjsax March 20, 2026 16:09
Copy link
Contributor

@nileshkumar3 nileshkumar3 left a comment

Choose a reason for hiding this comment

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

LGTM !

@mjsax mjsax changed the title removing boilerplate from header serializer test MINOR: Remove boilerplate code from header serializer test Mar 20, 2026
@mjsax mjsax added ci-approved and removed triage PRs from the community labels Mar 20, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants