@Test public void checkZookeeperEvenReplicas() { Kafka kafka = ResourceUtils.createKafka(NAMESPACE, NAME, 4, IMAGE, HEALTH_DELAY, HEALTH_TIMEOUT); KafkaSpecChecker checker = generateChecker(kafka); List<Condition> warnings = checker.run(); assertThat(warnings, hasSize(1)); Condition warning = warnings.get(0); assertThat(warning.getReason(), is("ZooKeeperReplicas")); assertThat(warning.getStatus(), is("True")); assertThat(warning.getMessage(), is("Running ZooKeeper with an odd number of replicas is recommended.")); }
public List<Condition> run() { List<Condition> warnings = new ArrayList<>(); checkKafkaLogMessageFormatVersion(warnings); checkKafkaStorage(warnings); checkZooKeeperStorage(warnings); checkZooKeeperReplicas(warnings); return warnings; }
KafkaSpecChecker { public List<Condition> run() { List<Condition> warnings = new ArrayList<>(); checkKafkaLogMessageFormatVersion(warnings); checkKafkaStorage(warnings); checkZooKeeperStorage(warnings); checkZooKeeperReplicas(warnings); return warnings; } }
KafkaSpecChecker { public List<Condition> run() { List<Condition> warnings = new ArrayList<>(); checkKafkaLogMessageFormatVersion(warnings); checkKafkaStorage(warnings); checkZooKeeperStorage(warnings); checkZooKeeperReplicas(warnings); return warnings; } KafkaSpecChecker(KafkaSpec spec, KafkaCluster kafkaCluster, ZookeeperCluster zkCluster); }
KafkaSpecChecker { public List<Condition> run() { List<Condition> warnings = new ArrayList<>(); checkKafkaLogMessageFormatVersion(warnings); checkKafkaStorage(warnings); checkZooKeeperStorage(warnings); checkZooKeeperReplicas(warnings); return warnings; } KafkaSpecChecker(KafkaSpec spec, KafkaCluster kafkaCluster, ZookeeperCluster zkCluster); List<Condition> run(); }
KafkaSpecChecker { public List<Condition> run() { List<Condition> warnings = new ArrayList<>(); checkKafkaLogMessageFormatVersion(warnings); checkKafkaStorage(warnings); checkZooKeeperStorage(warnings); checkZooKeeperReplicas(warnings); return warnings; } KafkaSpecChecker(KafkaSpec spec, KafkaCluster kafkaCluster, ZookeeperCluster zkCluster); List<Condition> run();  }