Skip to content

Commit

Permalink
spotless plugin changes
Browse files Browse the repository at this point in the history
  • Loading branch information
pivotal-david-osullivan committed Dec 3, 2024
1 parent 0dc8954 commit b0f7f99
Show file tree
Hide file tree
Showing 4 changed files with 32 additions and 27 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -100,7 +100,7 @@ public abstract class Deployment extends Resource {
@Nullable
public abstract DeploymentStrategy getStrategy();

/**
/**
* The options for the deployment
*/
@JsonProperty("options")
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -39,8 +39,10 @@ void noName() {
.id("test-id")
.build())
.build())
.currentDroplet(ToOneRelationship.builder()
.data(Relationship.builder().build()).build())
.currentDroplet(
ToOneRelationship.builder()
.data(Relationship.builder().build())
.build())
.build())
.build();
});
Expand All @@ -65,8 +67,10 @@ void valid() {
ToOneRelationship.builder()
.data(Relationship.builder().id("test-id").build())
.build())
.currentDroplet(ToOneRelationship.builder()
.data(Relationship.builder().build()).build())
.currentDroplet(
ToOneRelationship.builder()
.data(Relationship.builder().build())
.build())
.build())
.build();
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -40,8 +40,8 @@ void valid() {
ToOneRelationship.builder()
.data(Relationship.builder().id("test-id").build())
.build())
.currentDroplet(ToOneRelationship.builder()
.data(Relationship.builder().build()).build())
.currentDroplet(
ToOneRelationship.builder().data(Relationship.builder().build()).build())
.build();
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -16,11 +16,7 @@

package org.cloudfoundry.routing.v1;


import static org.cloudfoundry.util.DelayUtils.exponentialBackOff;
import java.time.Duration;
import java.util.List;

import org.cloudfoundry.AbstractIntegrationTest;
import org.cloudfoundry.NameFactory;
import org.cloudfoundry.routing.RoutingClient;
Expand All @@ -36,10 +32,8 @@
import org.cloudfoundry.routing.v1.tcproutes.TcpRoute;
import org.cloudfoundry.routing.v1.tcproutes.TcpRouteConfiguration;
import org.cloudfoundry.routing.v1.tcproutes.TcpRouteDeletion;
import org.cloudfoundry.routing.v1.tcproutes.TcpRoutes;
import org.junit.jupiter.api.Test;
import org.springframework.beans.factory.annotation.Autowired;

import reactor.core.publisher.Flux;
import reactor.core.publisher.Mono;
import reactor.test.StepVerifier;
Expand Down Expand Up @@ -103,7 +97,7 @@ public void delete() {
port,
routerGroupId))
.flatMap(
routerGroupId ->
routerGroupId ->
this.routingClient
.tcpRoutes()
.delete(
Expand All @@ -116,19 +110,26 @@ public void delete() {
.routerGroupId(
routerGroupId)
.build())
.build())
)
.thenMany(requestListTcpRoutes(this.routingClient)
.flatMapIterable(ListTcpRoutesResponse::getTcpRoutes)
.filter(route -> backendIp.equals(route.getBackendIp()))
.filter(route -> backendPort.equals(route.getBackendPort()))
.filter(route -> port.equals(route.getPort()))
.flatMap(e -> !"".equals(e.getBackendIp()) ?
Flux.error(new RuntimeException("route still found")) :
Flux.just(e)
)
.retryWhen(Retry.indefinitely().filter(e -> "route still found".equals(e.getMessage())))
)
.build()))
.thenMany(
requestListTcpRoutes(this.routingClient)
.flatMapIterable(ListTcpRoutesResponse::getTcpRoutes)
.filter(route -> backendIp.equals(route.getBackendIp()))
.filter(route -> backendPort.equals(route.getBackendPort()))
.filter(route -> port.equals(route.getPort()))
.flatMap(
e ->
!"".equals(e.getBackendIp())
? Flux.error(
new RuntimeException(
"route still found"))
: Flux.just(e))
.retryWhen(
Retry.indefinitely()
.filter(
e ->
"route still found"
.equals(e.getMessage()))))
.as(StepVerifier::create)
.expectComplete()
.verify(Duration.ofMinutes(5));
Expand Down

0 comments on commit b0f7f99

Please sign in to comment.