Separate ShardRecoveryCoordinator implementations 60/49260/7
authorRobert Varga <robert.varga@pantheon.tech>
Thu, 31 Aug 2017 20:48:04 +0000 (22:48 +0200)
committerTom Pantelis <tompantelis@gmail.com>
Fri, 1 Sep 2017 14:07:57 +0000 (14:07 +0000)
commit0c2d8a6530db21b1ca89aff8ee3812aa801cddac
tree4ba7454cc5d6608bee96a4e503f125b5b9ebf9f1
parentfe73467bcc8a500c80bfcfc8b87053e70341611f
Separate ShardRecoveryCoordinator implementations

This patch turns ShardRecoveryCoordinator into two concrete
implementations based on presence of snapshot. This will allow
us to catch cases where restore from snapshot gives us a null
snapshot.

Furthermore it cleans up the test a bit, byu sharing coordination
instantiation code and using assertTrue/assertFalse to prevent
boxing operations implied by assertEquals.

Change-Id: I8e4ceba0ec6df70e5557f6f457c60ed2cd39a8bd
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
opendaylight/md-sal/sal-distributed-datastore/src/main/java/org/opendaylight/controller/cluster/datastore/Shard.java
opendaylight/md-sal/sal-distributed-datastore/src/main/java/org/opendaylight/controller/cluster/datastore/ShardRecoveryCoordinator.java
opendaylight/md-sal/sal-distributed-datastore/src/test/java/org/opendaylight/controller/cluster/datastore/ShardRecoveryCoordinatorTest.java

©2013 OpenDaylight, A Linux Foundation Collaborative Project. All Rights Reserved.
OpenDaylight is a registered trademark of The OpenDaylight Project, Inc.
Linux Foundation and OpenDaylight are registered trademarks of the Linux Foundation.
Linux is a registered trademark of Linus Torvalds.