From ceed645ba2f3661019242d108f0f11372debf6a1 Mon Sep 17 00:00:00 2001 From: Georg Lokowandt Date: Tue, 13 Oct 2026 12:00:21 +0200 Subject: [PATCH] minor corrections to integration tests. fix #1386 --- .../ReactorServiceInstancesV3Test.java | 3 +- .../client/v2/BlobstoresTest.java | 2 +- .../v2/ServicePlanVisibilitiesTest.java | 10 +++---- .../client/v3/ServiceBindingsTest.java | 2 +- .../client/v3/ServicePlansTest.java | 4 +-- .../operations/ApplicationsTest.java | 29 +++++++++++++++++-- .../cloudfoundry/operations/RoutesTest.java | 2 -- 7 files changed, 36 insertions(+), 16 deletions(-) diff --git a/cloudfoundry-client-reactor/src/test/java/org/cloudfoundry/reactor/client/v3/serviceinstances/ReactorServiceInstancesV3Test.java b/cloudfoundry-client-reactor/src/test/java/org/cloudfoundry/reactor/client/v3/serviceinstances/ReactorServiceInstancesV3Test.java index 8e9ef1dd64..1e6df1f258 100644 --- a/cloudfoundry-client-reactor/src/test/java/org/cloudfoundry/reactor/client/v3/serviceinstances/ReactorServiceInstancesV3Test.java +++ b/cloudfoundry-client-reactor/src/test/java/org/cloudfoundry/reactor/client/v3/serviceinstances/ReactorServiceInstancesV3Test.java @@ -14,7 +14,7 @@ * limitations under the License. */ -package org.cloudfoundry.reactor.client.v3.serviceInstances; +package org.cloudfoundry.reactor.client.v3.serviceinstances; import static io.netty.handler.codec.http.HttpMethod.DELETE; import static io.netty.handler.codec.http.HttpMethod.GET; @@ -62,7 +62,6 @@ import org.cloudfoundry.reactor.TestRequest; import org.cloudfoundry.reactor.TestResponse; import org.cloudfoundry.reactor.client.AbstractClientApiTest; -import org.cloudfoundry.reactor.client.v3.serviceinstances.ReactorServiceInstancesV3; import org.junit.jupiter.api.Test; import reactor.test.StepVerifier; diff --git a/integration-test/src/test/java/org/cloudfoundry/client/v2/BlobstoresTest.java b/integration-test/src/test/java/org/cloudfoundry/client/v2/BlobstoresTest.java index 223f55eb4e..283ac47f41 100644 --- a/integration-test/src/test/java/org/cloudfoundry/client/v2/BlobstoresTest.java +++ b/integration-test/src/test/java/org/cloudfoundry/client/v2/BlobstoresTest.java @@ -49,6 +49,6 @@ public void delete() { this.cloudFoundryClient, Duration.ofMinutes(5), job)) .as(StepVerifier::create) .expectComplete() - .verify(Duration.ofMinutes(5)); + .verify(Duration.ofMinutes(10)); } } diff --git a/integration-test/src/test/java/org/cloudfoundry/client/v2/ServicePlanVisibilitiesTest.java b/integration-test/src/test/java/org/cloudfoundry/client/v2/ServicePlanVisibilitiesTest.java index e2a9ecbece..6b0ea71e72 100644 --- a/integration-test/src/test/java/org/cloudfoundry/client/v2/ServicePlanVisibilitiesTest.java +++ b/integration-test/src/test/java/org/cloudfoundry/client/v2/ServicePlanVisibilitiesTest.java @@ -78,7 +78,7 @@ public void create() { serviceName, spaceId, false)) - .block(Duration.ofMinutes(5)); + .block(Duration.ofMinutes(10)); Mono.zip( this.organizationId, @@ -143,7 +143,7 @@ public void delete() { serviceName, spaceId, false)) - .block(Duration.ofMinutes(5)); + .block(Duration.ofMinutes(10)); Mono.zip( this.organizationId, @@ -277,7 +277,7 @@ public void get() { serviceName, spaceId, false)) - .block(Duration.ofMinutes(5)); + .block(Duration.ofMinutes(10)); Mono.zip( this.organizationId, @@ -500,7 +500,7 @@ public void listFilterByServicePlanId() { serviceName, spaceId, false)) - .block(Duration.ofMinutes(5)); + .block(Duration.ofMinutes(10)); Mono.zip( this.organizationId, @@ -573,7 +573,7 @@ public void update() { serviceName, spaceId, false)) - .block(Duration.ofMinutes(5)); + .block(Duration.ofMinutes(10)); Mono.zip( this.organizationId, diff --git a/integration-test/src/test/java/org/cloudfoundry/client/v3/ServiceBindingsTest.java b/integration-test/src/test/java/org/cloudfoundry/client/v3/ServiceBindingsTest.java index 3c0695a2da..95d107a7ca 100644 --- a/integration-test/src/test/java/org/cloudfoundry/client/v3/ServiceBindingsTest.java +++ b/integration-test/src/test/java/org/cloudfoundry/client/v3/ServiceBindingsTest.java @@ -368,7 +368,7 @@ public void getDetails() { .as(StepVerifier::create) .expectNext(Collections.singletonMap("foo", "bar")) .expectComplete() - .verify(Duration.ofMinutes(5)); + .verify(Duration.ofMinutes(10)); } private static Mono createManagedServiceInstanceId( diff --git a/integration-test/src/test/java/org/cloudfoundry/client/v3/ServicePlansTest.java b/integration-test/src/test/java/org/cloudfoundry/client/v3/ServicePlansTest.java index c749b3e23d..fd820af7f3 100644 --- a/integration-test/src/test/java/org/cloudfoundry/client/v3/ServicePlansTest.java +++ b/integration-test/src/test/java/org/cloudfoundry/client/v3/ServicePlansTest.java @@ -80,7 +80,7 @@ public void delete() { serviceName, spaceId, true)) - .block(Duration.ofMinutes(5)); + .block(Duration.ofMinutes(10)); getServicePlanId(this.cloudFoundryClient, serviceBrokerMetadata.serviceBrokerId) .flatMap( @@ -289,7 +289,7 @@ public void update() { serviceName, spaceId, true)) - .block(Duration.ofMinutes(5)); + .block(Duration.ofMinutes(10)); getServicePlanId(this.cloudFoundryClient, serviceBrokerMetadata.serviceBrokerId) .flatMap( diff --git a/integration-test/src/test/java/org/cloudfoundry/operations/ApplicationsTest.java b/integration-test/src/test/java/org/cloudfoundry/operations/ApplicationsTest.java index d84a820794..ed8319bafc 100644 --- a/integration-test/src/test/java/org/cloudfoundry/operations/ApplicationsTest.java +++ b/integration-test/src/test/java/org/cloudfoundry/operations/ApplicationsTest.java @@ -1798,10 +1798,33 @@ public void terminateTask() throws IOException { .sequenceId(sequenceId) .build()) .thenReturn(sequenceId)) - .flatMapMany( + .flatMap( sequenceId -> - requestListTasks(this.cloudFoundryOperations, applicationName) - .filter(task -> sequenceId.equals(task.getSequenceId()))) + Mono.defer( + () -> + requestListTasks( + this.cloudFoundryOperations, + applicationName) + .filter( + task -> + sequenceId.equals( + task + .getSequenceId())) + .next() + .flatMap( + task -> + TaskState.CANCELING + .equals( + task + .getState()) + ? Mono + .empty() + : Mono.just( + task))) + .repeatWhenEmpty( + repeat -> + repeat.delayElements( + Duration.ofSeconds(2)))) .map(Task::getState) .as(StepVerifier::create) .expectNext(TaskState.FAILED) diff --git a/integration-test/src/test/java/org/cloudfoundry/operations/RoutesTest.java b/integration-test/src/test/java/org/cloudfoundry/operations/RoutesTest.java index 47a37e3fb9..76c16e9691 100644 --- a/integration-test/src/test/java/org/cloudfoundry/operations/RoutesTest.java +++ b/integration-test/src/test/java/org/cloudfoundry/operations/RoutesTest.java @@ -43,7 +43,6 @@ import org.cloudfoundry.operations.routes.UnmapRouteRequest; import org.cloudfoundry.operations.services.BindRouteServiceInstanceRequest; import org.cloudfoundry.operations.services.CreateUserProvidedServiceInstanceRequest; -import org.junit.jupiter.api.Disabled; import org.junit.jupiter.api.Test; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.core.io.ClassPathResource; @@ -274,7 +273,6 @@ public void deleteInvalidDomain() { } @Test - @Disabled("fails often for no reasons") public void deleteOrphanedRoutes() { String domainName = this.nameFactory.getDomainName(); String hostName = this.nameFactory.getHostName();