Skip to content

Commit

Permalink
test: add cfg to mock
Browse files Browse the repository at this point in the history
  • Loading branch information
ChrisKujawa committed Oct 25, 2021
1 parent e5e6e4d commit 600364b
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@
import io.atomix.raft.RaftServer.Role;
import io.atomix.raft.partition.RaftPartition;
import io.atomix.raft.partition.impl.RaftPartitionServer;
import io.camunda.zeebe.broker.system.configuration.BrokerCfg;
import io.camunda.zeebe.util.exception.UnrecoverableException;
import io.camunda.zeebe.util.health.CriticalComponentsHealthMonitor;
import io.camunda.zeebe.util.health.FailureListener;
Expand Down Expand Up @@ -65,6 +66,8 @@ public void setup() {
when(ctx.getComponentHealthMonitor()).thenReturn(healthMonitor);
when(ctx.createTransitionContext()).thenReturn(ctx);

when(ctx.getBrokerCfg()).thenReturn(new BrokerCfg());

partition = new ZeebePartition(ctx, transition, List.of(new NoopStartupStep()));
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@
import io.atomix.raft.RaftServer.Role;
import io.atomix.raft.partition.RaftPartition;
import io.atomix.raft.partition.impl.RaftPartitionServer;
import io.camunda.zeebe.broker.system.configuration.BrokerCfg;
import io.camunda.zeebe.broker.system.partitions.impl.PartitionTransitionImpl;
import io.camunda.zeebe.broker.system.partitions.impl.TestPartitionStep;
import io.camunda.zeebe.util.health.CriticalComponentsHealthMonitor;
Expand Down Expand Up @@ -53,6 +54,7 @@ public void setup() {
when(ctx.getPartitionContext()).thenReturn(ctx);
when(ctx.getComponentHealthMonitor()).thenReturn(healthMonitor);
when(ctx.createTransitionContext()).thenReturn(ctx);
when(ctx.getBrokerCfg()).thenReturn(new BrokerCfg());
}

@Test
Expand Down

0 comments on commit 600364b

Please sign in to comment.