BUG-5280: make sure all DistributedDataStore instances are shut down
[controller.git] / opendaylight / md-sal / sal-distributed-datastore / src / test / java / org / opendaylight / controller / cluster / datastore / entityownership / DistributedEntityOwnershipServiceTest.java
index c052134772d68de17f6588e4cfc412eaddbc6ccd..9343f381e56b649ad19258d9ed5c2d85c8c25224 100644 (file)
@@ -28,7 +28,6 @@ import static org.opendaylight.controller.cluster.datastore.entityownership.Enti
 import static org.opendaylight.controller.cluster.datastore.entityownership.EntityOwnersModel.entityPath;
 import static org.opendaylight.controller.cluster.datastore.entityownership.EntityOwnersModel.entityTypeEntryWithEntityEntry;
 import akka.actor.ActorRef;
-import akka.actor.PoisonPill;
 import com.google.common.base.Optional;
 import com.google.common.collect.Sets;
 import java.util.Collection;
@@ -104,7 +103,7 @@ public class DistributedEntityOwnershipServiceTest extends AbstractEntityOwnersh
 
     @After
     public void tearDown() {
-        dataStore.getActorContext().getShardManager().tell(PoisonPill.getInstance(), ActorRef.noSender());
+        dataStore.close();
     }
 
     private static <T> T verifyMessage(final DistributedEntityOwnershipService mock, final Class<T> type) {