Fix ShardTest#testCreateSnapshot unit test failures 79/18879/4
authorTom Pantelis <tpanteli@brocade.com>
Wed, 22 Apr 2015 10:54:07 +0000 (06:54 -0400)
committerTony Tkacik <ttkacik@cisco.com>
Thu, 23 Apr 2015 09:42:01 +0000 (09:42 +0000)
commit8a01182f04388cbdfd33cad2578f8ce2b3978104
tree2cabbbc999f4cbc61a118e00a70a46d1daf396cc
parent0f3ae2f9e4151a60245a2b295cc7998f0d0e745f
Fix ShardTest#testCreateSnapshot unit test failures

This unit test is failing on jenkins quite often due to a timing issue
with the tests resulting from recent changes. Basically akka uses a
calling thread dispatcher by default so the call to
createSnapshotProcedure in the SnapshotManager may result in a direct
call to persist which fails b/c it's still in the Idle state. Moving the
setting of currentState to CREATING prior to calling
createSnapshotProcedure fixes the issue.

Change-Id: If68333d042896e25fd3f85dd16da7b84ca56d944
Signed-off-by: Tom Pantelis <tpanteli@brocade.com>
opendaylight/md-sal/sal-akka-raft/src/main/java/org/opendaylight/controller/cluster/raft/SnapshotManager.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.