Skip to content

Commit

Permalink
chore(pom): upgrade vert-x from 4.4.4 to 4.4.9 (#1913) (#1916)
Browse files Browse the repository at this point in the history
* chore(pom): upgrade vertx from 4.4.4 to 4.4.9

* fix test mockito specifications for new overload

* upgrade netty

(cherry picked from commit b2e0c30)

Co-authored-by: Andrew Azores <aazores@redhat.com>
  • Loading branch information
mergify[bot] and andrewazores committed Apr 22, 2024
1 parent bf58882 commit 73d70f3
Show file tree
Hide file tree
Showing 4 changed files with 10 additions and 8 deletions.
4 changes: 2 additions & 2 deletions pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -94,8 +94,8 @@
<org.apache.commons.io.version>2.13.0</org.apache.commons.io.version>
<org.apache.httpcomponents.version>4.5.14</org.apache.httpcomponents.version>
<io.fabric8.client.version>6.7.2</io.fabric8.client.version>
<io.netty.version>4.1.101.Final</io.netty.version>
<io.vertx.version>4.4.4</io.vertx.version>
<io.netty.version>4.1.108.Final</io.netty.version>
<io.vertx.version>4.4.9</io.vertx.version>
<!--
FIXME this needs to be synced with the vertx version - is there a BOM to use or something?
https://github.com/vert-x3/vertx-web/blob/${io.vertx.version}/vertx-web-graphql/pom.xml#L35
Expand Down
2 changes: 1 addition & 1 deletion src/test/java/io/cryostat/MockVertx.java
Original file line number Diff line number Diff line change
Expand Up @@ -114,7 +114,7 @@ public boolean failed() {
.executeBlocking(Mockito.any(), Mockito.any());

Mockito.lenient()
.when(vertx.executeBlocking(Mockito.any()))
.when(vertx.executeBlocking(Mockito.any(Handler.class)))
.thenAnswer(
new Answer() {
@Override
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,7 @@
import io.cryostat.rules.RuleRegistry;

import com.google.gson.Gson;
import io.vertx.core.Handler;
import io.vertx.core.MultiMap;
import io.vertx.core.Vertx;
import io.vertx.core.http.HttpMethod;
Expand Down Expand Up @@ -181,7 +182,7 @@ void shouldRespondWith404ForNonexistentRule() throws Exception {
Assertions.assertThrows(ApiException.class, () -> handler.handle(params));
MatcherAssert.assertThat(ex.getStatusCode(), Matchers.equalTo(404));

Mockito.verify(vertx, Mockito.never()).executeBlocking(Mockito.any());
Mockito.verify(vertx, Mockito.never()).executeBlocking(Mockito.any(Handler.class));
Mockito.verify(registry, Mockito.never()).deleteRule(Mockito.any(Rule.class));
Mockito.verify(registry, Mockito.never()).deleteRule(Mockito.anyString());
Mockito.verify(registry, Mockito.never()).applies(Mockito.any(), Mockito.any());
Expand Down Expand Up @@ -223,7 +224,7 @@ void shouldRespondWith200ForCleanupFailures() throws Exception {
IntermediateResponse<Void> response = handler.handle(params);
MatcherAssert.assertThat(response.getStatusCode(), Matchers.equalTo(200));

Mockito.verify(vertx, Mockito.times(2)).executeBlocking(Mockito.any());
Mockito.verify(vertx, Mockito.times(2)).executeBlocking(Mockito.any(Handler.class));
Mockito.verify(registry).deleteRule(rule);
Mockito.verify(registry).applies(rule, serviceRef);
Mockito.verify(recordingTargetHelper)
Expand Down Expand Up @@ -253,7 +254,7 @@ void shouldRespondWith200AfterCleanupNoop() throws Exception {
IntermediateResponse<Void> response = handler.handle(params);
MatcherAssert.assertThat(response.getStatusCode(), Matchers.equalTo(200));

Mockito.verify(vertx, Mockito.times(1)).executeBlocking(Mockito.any());
Mockito.verify(vertx, Mockito.times(1)).executeBlocking(Mockito.any(Handler.class));
Mockito.verify(registry).deleteRule(rule);
Mockito.verify(registry, Mockito.never()).applies(Mockito.any(), Mockito.any());
Mockito.verify(recordingTargetHelper, Mockito.never())
Expand Down Expand Up @@ -288,7 +289,7 @@ void shouldRespondWith200AfterSuccessfulCleanup() throws Exception {
IntermediateResponse<Void> response = handler.handle(params);
MatcherAssert.assertThat(response.getStatusCode(), Matchers.equalTo(200));

Mockito.verify(vertx, Mockito.times(2)).executeBlocking(Mockito.any());
Mockito.verify(vertx, Mockito.times(2)).executeBlocking(Mockito.any(Handler.class));
Mockito.verify(registry).deleteRule(rule);
Mockito.verify(registry).applies(Mockito.any(), Mockito.any());
Mockito.verify(recordingTargetHelper)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,7 @@
import io.cryostat.rules.RuleRegistry;

import com.google.gson.Gson;
import io.vertx.core.Handler;
import io.vertx.core.MultiMap;
import io.vertx.core.Vertx;
import io.vertx.core.http.HttpMethod;
Expand Down Expand Up @@ -220,7 +221,7 @@ void shouldDisableRuleAndCleanup() throws Exception {
Mockito.verify(notificationBuilder).build();
Mockito.verify(notification).send();

Mockito.verify(vertx, Mockito.times(2)).executeBlocking(Mockito.any());
Mockito.verify(vertx, Mockito.times(2)).executeBlocking(Mockito.any(Handler.class));
Mockito.verify(registry)
.applies(Mockito.any(Rule.class), Mockito.any(ServiceRef.class));
Mockito.verify(recordingTargetHelper)
Expand Down

0 comments on commit 73d70f3

Please sign in to comment.