Add unit test for FrontedMetadata memory leaks
[controller.git] / opendaylight / md-sal / sal-distributed-datastore / src / test / java / org / opendaylight / controller / cluster / databroker / TestClientBackedDataStore.java
1 /*
2  * Copyright (c) 2019 PANTHEON.tech, s.r.o. and others.  All rights reserved.
3  *
4  * This program and the accompanying materials are made available under the
5  * terms of the Eclipse Public License v1.0 which accompanies this distribution,
6  * and is available at http://www.eclipse.org/legal/epl-v10.html
7  */
8 package org.opendaylight.controller.cluster.databroker;
9
10 import akka.actor.ActorSystem;
11 import org.opendaylight.controller.cluster.access.concepts.ClientIdentifier;
12 import org.opendaylight.controller.cluster.databroker.actors.dds.DataStoreClient;
13 import org.opendaylight.controller.cluster.datastore.ClusterWrapper;
14 import org.opendaylight.controller.cluster.datastore.DatastoreContextFactory;
15 import org.opendaylight.controller.cluster.datastore.config.Configuration;
16 import org.opendaylight.controller.cluster.datastore.persisted.DatastoreSnapshot;
17 import org.opendaylight.controller.cluster.datastore.shardmanager.AbstractShardManagerCreator;
18 import org.opendaylight.controller.cluster.datastore.shardmanager.TestShardManager;
19 import org.opendaylight.controller.cluster.datastore.utils.ActorUtils;
20
21 public class TestClientBackedDataStore extends ClientBackedDataStore {
22     public TestClientBackedDataStore(final ActorSystem actorSystem, final ClusterWrapper cluster,
23                                      final Configuration configuration,
24                                      final DatastoreContextFactory datastoreContextFactory,
25                                      final DatastoreSnapshot restoreFromSnapshot) {
26         super(actorSystem, cluster, configuration, datastoreContextFactory, restoreFromSnapshot);
27     }
28
29     TestClientBackedDataStore(final ActorUtils actorUtils, final ClientIdentifier identifier,
30                               final DataStoreClient clientActor) {
31         super(actorUtils, identifier, clientActor);
32     }
33
34     @Override
35     protected AbstractShardManagerCreator<?> getShardManagerCreator() {
36         return new TestShardManager.TestShardManagerCreator();
37     }
38 }

©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.