X-Git-Url: https://gerrit.onap.org/r/gitweb?a=blobdiff_plain;f=cps-ncmp-rest%2Fsrc%2Ftest%2Fgroovy%2Forg%2Fonap%2Fcps%2Fncmp%2Frest%2Fcontroller%2Fhandlers%2FNcmpDatastoreRequestHandlerSpec.groovy;h=4edbf3569f08556a5203cdbd228d9a789b3e3523;hb=cc1c83c740d3bde18654098013f2b76eb8fa0567;hp=f06af6c10a00dded3377283cdd7924c8dcb44b26;hpb=72f2fb7eca73cc91338026c734778dd1dcba01b9;p=cps.git diff --git a/cps-ncmp-rest/src/test/groovy/org/onap/cps/ncmp/rest/controller/handlers/NcmpDatastoreRequestHandlerSpec.groovy b/cps-ncmp-rest/src/test/groovy/org/onap/cps/ncmp/rest/controller/handlers/NcmpDatastoreRequestHandlerSpec.groovy index f06af6c10..4edbf3569 100644 --- a/cps-ncmp-rest/src/test/groovy/org/onap/cps/ncmp/rest/controller/handlers/NcmpDatastoreRequestHandlerSpec.groovy +++ b/cps-ncmp-rest/src/test/groovy/org/onap/cps/ncmp/rest/controller/handlers/NcmpDatastoreRequestHandlerSpec.groovy @@ -44,7 +44,7 @@ class NcmpDatastoreRequestHandlerSpec extends Specification { def 'Attempt to execute async get request with #scenario.'() { given: 'notification feature is turned on/off' objectUnderTest.notificationFeatureEnabled = notificationFeatureEnabled - and: ' a flag to track the network service call' + and: 'a flag to track the network service call' def networkServiceMethodCalled = false and: 'the (mocked) service will use the flag to indicate if it is called' mockNetworkCmProxyDataService.getResourceDataForCmHandle('ds', 'ch1', 'resource1', 'options', _, _) >> { @@ -54,7 +54,7 @@ class NcmpDatastoreRequestHandlerSpec extends Specification { objectUnderTest.executeRequest('ds', 'ch1', 'resource1', 'options', topic, false) then: 'the task is executed in an async fashion or not' expectedCalls * spiedCpsNcmpTaskExecutor.executeTask(*_) - and: 'the service request is always invoked within 1 seconds' + and: 'the service request is invoked' new PollingConditions().within(1) { assert networkServiceMethodCalled == true } @@ -97,7 +97,7 @@ class NcmpDatastoreRequestHandlerSpec extends Specification { objectUnderTest.executeRequest('myTopic', dataOperationRequest) then: 'the task is executed in an async fashion' 1 * spiedCpsNcmpTaskExecutor.executeTask(*_) - and: 'the network service is invoked within 1 seconds' + and: 'the network service is invoked' new PollingConditions().within(1) { assert networkServiceMethodCalled == true }