Adding await to wait longer for service deletion
This commit is contained in:
@@ -29,6 +29,7 @@ dependencies {
|
||||
testImplementation "io.projectreactor:reactor-test"
|
||||
testImplementation "org.cloudfoundry:cloudfoundry-client-reactor:${cfJavaClientVersion}"
|
||||
testImplementation "org.cloudfoundry:cloudfoundry-operations:${cfJavaClientVersion}"
|
||||
testImplementation "org.awaitility:awaitility"
|
||||
}
|
||||
|
||||
// omit the version from the test broker jar file
|
||||
|
||||
@@ -33,6 +33,7 @@ import org.junit.jupiter.api.TestMethodOrder;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
|
||||
import static org.assertj.core.api.Assertions.assertThat;
|
||||
import static org.awaitility.Awaitility.await;
|
||||
|
||||
@TestMethodOrder(MethodOrderer.OrderAnnotation.class)
|
||||
class UpdateInstanceWithNewServiceAcceptanceTest extends CloudFoundryAcceptanceTest {
|
||||
@@ -140,7 +141,7 @@ class UpdateInstanceWithNewServiceAcceptanceTest extends CloudFoundryAcceptanceT
|
||||
assertThat(newBackingServiceInstance.getApplications()).contains(APP_NAME);
|
||||
|
||||
// and the old backing service is deleted
|
||||
assertThat(listServiceInstances()).doesNotContain(OLD_BACKING_SI_NAME);
|
||||
await().untilAsserted(() -> assertThat(listServiceInstances()).doesNotContain(OLD_BACKING_SI_NAME));
|
||||
|
||||
// then the service instance is deleted
|
||||
deleteServiceInstance(SI_NAME);
|
||||
|
||||
@@ -33,6 +33,7 @@ import org.junit.jupiter.api.TestMethodOrder;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
|
||||
import static org.assertj.core.api.Assertions.assertThat;
|
||||
import static org.awaitility.Awaitility.await;
|
||||
|
||||
@TestMethodOrder(MethodOrderer.OrderAnnotation.class)
|
||||
class UpdateInstanceWithNewServiceAndTargetAcceptanceTest extends CloudFoundryAcceptanceTest {
|
||||
@@ -146,7 +147,7 @@ class UpdateInstanceWithNewServiceAndTargetAcceptanceTest extends CloudFoundryAc
|
||||
assertThat(newBackingServiceInstance.getApplications()).contains(APP_NAME);
|
||||
|
||||
// and the old backing service is deleted
|
||||
assertThat(listServiceInstances()).doesNotContain(OLD_BACKING_SI_NAME);
|
||||
await().untilAsserted(() -> assertThat(listServiceInstances()).doesNotContain(OLD_BACKING_SI_NAME));
|
||||
|
||||
// then the service instance is deleted
|
||||
deleteServiceInstance(SI_NAME);
|
||||
|
||||
Reference in New Issue
Block a user