Skip to content

Commit

Permalink
Update Vert.x and related dependencies (#9737)
Browse files Browse the repository at this point in the history
Signed-off-by: Jakub Scholz <[email protected]>
  • Loading branch information
scholzj authored Feb 25, 2024
1 parent c58e67c commit 7e37c81
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 19 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -4,15 +4,12 @@
*/
package io.strimzi.operator.cluster.operator.resource;

import io.fabric8.kubernetes.api.model.Pod;
import io.fabric8.kubernetes.api.model.PodBuilder;
import io.fabric8.kubernetes.api.model.Secret;
import io.fabric8.kubernetes.api.model.SecretBuilder;
import io.strimzi.api.kafka.model.kafka.KafkaResources;
import io.strimzi.operator.common.BackOff;
import io.strimzi.operator.common.Reconciliation;
import io.strimzi.operator.common.model.Ca;
import io.strimzi.operator.common.model.Labels;
import io.strimzi.operator.common.operator.resource.SecretOperator;
import io.vertx.core.Future;
import io.vertx.core.Promise;
Expand Down Expand Up @@ -92,6 +89,7 @@ NetClientOptions clientOptions(Reconciliation reconciliation, Secret coCertKeySe
return new NetClientOptions()
.setKeyCertOptions(coCertificate.keyCertOptions())
.setTrustOptions(zkCertificate.trustOptions())
.setHostnameVerificationAlgorithm("")
.setSsl(true);
}

Expand Down Expand Up @@ -232,7 +230,7 @@ public void test1PodClusterReturnsOnlyPodAsLeader(VertxTestContext context) {
int firstPodIndex = 0;
finder.findZookeeperLeader(Reconciliation.DUMMY_RECONCILIATION, Set.of(createPodWithId(firstPodIndex)), dummySecret(), dummySecret())
.onComplete(context.succeeding(leader -> {
context.verify(() -> assertThat(leader, is("my-cluster-kafka-0")));
context.verify(() -> assertThat(leader, is("my-cluster-zookeeper-0")));
a.flag();
}));
}
Expand Down Expand Up @@ -349,7 +347,7 @@ public void testReturnUnknownLeaderDuringNetworkExceptions(VertxTestContext cont
@Test
public void testFinderHandlesFailureByLeaderFoundOnThirdAttempt(VertxTestContext context) throws InterruptedException {
int desiredLeaderId = 1;
String leaderPod = "my-cluster-kafka-1";
String leaderPod = "my-cluster-zookeeper-1";
int succeedOnAttempt = 2;

int[] ports = startMockZks(context, 2, (id, attempt) -> attempt == succeedOnAttempt && id == desiredLeaderId);
Expand All @@ -370,7 +368,7 @@ public void testFinderHandlesFailureByLeaderFoundOnThirdAttempt(VertxTestContext
@Test
public void testLeaderFoundFirstAttempt(VertxTestContext context) throws InterruptedException {
int leader = 1;
String leaderPod = "my-cluster-kafka-1";
String leaderPod = "my-cluster-zookeeper-1";

int[] ports = startMockZks(context, 2, (id, attempt) -> id == leader);

Expand All @@ -388,19 +386,11 @@ public void testLeaderFoundFirstAttempt(VertxTestContext context) throws Interru
}

String createPodWithId(int id) {
return "my-cluster-kafka-" + id;
return "my-cluster-zookeeper-" + id;
}

@Test
public void testGetHostReturnsCorrectHostForGivenPod() {
Pod pod = new PodBuilder()
.withNewMetadata()
.withName(KafkaResources.zookeeperPodName("my-cluster", 3))
.withNamespace("myproject")
.addToLabels(Labels.STRIMZI_CLUSTER_LABEL, "my-cluster")
.endMetadata()
.build();

assertThat(new ZookeeperLeaderFinder(vertx, this::backoff).host(new Reconciliation("test", "Kafka", "myproject", "my-cluster"), KafkaResources.zookeeperPodName("my-cluster", 3)),
is("my-cluster-zookeeper-3.my-cluster-zookeeper-nodes.myproject.svc.cluster.local"));
}
Expand Down
8 changes: 4 additions & 4 deletions pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -134,8 +134,8 @@
<fasterxml.jackson-annotations.version>2.16.1</fasterxml.jackson-annotations.version>
<fasterxml.jackson-datatype.version>2.16.1</fasterxml.jackson-datatype.version>
<fasterxml.jackson-jaxrs.version>2.16.1</fasterxml.jackson-jaxrs.version>
<vertx.version>4.5.3</vertx.version>
<vertx-junit5.version>4.5.3</vertx-junit5.version>
<vertx.version>4.5.4</vertx.version>
<vertx-junit5.version>4.5.4</vertx-junit5.version>
<kafka.version>3.6.1</kafka.version>
<yammer-metrics.version>2.2.0</yammer-metrics.version>
<zookeeper.version>3.8.3</zookeeper.version>
Expand All @@ -147,8 +147,8 @@
<jetty.version>9.4.53.v20231009</jetty.version>
<javax-servlet.version>3.1.0</javax-servlet.version>
<strimzi-oauth.version>0.14.0</strimzi-oauth.version>
<netty.version>4.1.106.Final</netty.version>
<micrometer.version>1.12.2</micrometer.version>
<netty.version>4.1.107.Final</netty.version>
<micrometer.version>1.12.3</micrometer.version>
<jayway-jsonpath.version>2.9.0</jayway-jsonpath.version>
<registry.version>1.3.2.Final</registry.version>
<commons-codec.version>1.13</commons-codec.version>
Expand Down

0 comments on commit 7e37c81

Please sign in to comment.