mirror of https://github.com/apache/kafka.git
MINOR: Allow schedule and commit in MockProcessorContext
This change allows for testing custom Processors and Transformers that call `schedule` and `commit` using KStreamTestDriver, by _not_ throwing `UnsupportedOperationException`. This PR is my original work. Author: Mats Julian Olsen <mats@plysjbyen.net> Reviewers: Guozhang Wang <wangguoz@gmail.com> Closes #3992 from mewwts/allow-schedule-and-commit
This commit is contained in:
parent
974d6fec93
commit
fb6ca658d6
|
|
@ -164,14 +164,10 @@ public class MockProcessorContext extends AbstractProcessorContext implements Re
|
|||
}
|
||||
|
||||
@Override
|
||||
public void schedule(final long interval) {
|
||||
throw new UnsupportedOperationException("schedule() not supported.");
|
||||
}
|
||||
public void schedule(final long interval) { }
|
||||
|
||||
@Override
|
||||
public void commit() {
|
||||
throw new UnsupportedOperationException("commit() not supported.");
|
||||
}
|
||||
public void commit() { }
|
||||
|
||||
@Override
|
||||
@SuppressWarnings("unchecked")
|
||||
|
|
|
|||
Loading…
Reference in New Issue