Bug 6710 - Close ClusterSingletonServiceRegistration fix 61/46761/4
authorVaclav Demcak <vdemcak@cisco.com>
Mon, 26 Sep 2016 11:30:41 +0000 (13:30 +0200)
committerTom Pantelis <tpanteli@brocade.com>
Mon, 14 Nov 2016 12:03:10 +0000 (12:03 +0000)
commit62a591d105563555955efeeddb4f16af38529d57
treebf90b24eb3c0f178af88bc21ce5fb892f89bcd38
parent8216dbb9b22b70155a583e7d5444c0f6da78b0a1
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