Bug 6710 - Close ClusterSingletonServiceRegistration fix 75/46175/14
authorVaclav Demcak <vdemcak@cisco.com>
Mon, 26 Sep 2016 11:30:41 +0000 (13:30 +0200)
committerTom Pantelis <tpanteli@brocade.com>
Fri, 7 Oct 2016 16:01:06 +0000 (16:01 +0000)
commit7b9052b034fff34a0d7194e80718def392ea6e17
tree2d5ab791bb2742041df145a9d3ce5b50b5877718
parent67d86408df872a1169a3e5e33c8d2dc4416edf36
Bug 6710 - Close ClusterSingletonServiceRegistration fix

Note: Closing process for CSSRegistration has to follow same
way as a lostLeadership and the main diferences between this
two ways is a not null MainEntityCandidate registration.

* fix using closeClusterSingletonGroup method
  - this method has to be use ONLY without active EOS listener
* fix closeResources method
  - MainEntityCandidate has to be close before lock.release
* fix removing actual CSSGroup instance from EOS listener map
  - close proces has to always finish with removing parth and
    we have to check guardEntityCandidate instece only. Because
    we don't get any aditional notif. from Eos without
    GuardEntityCandidate registration.
* add and modify test
* add async Test Case for SingletonServiceGroup

Change-Id: I15f89cbd43310b0a8e4b7ac78595eeaaa82a65ee
Signed-off-by: Vaclav Demcak <vdemcak@cisco.com>
singleton-service/mdsal-singleton-common-api/src/main/java/org/opendaylight/mdsal/singleton/common/api/ClusterSingletonServiceProvider.java
singleton-service/mdsal-singleton-dom-impl/src/main/java/org/opendaylight/mdsal/singleton/dom/impl/ClusterSingletonServiceGroup.java
singleton-service/mdsal-singleton-dom-impl/src/main/java/org/opendaylight/mdsal/singleton/dom/impl/ClusterSingletonServiceGroupImpl.java
singleton-service/mdsal-singleton-dom-impl/src/test/java/org/opendaylight/mdsal/singleton/dom/impl/ClusterSingletonServiceGroupImplTest.java
singleton-service/mdsal-singleton-dom-impl/src/test/java/org/opendaylight/mdsal/singleton/dom/impl/DOMClusterSingletonServiceProviderAsyncImplTest.java [new file with mode: 0644]
singleton-service/mdsal-singleton-dom-impl/src/test/java/org/opendaylight/mdsal/singleton/dom/impl/DOMClusterSingletonServiceProviderImplTest.java