Bug 8385: Fix testMultipleRegistrationsAtOnePrefix failures 34/56634/1
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:00:57 +0000 (10:00 +0000)
commitdef2aa2710cabf4d1867e8ce5dd847d380ef9393
treee85ea0592ca16d621bf7f284a9ff4ee649687aa4
parent3f8818fd65f1cac8f4b2ce3b7319255137c74da5
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