use of io.strimzi.operator.common.operator.resource.TimeoutException in project strimzi-kafka-operator by strimzi.
the class KafkaRollerTest method pod0NotReadyAfterRolling.
@Test
public void pod0NotReadyAfterRolling(VertxTestContext testContext) throws InterruptedException {
PodOperator podOps = mockPodOps(podId -> podId == 0 ? failedFuture(new TimeoutException("Timeout")) : succeededFuture());
StatefulSet sts = buildStatefulSet();
TestingKafkaRoller kafkaRoller = rollerWithControllers(sts, podOps, 2);
// What does/did the ZK algo do?
doFailingRollingRestart(testContext, kafkaRoller, asList(0, 1, 2, 3, 4), KafkaRoller.FatalProblem.class, "Error while waiting for restarted pod c-kafka-0 to become ready", singletonList(0));
// TODO assert subsequent rolls
}
use of io.strimzi.operator.common.operator.resource.TimeoutException in project strimzi-kafka-operator by strimzi.
the class KafkaRollerTest method controllerNotReadyAfterRolling.
@Test
public void controllerNotReadyAfterRolling(VertxTestContext testContext) throws InterruptedException {
PodOperator podOps = mockPodOps(podId -> podId == 2 ? failedFuture(new TimeoutException("Timeout")) : succeededFuture());
StatefulSet sts = buildStatefulSet();
TestingKafkaRoller kafkaRoller = rollerWithControllers(sts, podOps, 2);
// On the first reconciliation we expect it to fail when rolling the controller (i.e. as rolling all the rest)
doFailingRollingRestart(testContext, kafkaRoller, asList(0, 1, 2, 3, 4), KafkaRoller.FatalProblem.class, "Error while waiting for restarted pod c-kafka-2 to become ready", asList(0, 1, 3, 4, 2));
// On the next reconciliation only pod 2 would need rolling, and we expect it to fail in the same way
kafkaRoller = rollerWithControllers(sts, podOps, 2);
clearRestarted();
doFailingRollingRestart(testContext, kafkaRoller, singletonList(2), KafkaRoller.FatalProblem.class, "Error while waiting for restarted pod c-kafka-2 to become ready", singletonList(2));
}
use of io.strimzi.operator.common.operator.resource.TimeoutException in project strimzi-kafka-operator by strimzi.
the class KafkaRollerTest method pod1NotReadyAfterRolling.
@Test
public void pod1NotReadyAfterRolling(VertxTestContext testContext) throws InterruptedException {
PodOperator podOps = mockPodOps(podId -> podId == 1 ? failedFuture(new TimeoutException("Timeout")) : succeededFuture());
StatefulSet sts = buildStatefulSet();
TestingKafkaRoller kafkaRoller = rollerWithControllers(sts, podOps, 2);
// On the first reconciliation we expect it to abort when it gets to pod 1
doFailingRollingRestart(testContext, kafkaRoller, asList(0, 1, 2, 3, 4), KafkaRoller.FatalProblem.class, "Error while waiting for restarted pod c-kafka-1 to become ready", asList(1));
// On the next reconciliation only pod 2 (controller) would need rolling, and we expect it to fail in the same way
kafkaRoller = rollerWithControllers(sts, podOps, 2);
clearRestarted();
doFailingRollingRestart(testContext, kafkaRoller, asList(2, 3, 4), KafkaRoller.FatalProblem.class, "Error while waiting for non-restarted pod c-kafka-1 to become ready", emptyList());
}
use of io.strimzi.operator.common.operator.resource.TimeoutException in project strimzi by strimzi.
the class KafkaRollerTest method pod0NotReadyAfterRolling.
@Test
public void pod0NotReadyAfterRolling(VertxTestContext testContext) throws InterruptedException {
PodOperator podOps = mockPodOps(podId -> podId == 0 ? failedFuture(new TimeoutException("Timeout")) : succeededFuture());
StatefulSet sts = buildStatefulSet();
TestingKafkaRoller kafkaRoller = rollerWithControllers(sts, podOps, 2);
// What does/did the ZK algo do?
doFailingRollingRestart(testContext, kafkaRoller, asList(0, 1, 2, 3, 4), KafkaRoller.FatalProblem.class, "Error while waiting for restarted pod c-kafka-0 to become ready", singletonList(0));
// TODO assert subsequent rolls
}
use of io.strimzi.operator.common.operator.resource.TimeoutException in project strimzi by strimzi.
the class KafkaRollerTest method controllerNotReadyAfterRolling.
@Test
public void controllerNotReadyAfterRolling(VertxTestContext testContext) throws InterruptedException {
PodOperator podOps = mockPodOps(podId -> podId == 2 ? failedFuture(new TimeoutException("Timeout")) : succeededFuture());
StatefulSet sts = buildStatefulSet();
TestingKafkaRoller kafkaRoller = rollerWithControllers(sts, podOps, 2);
// On the first reconciliation we expect it to fail when rolling the controller (i.e. as rolling all the rest)
doFailingRollingRestart(testContext, kafkaRoller, asList(0, 1, 2, 3, 4), KafkaRoller.FatalProblem.class, "Error while waiting for restarted pod c-kafka-2 to become ready", asList(0, 1, 3, 4, 2));
// On the next reconciliation only pod 2 would need rolling, and we expect it to fail in the same way
kafkaRoller = rollerWithControllers(sts, podOps, 2);
clearRestarted();
doFailingRollingRestart(testContext, kafkaRoller, singletonList(2), KafkaRoller.FatalProblem.class, "Error while waiting for restarted pod c-kafka-2 to become ready", singletonList(2));
}
Aggregations