Skip to content

Commit

Permalink
build(deps): upgrade vertx to 4.5.9
Browse files Browse the repository at this point in the history
  • Loading branch information
github-actions[bot] authored and halber committed Aug 1, 2024
1 parent 779001c commit 87d2132
Show file tree
Hide file tree
Showing 4 changed files with 17 additions and 6 deletions.
2 changes: 1 addition & 1 deletion build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ repositories {

dependencies {
// Framework dependencies
def vertx_version = '4.5.7'
def vertx_version = '4.5.9'
implementation group: 'io.vertx', name: 'vertx-core', version: vertx_version
implementation group: 'io.vertx', name: 'vertx-web', version: vertx_version
implementation group: 'io.vertx', name: 'vertx-web-client', version: vertx_version
Expand Down
17 changes: 13 additions & 4 deletions src/main/java/io/neonbee/internal/deploy/PendingDeployment.java
Original file line number Diff line number Diff line change
Expand Up @@ -10,11 +10,13 @@
import io.neonbee.NeonBee;
import io.neonbee.logging.LoggingFacade;
import io.vertx.core.AsyncResult;
import io.vertx.core.Expectation;
import io.vertx.core.Future;
import io.vertx.core.Handler;
import io.vertx.core.Promise;
import io.vertx.core.Vertx;
import io.vertx.core.impl.ContextInternal;
import io.vertx.core.impl.future.Expect;
import io.vertx.core.impl.future.FutureInternal;
import io.vertx.core.impl.future.Listener;

Expand Down Expand Up @@ -55,6 +57,13 @@ public abstract class PendingDeployment extends Deployment implements FutureInte
});
}

@Override
public Future<Deployment> expecting(Expectation<? super Deployment> expectation) {
Expect<Deployment> expect = new Expect(context(), expectation);
this.addListener(expect);
return expect;
}

@Override
public final Future<Void> undeploy() {
Deployable deployable = getDeployable();
Expand Down Expand Up @@ -85,6 +94,10 @@ public final Future<Void> undeploy() {
*/
protected abstract Future<Void> undeploy(String deploymentId);

private Future<Deployment> mapDeployment() {
return deployFuture.map((Deployment) this);
}

@Override
public String getDeploymentId() {
return deployFuture.result();
Expand Down Expand Up @@ -181,8 +194,4 @@ public void removeListener(Listener<Deployment> listener) {
public Future<Deployment> timeout(long delay, TimeUnit unit) {
return mapDeployment().timeout(delay, unit);
}

private Future<Deployment> mapDeployment() {
return deployFuture.map((Deployment) this);
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@
import io.neonbee.entity.EntityWrapper;
import io.vertx.core.http.HttpServerRequest;
import io.vertx.core.http.impl.HttpServerRequestInternal;
import io.vertx.core.net.HostAndPort;
import io.vertx.ext.web.RoutingContext;
import io.vertx.ext.web.impl.RouterImpl;
import io.vertx.ext.web.impl.RoutingContextImpl;
Expand All @@ -30,6 +31,7 @@ class ProcessorHelperTest {
void transferResponseHint() {
HttpServerRequest request = Mockito.mock(HttpServerRequestInternal.class);
Mockito.when(request.path()).thenReturn("/path");
Mockito.when(request.authority()).thenReturn(Mockito.mock(HostAndPort.class));
RouterImpl router = Mockito.mock(RouterImpl.class);
Mockito.when(router.getAllowForward()).thenReturn(null);
RoutingContext routingContext = new RoutingContextImpl(null, router, request, Set.of());
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -71,7 +71,7 @@ void cycleTest(VertxTestContext testContext) {
@DisplayName("should fail when passed parameters are invalid")
void validationTest(VertxTestContext testContext) {
String expectedErrorMsg =
"Error 400: The value of the request / response body is invalid. Reason: Instance does not have "
"Error 400: The value of the request body is invalid. Reason: Instance does not have "
+ "required property \"name\"";
createPet(new JsonObject().put("invalidParam", PET1_NAME))
.onComplete(testContext.succeeding(resp -> testContext.verify(() -> {
Expand Down

0 comments on commit 87d2132

Please sign in to comment.