Skip to content

Commit af92cf8

Browse files
David O'Sullivananthonydahanne
David O'Sullivan
authored andcommitted
spotless plugin changes
1 parent 4dc532f commit af92cf8

File tree

6 files changed

+51
-38
lines changed

6 files changed

+51
-38
lines changed

cloudfoundry-client/src/main/java/org/cloudfoundry/client/v3/deployments/Deployment.java

+1-1
Original file line numberDiff line numberDiff line change
@@ -100,7 +100,7 @@ public abstract class Deployment extends Resource {
100100
@Nullable
101101
public abstract DeploymentStrategy getStrategy();
102102

103-
/**
103+
/**
104104
* The options for the deployment
105105
*/
106106
@JsonProperty("options")

cloudfoundry-client/src/main/java/org/cloudfoundry/client/v3/processes/ProcessStatistics.java

+1
Original file line numberDiff line numberDiff line change
@@ -42,6 +42,7 @@ public abstract class ProcessStatistics {
4242
@JsonProperty("instance_internal_ip")
4343
@Nullable
4444
public abstract String instance_internal_ip();
45+
4546
/**
4647
* The file descriptor quota
4748
*/

cloudfoundry-client/src/test/java/org/cloudfoundry/client/v3/applications/CreateApplicationRequestTest.java

+8-4
Original file line numberDiff line numberDiff line change
@@ -39,8 +39,10 @@ void noName() {
3939
.id("test-id")
4040
.build())
4141
.build())
42-
.currentDroplet(ToOneRelationship.builder()
43-
.data(Relationship.builder().build()).build())
42+
.currentDroplet(
43+
ToOneRelationship.builder()
44+
.data(Relationship.builder().build())
45+
.build())
4446
.build())
4547
.build();
4648
});
@@ -65,8 +67,10 @@ void valid() {
6567
ToOneRelationship.builder()
6668
.data(Relationship.builder().id("test-id").build())
6769
.build())
68-
.currentDroplet(ToOneRelationship.builder()
69-
.data(Relationship.builder().build()).build())
70+
.currentDroplet(
71+
ToOneRelationship.builder()
72+
.data(Relationship.builder().build())
73+
.build())
7074
.build())
7175
.build();
7276
}

cloudfoundry-client/src/test/java/org/cloudfoundry/client/v3/applications/RelationshipsTest.java

+2-2
Original file line numberDiff line numberDiff line change
@@ -40,8 +40,8 @@ void valid() {
4040
ToOneRelationship.builder()
4141
.data(Relationship.builder().id("test-id").build())
4242
.build())
43-
.currentDroplet(ToOneRelationship.builder()
44-
.data(Relationship.builder().build()).build())
43+
.currentDroplet(
44+
ToOneRelationship.builder().data(Relationship.builder().build()).build())
4545
.build();
4646
}
4747
}

integration-test/src/test/java/org/cloudfoundry/operations/ApplicationsTest.java

