Policy notifications appear to be reversed 83/101083/2
authorJim Hahn <jrh3@att.com>
Tue, 4 Feb 2020 02:45:35 +0000 (21:45 -0500)
committerJim Hahn <jrh3@att.com>
Tue, 4 Feb 2020 03:11:29 +0000 (22:11 -0500)
commit96f3a97fe849c657c4afc7b0ba199a08cc0646c2
tree3bd17de6e6b8e410facb2030251ead28cc29eb10
parented9690a42e5fd7007a91275a6ad208d1a7dafcaa
Policy notifications appear to be reversed

Modified the code as follows:
Until all PDPs have responded (or been removed), no notifications for
their associated policies will be generated.  However, once a response
has been received for every PDP, then a notification is generated.
For deployed policies, the notifications will continue to be generated
as PDPs move back and forth between the success and failed states, as
long as the policy is not undeployed.

For undeployed policies, on the other hand, no additional notifications
will be generated once all PDPs have successfully undeployed the policy.
However, until that point, like with deployed policies, notifications
will continue to be generated as PDPs move back and forth between the
success and failed states.

Added notification verifications in deploy and undeploy end-to-end tests.

Issue-ID: POLICY-2347
Signed-off-by: Jim Hahn <jrh3@att.com>
Change-Id: I7d18dad1a7500e1efb7074e89ddaca4b1d368965
main/src/main/java/org/onap/policy/pap/main/comm/msgdata/UpdateReq.java
main/src/main/java/org/onap/policy/pap/main/notification/PolicyTrackerData.java
main/src/main/java/org/onap/policy/pap/main/notification/PolicyUndeployTracker.java
main/src/test/java/org/onap/policy/pap/main/notification/PolicyDeployTrackerTest.java
main/src/test/java/org/onap/policy/pap/main/notification/PolicyTrackerDataTest.java
main/src/test/java/org/onap/policy/pap/main/notification/PolicyUndeployTrackerTest.java
main/src/test/java/org/onap/policy/pap/main/rest/e2e/PdpGroupDeleteTest.java
main/src/test/java/org/onap/policy/pap/main/rest/e2e/PdpGroupDeployTest.java
main/src/test/resources/e2e/deployPolicies.json
main/src/test/resources/e2e/deployPoliciesReq2.json [new file with mode: 0644]