Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down Expand Up @@ -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;

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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));
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -78,7 +78,7 @@ public void create() {
serviceName,
spaceId,
false))
.block(Duration.ofMinutes(5));
.block(Duration.ofMinutes(10));

Mono.zip(
this.organizationId,
Expand Down Expand Up @@ -143,7 +143,7 @@ public void delete() {
serviceName,
spaceId,
false))
.block(Duration.ofMinutes(5));
.block(Duration.ofMinutes(10));

Mono.zip(
this.organizationId,
Expand Down Expand Up @@ -277,7 +277,7 @@ public void get() {
serviceName,
spaceId,
false))
.block(Duration.ofMinutes(5));
.block(Duration.ofMinutes(10));

Mono.zip(
this.organizationId,
Expand Down Expand Up @@ -500,7 +500,7 @@ public void listFilterByServicePlanId() {
serviceName,
spaceId,
false))
.block(Duration.ofMinutes(5));
.block(Duration.ofMinutes(10));

Mono.zip(
this.organizationId,
Expand Down Expand Up @@ -573,7 +573,7 @@ public void update() {
serviceName,
spaceId,
false))
.block(Duration.ofMinutes(5));
.block(Duration.ofMinutes(10));

Mono.zip(
this.organizationId,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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<String> createManagedServiceInstanceId(
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -80,7 +80,7 @@ public void delete() {
serviceName,
spaceId,
true))
.block(Duration.ofMinutes(5));
.block(Duration.ofMinutes(10));

getServicePlanId(this.cloudFoundryClient, serviceBrokerMetadata.serviceBrokerId)
.flatMap(
Expand Down Expand Up @@ -289,7 +289,7 @@ public void update() {
serviceName,
spaceId,
true))
.block(Duration.ofMinutes(5));
.block(Duration.ofMinutes(10));

getServicePlanId(this.cloudFoundryClient, serviceBrokerMetadata.serviceBrokerId)
.flatMap(
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down Expand Up @@ -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();
Expand Down