Search in sources :

Example 6 with ServiceBrokerOperationInProgressException

use of org.springframework.cloud.servicebroker.exception.ServiceBrokerOperationInProgressException in project spring-cloud-open-service-broker by spring-cloud.

the class ServiceInstanceBindingControllerIntegrationTest method getBindingWithOperationInProgressFails.

@Test
void getBindingWithOperationInProgressFails() {
    given(serviceInstanceBindingService.getServiceInstanceBinding(any(GetServiceInstanceBindingRequest.class))).willThrow(new ServiceBrokerOperationInProgressException("task_10"));
    client.get().uri(buildCreateUrl()).accept(MediaType.APPLICATION_JSON).exchange().expectStatus().isNotFound();
}
Also used : ServiceBrokerOperationInProgressException(org.springframework.cloud.servicebroker.exception.ServiceBrokerOperationInProgressException) GetServiceInstanceBindingRequest(org.springframework.cloud.servicebroker.model.binding.GetServiceInstanceBindingRequest) AbstractServiceInstanceBindingControllerIntegrationTest(org.springframework.cloud.servicebroker.autoconfigure.web.AbstractServiceInstanceBindingControllerIntegrationTest) Test(org.junit.jupiter.api.Test)

Aggregations

ServiceBrokerOperationInProgressException (org.springframework.cloud.servicebroker.exception.ServiceBrokerOperationInProgressException)6 Test (org.junit.jupiter.api.Test)5 AbstractServiceInstanceBindingControllerIntegrationTest (org.springframework.cloud.servicebroker.autoconfigure.web.AbstractServiceInstanceBindingControllerIntegrationTest)2 AbstractServiceInstanceControllerIntegrationTest (org.springframework.cloud.servicebroker.autoconfigure.web.AbstractServiceInstanceControllerIntegrationTest)2 GetServiceInstanceBindingRequest (org.springframework.cloud.servicebroker.model.binding.GetServiceInstanceBindingRequest)2 ErrorMessage (org.springframework.cloud.servicebroker.model.error.ErrorMessage)2 MvcResult (org.springframework.test.web.servlet.MvcResult)2 Test (org.junit.Test)1