Skip to content

Commit

Permalink
KAFKA-13187: Replace EasyMock / PowerMock with Mockito in Distributed…
Browse files Browse the repository at this point in the history
…HerderTest (#14102)

Reviewers: Chris Egerton <chrise@aiven.io>
  • Loading branch information
yashmayya authored Aug 10, 2023
1 parent 0ee2664 commit f2ebd33
Show file tree
Hide file tree
Showing 3 changed files with 1,557 additions and 2,460 deletions.
1 change: 0 additions & 1 deletion build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -415,7 +415,6 @@ subprojects {
if (JavaVersion.current().isCompatibleWith(JavaVersion.VERSION_16)) {
testsToExclude.addAll([
// connect tests
"**/DistributedHerderTest.*",
"**/KafkaConfigBackingStoreTest.*",
"**/KafkaBasedLogTest.*", "**/StandaloneHerderTest.*",
"**/WorkerSinkTaskTest.*", "**/WorkerSinkTaskThreadedTest.*"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -173,7 +173,8 @@ public class DistributedHerder extends AbstractHerder implements Runnable {

// Visible for testing
ExecutorService forwardRequestExecutor;
private final ExecutorService herderExecutor;
// Visible for testing
final ExecutorService herderExecutor;
// Visible for testing
ExecutorService startAndStopExecutor;
private final WorkerGroupMember member;
Expand Down Expand Up @@ -274,7 +275,8 @@ public DistributedHerder(DistributedConfig config,
ConnectorClientConfigOverridePolicy connectorClientConfigOverridePolicy,
List<String> restNamespace,
ExecutorService forwardRequestExecutor,
AutoCloseable... uponShutdown) {
// https://github.com/mockito/mockito/issues/2601 explains why we can't use varargs here
AutoCloseable[] uponShutdown) {
super(worker, workerId, kafkaClusterId, statusBackingStore, configBackingStore, connectorClientConfigOverridePolicy);

this.time = time;
Expand Down
Loading

0 comments on commit f2ebd33

Please sign in to comment.