Search in sources :

Example 11 with TestStorageService

use of org.onosproject.store.service.TestStorageService in project onos by opennetworkinglab.

the class K8sIngressManagerTest method setUp.

@Before
public void setUp() throws Exception {
    k8sIngressStore = new DistributedK8sIngressStore();
    TestUtils.setField(k8sIngressStore, "coreService", new TestCoreService());
    TestUtils.setField(k8sIngressStore, "storageService", new TestStorageService());
    TestUtils.setField(k8sIngressStore, "eventExecutor", MoreExecutors.newDirectExecutorService());
    k8sIngressStore.activate();
    target = new K8sIngressManager();
    TestUtils.setField(target, "coreService", new TestCoreService());
    target.k8sIngressStore = k8sIngressStore;
    target.addListener(testListener);
    target.activate();
}
Also used : TestStorageService(org.onosproject.store.service.TestStorageService) Before(org.junit.Before)

Example 12 with TestStorageService

use of org.onosproject.store.service.TestStorageService in project onos by opennetworkinglab.

the class K8sNetworkManagerTest method setUp.

@Before
public void setUp() throws Exception {
    k8sNetworkStore = new DistributedK8sNetworkStore();
    TestUtils.setField(k8sNetworkStore, "coreService", new TestCoreService());
    TestUtils.setField(k8sNetworkStore, "storageService", new TestStorageService());
    TestUtils.setField(k8sNetworkStore, "eventExecutor", MoreExecutors.newDirectExecutorService());
    k8sNetworkStore.activate();
    target = new K8sNetworkManager();
    TestUtils.setField(target, "coreService", new TestCoreService());
    target.k8sNetworkStore = k8sNetworkStore;
    target.addListener(testListener);
    target.activate();
}
Also used : TestStorageService(org.onosproject.store.service.TestStorageService) Before(org.junit.Before)

Example 13 with TestStorageService

use of org.onosproject.store.service.TestStorageService in project onos by opennetworkinglab.

the class K8sServiceManagerTest method setUp.

@Before
public void setUp() throws Exception {
    k8sServiceStore = new DistributedK8sServiceStore();
    TestUtils.setField(k8sServiceStore, "coreService", new TestCoreService());
    TestUtils.setField(k8sServiceStore, "storageService", new TestStorageService());
    TestUtils.setField(k8sServiceStore, "eventExecutor", MoreExecutors.newDirectExecutorService());
    k8sServiceStore.activate();
    target = new K8sServiceManager();
    TestUtils.setField(target, "coreService", new TestCoreService());
    target.k8sServiceStore = k8sServiceStore;
    target.addListener(testListener);
    target.activate();
}
Also used : TestStorageService(org.onosproject.store.service.TestStorageService) Before(org.junit.Before)

Example 14 with TestStorageService

use of org.onosproject.store.service.TestStorageService in project onos by opennetworkinglab.

the class DistributedComponentConfigStoreTest method setUp.

/**
 * Sets up the device key store and the storage service test harness.
 */
@Before
public void setUp() {
    store = new TestStore();
    store.storageService = new TestStorageService();
    store.setDelegate(e -> this.event = e);
    store.activate();
}
Also used : TestStorageService(org.onosproject.store.service.TestStorageService) Before(org.junit.Before)

Example 15 with TestStorageService

use of org.onosproject.store.service.TestStorageService in project onos by opennetworkinglab.

the class DistributedFlowObjectiveStoreTest method setUp.

@Before
public void setUp() {
    storeImpl = new DistributedFlowObjectiveStore();
    storeImpl.storageService = new TestStorageService();
    storeImpl.activate();
    store = storeImpl;
}
Also used : TestStorageService(org.onosproject.store.service.TestStorageService) Before(org.junit.Before)

Aggregations

Before (org.junit.Before)75 TestStorageService (org.onosproject.store.service.TestStorageService)75 TestEventDispatcher (org.onosproject.common.event.impl.TestEventDispatcher)18 TestServiceDirectory (org.onlab.osgi.TestServiceDirectory)12 DistributedVirtualNetworkStore (org.onosproject.incubator.net.virtual.store.impl.DistributedVirtualNetworkStore)12 CoreService (org.onosproject.core.CoreService)8 ClusterServiceAdapter (org.onosproject.cluster.ClusterServiceAdapter)6 ClusterCommunicationServiceAdapter (org.onosproject.store.cluster.messaging.ClusterCommunicationServiceAdapter)5 TestApplicationId (org.onosproject.TestApplicationId)3 ComponentConfigAdapter (org.onosproject.cfg.ComponentConfigAdapter)3 ClusterService (org.onosproject.cluster.ClusterService)3 LeadershipServiceAdapter (org.onosproject.cluster.LeadershipServiceAdapter)3 CoreServiceAdapter (org.onosproject.core.CoreServiceAdapter)3 VirtualNetworkStore (org.onosproject.incubator.net.virtual.VirtualNetworkStore)3 VirtualProviderManager (org.onosproject.incubator.net.virtual.impl.provider.VirtualProviderManager)3 FlowObjectiveServiceAdapter (org.onosproject.net.flowobjective.FlowObjectiveServiceAdapter)3 Semaphore (java.util.concurrent.Semaphore)2 ComponentContextAdapter (org.onlab.osgi.ComponentContextAdapter)2 KryoNamespace (org.onlab.util.KryoNamespace)2 NodeId (org.onosproject.cluster.NodeId)2