Skip to content

MINOR: Update of the PAPI testing classes to the latest implementation#12740

Merged
mjsax merged 3 commits into
apache:trunkfrom
calmera:feature/papi-testing-update
Feb 23, 2024
Merged

MINOR: Update of the PAPI testing classes to the latest implementation#12740
mjsax merged 3 commits into
apache:trunkfrom
calmera:feature/papi-testing-update

Conversation

@calmera

@calmera calmera commented Oct 13, 2022

Copy link
Copy Markdown
Contributor

The papi tests were still using the old PAPI classes. This makes it cumbersome to write tests for new PAPI functionality.

@mjsax This is the split out of the functionality which was proposed by the PR for KIP-813

@mjsax mjsax added streams tests Test fixes (including flaky tests) labels Dec 28, 2022

@mjsax mjsax left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Thanks for the PR. Overall LGTM. A few minor comments/questions.

Comment thread streams/src/test/java/org/apache/kafka/test/MockProcessor.java Outdated
Comment thread streams/src/test/java/org/apache/kafka/test/MockProcessor.java Outdated
Comment thread streams/src/test/java/org/apache/kafka/test/MockProcessor.java
Comment thread streams/src/test/java/org/apache/kafka/test/MockProcessor.java Outdated
@mjsax mjsax changed the title Update of the PAPI testing classes to the latest implementation MINOR: Update of the PAPI testing classes to the latest implementation Oct 13, 2023

@mjsax mjsax left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

One minor question. Overall LGTM.

public void process(final K key, final V value) {
delegate.process(new Record<>(key, value, context.timestamp(), context.headers()));
public void process(Record<KIn, VIn> record) {
delegate.process(new Record<>(record.key(), record.value(), record.timestamp(), record.headers()));

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Why do we need to make a deep copy? Can we not just forward record reference?

@mjsax mjsax force-pushed the feature/papi-testing-update branch from c6f380b to 870d98d Compare February 17, 2024 01:58
@mjsax mjsax merged commit 06392f7 into apache:trunk Feb 23, 2024
wcarlson5 pushed a commit to wcarlson5/kafka that referenced this pull request Mar 28, 2024
clolov pushed a commit to clolov/kafka that referenced this pull request Apr 5, 2024
Phuc-Hong-Tran pushed a commit to Phuc-Hong-Tran/kafka that referenced this pull request Jun 6, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

streams tests Test fixes (including flaky tests)

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants