Search in sources :

Example 1 with ZookeeperScalerProvider

use of io.strimzi.operator.cluster.operator.resource.ZookeeperScalerProvider in project strimzi by strimzi.

the class ResourceUtils method zookeeperScalerProvider.

public static ZookeeperScalerProvider zookeeperScalerProvider() {
    return new ZookeeperScalerProvider() {

        @Override
        public ZookeeperScaler createZookeeperScaler(Reconciliation reconciliation, Vertx vertx, String zookeeperConnectionString, Function<Integer, String> zkNodeAddress, Secret clusterCaCertSecret, Secret coKeySecret, long operationTimeoutMs, int zkAdminSessionTimoutMs) {
            ZookeeperScaler mockZooScaler = mock(ZookeeperScaler.class);
            when(mockZooScaler.scale(anyInt())).thenReturn(Future.succeededFuture());
            return mockZooScaler;
        }
    };
}
Also used : Secret(io.fabric8.kubernetes.api.model.Secret) Function(java.util.function.Function) ZookeeperScaler(io.strimzi.operator.cluster.operator.resource.ZookeeperScaler) Reconciliation(io.strimzi.operator.common.Reconciliation) ZookeeperScalerProvider(io.strimzi.operator.cluster.operator.resource.ZookeeperScalerProvider) ArgumentMatchers.anyString(org.mockito.ArgumentMatchers.anyString) Vertx(io.vertx.core.Vertx)

Example 2 with ZookeeperScalerProvider

use of io.strimzi.operator.cluster.operator.resource.ZookeeperScalerProvider in project strimzi-kafka-operator by strimzi.

the class ResourceUtils method zookeeperScalerProvider.

public static ZookeeperScalerProvider zookeeperScalerProvider() {
    return new ZookeeperScalerProvider() {

        @Override
        public ZookeeperScaler createZookeeperScaler(Reconciliation reconciliation, Vertx vertx, String zookeeperConnectionString, Function<Integer, String> zkNodeAddress, Secret clusterCaCertSecret, Secret coKeySecret, long operationTimeoutMs, int zkAdminSessionTimoutMs) {
            ZookeeperScaler mockZooScaler = mock(ZookeeperScaler.class);
            when(mockZooScaler.scale(anyInt())).thenReturn(Future.succeededFuture());
            return mockZooScaler;
        }
    };
}
Also used : Secret(io.fabric8.kubernetes.api.model.Secret) Function(java.util.function.Function) ZookeeperScaler(io.strimzi.operator.cluster.operator.resource.ZookeeperScaler) Reconciliation(io.strimzi.operator.common.Reconciliation) ZookeeperScalerProvider(io.strimzi.operator.cluster.operator.resource.ZookeeperScalerProvider) ArgumentMatchers.anyString(org.mockito.ArgumentMatchers.anyString) Vertx(io.vertx.core.Vertx)

Aggregations

Secret (io.fabric8.kubernetes.api.model.Secret)2 ZookeeperScaler (io.strimzi.operator.cluster.operator.resource.ZookeeperScaler)2 ZookeeperScalerProvider (io.strimzi.operator.cluster.operator.resource.ZookeeperScalerProvider)2 Reconciliation (io.strimzi.operator.common.Reconciliation)2 Vertx (io.vertx.core.Vertx)2 Function (java.util.function.Function)2 ArgumentMatchers.anyString (org.mockito.ArgumentMatchers.anyString)2