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 (apache#14102)

Reviewers: Chris Egerton <chrise@aiven.io>
  • Loading branch information
yashmayya authored and jeqo committed Aug 15, 2023
1 parent 239a470 commit e1d7fc8
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 e1d7fc8

Please sign in to comment.