-
Notifications
You must be signed in to change notification settings - Fork 15.4k
KAFKA-7551:Refactor to create producer & consumer in the worker. #5842
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -162,12 +162,11 @@ public void setUp() { | |
| } | ||
|
|
||
| private void createTask(TargetState initialState) { | ||
| workerTask = PowerMock.createPartialMock( | ||
| WorkerSinkTask.class, new String[]{"createConsumer"}, | ||
| taskId, sinkTask, statusListener, initialState, workerConfig, ClusterConfigState.EMPTY, metrics, | ||
| keyConverter, valueConverter, headerConverter, | ||
| transformationChain, pluginLoader, time, | ||
| RetryWithToleranceOperatorTest.NOOP_OPERATOR); | ||
| workerTask = new WorkerSinkTask( | ||
|
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I can't remember all the details of when the powermock runner ends up being required, but this looks like we may have removed any need for powermock in this test other than We don't need to do this here, but if we clean up uses of PowerMock we should consider doing cleanup passes for things like the test runner. Alternatively, might make sense to, at some point, do a JIRA dedicated to just removing use of powermock.
Contributor
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I have created a test to address this for Connect. I haven't looked upto see if other components are using it as well. If they do, I will create tickets for those as well. https://issues.apache.org/jira/browse/KAFKA-7686 |
||
| taskId, sinkTask, statusListener, initialState, workerConfig, ClusterConfigState.EMPTY, metrics, | ||
| keyConverter, valueConverter, headerConverter, | ||
| transformationChain, consumer, pluginLoader, time, | ||
| RetryWithToleranceOperatorTest.NOOP_OPERATOR); | ||
|
mageshn marked this conversation as resolved.
Outdated
|
||
| } | ||
|
|
||
| @After | ||
|
|
@@ -1167,7 +1166,6 @@ public void testTopicsRegex() throws Exception { | |
|
|
||
| createTask(TargetState.PAUSED); | ||
|
|
||
| PowerMock.expectPrivate(workerTask, "createConsumer").andReturn(consumer); | ||
| consumer.subscribe(EasyMock.capture(topicsRegex), EasyMock.capture(rebalanceListener)); | ||
| PowerMock.expectLastCall(); | ||
|
|
||
|
|
@@ -1255,7 +1253,6 @@ public void testMetricsGroup() { | |
| } | ||
|
|
||
| private void expectInitializeTask() throws Exception { | ||
| PowerMock.expectPrivate(workerTask, "createConsumer").andReturn(consumer); | ||
| consumer.subscribe(EasyMock.eq(asList(TOPIC)), EasyMock.capture(rebalanceListener)); | ||
| PowerMock.expectLastCall(); | ||
|
|
||
|
|
||
Uh oh!
There was an error while loading. Please reload this page.