Search in sources :

Example 6 with TestStorageService

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

the class OpenstackNodeManagerTest method setUp.

@Before
public void setUp() {
    osNodeStore = new DistributedOpenstackNodeStore();
    TestUtils.setField(osNodeStore, "coreService", new TestCoreService());
    TestUtils.setField(osNodeStore, "storageService", new TestStorageService());
    TestUtils.setField(osNodeStore, "eventExecutor", MoreExecutors.newDirectExecutorService());
    osNodeStore.activate();
    osNodeStore.createNode(COMPUTE_2);
    osNodeStore.createNode(COMPUTE_3);
    osNodeStore.createNode(GATEWAY_1);
    target = new org.onosproject.openstacknode.impl.OpenstackNodeManager();
    target.storageService = new TestStorageService();
    target.coreService = new TestCoreService();
    target.clusterService = new TestClusterService();
    target.leadershipService = new TestLeadershipService();
    target.osNodeStore = osNodeStore;
    target.addListener(testListener);
    target.activate();
    testListener.events.clear();
}
Also used : TestStorageService(org.onosproject.store.service.TestStorageService) Before(org.junit.Before)

Example 7 with TestStorageService

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

the class DistributedDhcpRelayStoreTest method setup.

@Before
public void setup() {
    store = new DistributedDhcpRelayStore();
    store.storageService = new TestStorageService();
    store.activated();
}
Also used : TestStorageService(org.onosproject.store.service.TestStorageService) Before(org.junit.Before)

Example 8 with TestStorageService

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

the class DistributedAlarmStoreTest method setUp.

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

Example 9 with TestStorageService

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

the class DeviceKeyManagerTest method setUp.

@Before
public void setUp() throws Exception {
    deviceKeyStore = new DistributedDeviceKeyStore();
    TestUtils.setField(deviceKeyStore, "storageService", new TestStorageService());
    deviceKeyStore.activate();
    manager = new DeviceKeyManager();
    manager.store = deviceKeyStore;
    manager.addListener(listener);
    NetTestTools.injectEventDispatcher(manager, new TestEventDispatcher());
    manager.activate();
    deviceKeyService = manager;
}
Also used : TestEventDispatcher(org.onosproject.common.event.impl.TestEventDispatcher) DistributedDeviceKeyStore(org.onosproject.store.key.impl.DistributedDeviceKeyStore) TestStorageService(org.onosproject.store.service.TestStorageService) Before(org.junit.Before)

Example 10 with TestStorageService

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

the class MulticastRouteManagerTest method setUp.

@Before
public void setUp() throws Exception {
    manager = new MulticastRouteManager();
    mcastStore = new DistributedMcastStore();
    TestUtils.setField(mcastStore, "storageService", new TestStorageService());
    injectEventDispatcher(manager, new TestEventDispatcher());
    events = Lists.newArrayList();
    manager.store = mcastStore;
    mcastStore.activate();
    manager.activate();
    manager.addListener(listener);
}
Also used : TestEventDispatcher(org.onosproject.common.event.impl.TestEventDispatcher) DistributedMcastStore(org.onosproject.store.mcast.impl.DistributedMcastStore) 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