aboutsummaryrefslogtreecommitdiffstats
path: root/cps-ncmp-rest/src/test/groovy/org/onap/cps/ncmp/rest/controller
diff options
context:
space:
mode:
authorJvD_Ericsson <jeff.van.dam@est.tech>2024-02-01 13:55:50 +0000
committerJvD_Ericsson <jeff.van.dam@est.tech>2024-02-07 10:28:52 +0000
commitcc1c83c740d3bde18654098013f2b76eb8fa0567 (patch)
tree84b7d821c8b2c4fe27e93ea666ef64438116e330 /cps-ncmp-rest/src/test/groovy/org/onap/cps/ncmp/rest/controller
parent72f2fb7eca73cc91338026c734778dd1dcba01b9 (diff)
Replace sleep with PollingConditions
Issue-ID: CPS-1950 Signed-off-by: JvD_Ericsson <jeff.van.dam@est.tech> Change-Id: I0e23c697ef6b5a134295728f352f2dff7be05a62
Diffstat (limited to 'cps-ncmp-rest/src/test/groovy/org/onap/cps/ncmp/rest/controller')
-rw-r--r--cps-ncmp-rest/src/test/groovy/org/onap/cps/ncmp/rest/controller/handlers/NcmpDatastoreRequestHandlerSpec.groovy6
1 files changed, 3 insertions, 3 deletions
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
}