+18-11
Original file line numberDiff line numberDiff line change
@@ -1530,17 +1530,24 @@ public void setHealthCheck() throws IOException {
15301530
public void setReadinessHealthCheck() throws IOException {
15311531
String applicationName = this.nameFactory.getApplicationName();
15321532

1533-
createApplication(this.cloudFoundryOperations, new ClassPathResource("test-application.zip").getFile().toPath(), applicationName, false)
1534-
.then(this.cloudFoundryOperations.applications()
1535-
.setHealthCheck(SetApplicationHealthCheckRequest.builder()
1536-
.name(applicationName)
1537-
.type(ApplicationHealthCheck.PROCESS)
1538-
.build()))
1539-
.then(requestGetHealthCheck(this.cloudFoundryOperations, applicationName))
1540-
.as(StepVerifier::create)
1541-
.expectNext(ApplicationHealthCheck.PROCESS)
1542-
.expectComplete()
1543-
.verify(Duration.ofMinutes(5));
1533+
createApplication(
1534+
this.cloudFoundryOperations,
1535+
new ClassPathResource("test-application.zip").getFile().toPath(),
1536+
applicationName,
1537+
false)
1538+
.then(
1539+
this.cloudFoundryOperations
1540+
.applications()
1541+
.setHealthCheck(
1542+
SetApplicationHealthCheckRequest.builder()
1543+
.name(applicationName)
1544+
.type(ApplicationHealthCheck.PROCESS)
1545+
.build()))
1546+
.then(requestGetHealthCheck(this.cloudFoundryOperations, applicationName))
1547+
.as(StepVerifier::create)
1548+
.expectNext(ApplicationHealthCheck.PROCESS)
1549+
.expectComplete()
1550+
.verify(Duration.ofMinutes(5));
15441551
}
15451552

15461553
@Test

integration-test/src/test/java/org/cloudfoundry/routing/v1/TcpRoutesTest.java

+21-20
Original file line numberDiff line numberDiff line change
@@ -16,11 +16,7 @@
1616

1717
package org.cloudfoundry.routing.v1;
1818

19-
20-
import static org.cloudfoundry.util.DelayUtils.exponentialBackOff;
2119
import java.time.Duration;
22-
import java.util.List;
23-
2420
import org.cloudfoundry.AbstractIntegrationTest;
2521
import org.cloudfoundry.NameFactory;
2622
import org.cloudfoundry.routing.RoutingClient;
@@ -36,10 +32,8 @@
3632
import org.cloudfoundry.routing.v1.tcproutes.TcpRoute;
3733
import org.cloudfoundry.routing.v1.tcproutes.TcpRouteConfiguration;
3834
import org.cloudfoundry.routing.v1.tcproutes.TcpRouteDeletion;
39-
import org.cloudfoundry.routing.v1.tcproutes.TcpRoutes;
4035
import org.junit.jupiter.api.Test;
4136
import org.springframework.beans.factory.annotation.Autowired;
42-
4337
import reactor.core.publisher.Flux;
4438
import reactor.core.publisher.Mono;
4539
import reactor.test.StepVerifier;
@@ -103,7 +97,7 @@ public void delete() {
10397
port,
10498
routerGroupId))
10599
.flatMap(
106-
routerGroupId ->
100+
routerGroupId ->
107101
this.routingClient
108102
.tcpRoutes()
109103
.delete(
@@ -116,19 +110,26 @@ public void delete() {
116110
.routerGroupId(
117111
routerGroupId)
118112
.build())
119-
.build())
120-
)
121-
.thenMany(requestListTcpRoutes(this.routingClient)
122-
.flatMapIterable(ListTcpRoutesResponse::getTcpRoutes)
123-
.filter(route -> backendIp.equals(route.getBackendIp()))
124-
.filter(route -> backendPort.equals(route.getBackendPort()))
125-
.filter(route -> port.equals(route.getPort()))
126-
.flatMap(e -> !"".equals(e.getBackendIp()) ?
127-
Flux.error(new RuntimeException("route still found")) :
128-
Flux.just(e)
129-
)
130-
.retryWhen(Retry.indefinitely().filter(e -> "route still found".equals(e.getMessage())))
131-
)
113+
.build()))
114+
.thenMany(
115+
requestListTcpRoutes(this.routingClient)
116+
.flatMapIterable(ListTcpRoutesResponse::getTcpRoutes)
117+
.filter(route -> backendIp.equals(route.getBackendIp()))
118+
.filter(route -> backendPort.equals(route.getBackendPort()))
119+
.filter(route -> port.equals(route.getPort()))
120+
.flatMap(
121+
e ->
122+
!"".equals(e.getBackendIp())
123+
? Flux.error(
124+
new RuntimeException(
125+
"route still found"))
126+
: Flux.just(e))
127+
.retryWhen(
128+
Retry.indefinitely()
129+
.filter(
130+
e ->
131+
"route still found"
132+
.equals(e.getMessage()))))
132133
.as(StepVerifier::create)
133134
.expectComplete()
134135
.verify(Duration.ofMinutes(5));

0 commit comments

Comments
 (0)