From 0005235ee5e6f3f1ecf6f20e44e42c14f4dfbd66 Mon Sep 17 00:00:00 2001 From: Georg Lokowandt Date: Wed, 11 Nov 2026 11:30:46 +0100 Subject: [PATCH 1/2] fix error handling in FeatureFlagsV3Test, #1400 --- .../client/v3/FeatureFlagsV3Test.java | 61 +++++-------------- 1 file changed, 15 insertions(+), 46 deletions(-) diff --git a/integration-test/src/test/java/org/cloudfoundry/client/v3/FeatureFlagsV3Test.java b/integration-test/src/test/java/org/cloudfoundry/client/v3/FeatureFlagsV3Test.java index 45289e4de5..4b6ae89428 100644 --- a/integration-test/src/test/java/org/cloudfoundry/client/v3/FeatureFlagsV3Test.java +++ b/integration-test/src/test/java/org/cloudfoundry/client/v3/FeatureFlagsV3Test.java @@ -178,12 +178,8 @@ public void update() { .name(FLAG_NAME) .enabled(!original.getEnabled()) .build()) - .map( + .flatMap( toggled -> - toggled.getEnabled() - != original.getEnabled()) - .doFinally( - signal -> this.cloudFoundryClient .featureFlagsV3() .update( @@ -194,17 +190,10 @@ public void update() { original .getEnabled()) .build()) - .as(StepVerifier::create) - .consumeNextWith( - r -> - assertThat( - r - .getEnabled()) - .isEqualTo( - original - .getEnabled())) - .expectComplete() - .verify(Duration.ofMinutes(5)))) + .thenReturn( + toggled.getEnabled() + != original + .getEnabled()))) .as(StepVerifier::create) .expectNext(true) .expectComplete() @@ -227,9 +216,8 @@ public void updateMessage() { .name(FLAG_NAME) .customErrorMessage(newMessage) .build()) - .map(updated -> updated.getCustomErrorMessage()) - .doFinally( - signal -> + .flatMap( + updated -> this.cloudFoundryClient .featureFlagsV3() .update( @@ -240,17 +228,9 @@ public void updateMessage() { original .getCustomErrorMessage()) .build()) - .as(StepVerifier::create) - .consumeNextWith( - r -> - assertThat( - r - .getCustomErrorMessage()) - .isEqualTo( - original - .getCustomErrorMessage())) - .expectComplete() - .verify(Duration.ofMinutes(5)))) + .thenReturn( + updated + .getCustomErrorMessage()))) .as(StepVerifier::create) .expectNext(newMessage) .expectComplete() @@ -270,12 +250,8 @@ public void updateNothing() { UpdateFeatureFlagRequest.builder() .name(FLAG_NAME) .build()) - .map( + .flatMap( unchanged -> - unchanged.getEnabled() - == original.getEnabled()) - .doFinally( - signal -> this.cloudFoundryClient .featureFlagsV3() .update( @@ -286,17 +262,10 @@ public void updateNothing() { original .getEnabled()) .build()) - .as(StepVerifier::create) - .consumeNextWith( - r -> - assertThat( - r - .getEnabled()) - .isEqualTo( - original - .getEnabled())) - .expectComplete() - .verify(Duration.ofMinutes(5)))) + .thenReturn( + unchanged.getEnabled() + == original + .getEnabled()))) .as(StepVerifier::create) .expectNext(true) .expectComplete() From de0323992bde762cb32157bb5e194a8fc11cd8a2 Mon Sep 17 00:00:00 2001 From: Georg Lokowandt Date: Wed, 11 Nov 2026 12:00:21 +0100 Subject: [PATCH 2/2] add RoleType SPACE_SUPPORTER, fix #1392 --- .../java/org/cloudfoundry/client/v3/roles/RoleType.java | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v3/roles/RoleType.java b/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v3/roles/RoleType.java index 6b4c75ffba..c165852b7f 100644 --- a/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v3/roles/RoleType.java +++ b/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v3/roles/RoleType.java @@ -62,7 +62,12 @@ public enum RoleType { /** * space_manager role type */ - SPACE_MANAGER; + SPACE_MANAGER, + + /** + * space_supporter role type + */ + SPACE_SUPPORTER; public static final Set ORGANIZATION_ROLE_TYPES = EnumSet.of( @@ -72,7 +77,7 @@ public enum RoleType { ORGANIZATION_USER); public static final Set SPACE_ROLE_TYPES = - EnumSet.of(SPACE_AUDITOR, SPACE_DEVELOPER, SPACE_MANAGER); + EnumSet.of(SPACE_AUDITOR, SPACE_DEVELOPER, SPACE_MANAGER, SPACE_SUPPORTER); private static final Map NAMES_TO_VALUES = Arrays.stream(RoleType.values())