Bug 8385: Fix testMultipleRegistrationsAtOnePrefix failures 90/56590/4
authorTom Pantelis <tompantelis@gmail.com>
Fri, 5 May 2017 10:41:59 +0000 (06:41 -0400)
committerRobert Varga <nite@hq.sk>
Sat, 6 May 2017 10:01:08 +0000 (10:01 +0000)
commit009cb4dd8cd415e963b321d5d59d55146903b462
tree9139095a25c3d6cb4a66bb0cf837929d4f484774
parent345f3514679a15f646a55645d99b1f67751c7ab5
Bug 8385: Fix testMultipleRegistrationsAtOnePrefix failures

The test quickly creates/removes the prefix shard in iterations which
can result in an InvalidActorNameException if the shard actor from the prior
iteration hadn't been destroyed yet. To alleviate this I modified the
removal in the ShardManager to utilize Patterns.gracefulStop to store the
Future and block a subsequent create until the Future completes.

Change-Id: Ica98de3cc17c2d87195840bdf052d81ed3b9dd10
Signed-off-by: Tom Pantelis <tompantelis@gmail.com>
opendaylight/md-sal/sal-distributed-datastore/src/main/java/org/opendaylight/controller/cluster/datastore/shardmanager/ShardManager.java
opendaylight/md-sal/sal-distributed-datastore/src/test/java/org/opendaylight/controller/cluster/sharding/DistributedShardedDOMDataTreeRemotingTest.java