X-Git-Url: https://git.opendaylight.org/gerrit/gitweb?p=controller.git;a=blobdiff_plain;f=opendaylight%2Fstatisticsmanager%2Fintegrationtest%2Fsrc%2Ftest%2Fjava%2Forg%2Fopendaylight%2Fcontroller%2Fstatisticsmanager%2Finternal%2FStatisticsManagerIT.java;h=18cce74c1dbcc49571a33cf72744cc8148e64191;hp=64d752dd3168727497f4588ae5921bc2a9effc84;hb=6fd408a04fe4a3611843e2246ece6d7c34b76903;hpb=84e8316159f90f224f75e86a606c525e53b2ff7a diff --git a/opendaylight/statisticsmanager/integrationtest/src/test/java/org/opendaylight/controller/statisticsmanager/internal/StatisticsManagerIT.java b/opendaylight/statisticsmanager/integrationtest/src/test/java/org/opendaylight/controller/statisticsmanager/internal/StatisticsManagerIT.java index 64d752dd31..18cce74c1d 100644 --- a/opendaylight/statisticsmanager/integrationtest/src/test/java/org/opendaylight/controller/statisticsmanager/internal/StatisticsManagerIT.java +++ b/opendaylight/statisticsmanager/integrationtest/src/test/java/org/opendaylight/controller/statisticsmanager/internal/StatisticsManagerIT.java @@ -1,20 +1,32 @@ +/* + * Copyright (c) 2014 Cisco Systems, Inc. and others. All rights reserved. + * + * This program and the accompanying materials are made available under the + * terms of the Eclipse Public License v1.0 which accompanies this distribution, + * and is available at http://www.eclipse.org/legal/epl-v10.html + */ package org.opendaylight.controller.statisticsmanager.internal; +import static org.junit.Assert.assertFalse; +import static org.junit.Assert.assertNotNull; +import static org.junit.Assert.fail; +import static org.ops4j.pax.exam.CoreOptions.junitBundles; +import static org.ops4j.pax.exam.CoreOptions.mavenBundle; +import static org.ops4j.pax.exam.CoreOptions.options; +import static org.ops4j.pax.exam.CoreOptions.systemPackages; +import static org.ops4j.pax.exam.CoreOptions.systemProperty; + import java.net.InetAddress; import java.net.UnknownHostException; import java.util.ArrayList; import java.util.List; import java.util.Map; -import org.slf4j.Logger; -import org.slf4j.LoggerFactory; -import org.osgi.framework.ServiceReference; -import org.osgi.framework.Bundle; import javax.inject.Inject; import org.junit.Assert; -import org.junit.Test; import org.junit.Before; +import org.junit.Test; import org.junit.runner.RunWith; import org.opendaylight.controller.forwardingrulesmanager.FlowEntry; import org.opendaylight.controller.sal.action.Action; @@ -28,16 +40,16 @@ import org.opendaylight.controller.sal.match.MatchType; import org.opendaylight.controller.sal.reader.FlowOnNode; import org.opendaylight.controller.sal.reader.NodeConnectorStatistics; import org.opendaylight.controller.sal.reader.NodeDescription; -import org.opendaylight.controller.sal.utils.NodeCreator; -import org.opendaylight.controller.statisticsmanager.*; -import org.ops4j.pax.exam.junit.PaxExam; -import org.osgi.framework.BundleContext; -import static org.junit.Assert.*; -import org.ops4j.pax.exam.junit.Configuration; -import static org.ops4j.pax.exam.CoreOptions.*; - +import org.opendaylight.controller.statisticsmanager.IStatisticsManager; import org.ops4j.pax.exam.Option; +import org.ops4j.pax.exam.Configuration; +import org.ops4j.pax.exam.junit.PaxExam; import org.ops4j.pax.exam.util.PathUtils; +import org.osgi.framework.Bundle; +import org.osgi.framework.BundleContext; +import org.osgi.framework.ServiceReference; +import org.slf4j.Logger; +import org.slf4j.LoggerFactory; @RunWith(PaxExam.class) public class StatisticsManagerIT { @@ -62,20 +74,13 @@ public class StatisticsManagerIT { // Set the systemPackages (used by clustering) systemPackages("sun.reflect", "sun.reflect.misc", "sun.misc"), // List framework bundles - mavenBundle("equinoxSDK381", "org.eclipse.equinox.console", - "1.0.0.v20120522-1841"), - mavenBundle("equinoxSDK381", "org.eclipse.equinox.util", - "1.0.400.v20120522-2049"), - mavenBundle("equinoxSDK381", "org.eclipse.osgi.services", - "3.3.100.v20120522-1822"), - mavenBundle("equinoxSDK381", "org.eclipse.equinox.ds", - "1.4.0.v20120522-1841"), - mavenBundle("equinoxSDK381", "org.apache.felix.gogo.command", - "0.8.0.v201108120515"), - mavenBundle("equinoxSDK381", "org.apache.felix.gogo.runtime", - "0.8.0.v201108120515"), - mavenBundle("equinoxSDK381", "org.apache.felix.gogo.shell", - "0.8.0.v201110170705"), + mavenBundle("equinoxSDK381", "org.eclipse.equinox.console").versionAsInProject(), + mavenBundle("equinoxSDK381", "org.eclipse.equinox.util").versionAsInProject(), + mavenBundle("equinoxSDK381", "org.eclipse.osgi.services").versionAsInProject(), + mavenBundle("equinoxSDK381", "org.eclipse.equinox.ds").versionAsInProject(), + mavenBundle("equinoxSDK381", "org.apache.felix.gogo.command").versionAsInProject(), + mavenBundle("equinoxSDK381", "org.apache.felix.gogo.runtime").versionAsInProject(), + mavenBundle("equinoxSDK381", "org.apache.felix.gogo.shell").versionAsInProject(), // List logger bundles mavenBundle("org.slf4j", "slf4j-api").versionAsInProject(), mavenBundle("org.slf4j", "log4j-over-slf4j") @@ -84,46 +89,52 @@ public class StatisticsManagerIT { .versionAsInProject(), mavenBundle("ch.qos.logback", "logback-classic") .versionAsInProject(), - // List all the bundles on which the test case depends - mavenBundle("org.opendaylight.controller", "sal") - .versionAsInProject(), - mavenBundle("org.opendaylight.controller", "sal.implementation") - .versionAsInProject(), - mavenBundle("org.opendaylight.controller", "statisticsmanager") - .versionAsInProject(), - mavenBundle("org.opendaylight.controller", - "statisticsmanager.implementation") - .versionAsInProject(), - mavenBundle("org.opendaylight.controller", - "protocol_plugins.stub").versionAsInProject(), // needed by statisticsmanager mavenBundle("org.opendaylight.controller", "containermanager") - .versionAsInProject(), - mavenBundle("org.opendaylight.controller", - "containermanager.implementation").versionAsInProject(), - mavenBundle("org.opendaylight.controller", - "forwardingrulesmanager").versionAsInProject(), - - mavenBundle("org.opendaylight.controller", - "clustering.services").versionAsInProject(), + .versionAsInProject(), + mavenBundle("org.opendaylight.controller", "containermanager.it.implementation") + .versionAsInProject(), + mavenBundle("org.opendaylight.controller", "clustering.services") + .versionAsInProject(), mavenBundle("org.opendaylight.controller", "clustering.stub") - .versionAsInProject(), - + .versionAsInProject(), // needed by forwardingrulesmanager - mavenBundle("org.opendaylight.controller", "switchmanager") - .versionAsInProject(), mavenBundle("org.opendaylight.controller", "configuration") - .versionAsInProject(), - - mavenBundle("org.opendaylight.controller", - "configuration.implementation").versionAsInProject(), + .versionAsInProject(), + mavenBundle("org.opendaylight.controller", "configuration.implementation") + .versionAsInProject(), mavenBundle("org.opendaylight.controller", "hosttracker") - .versionAsInProject(), + .versionAsInProject(), + + // List all the bundles on which the test case depends + mavenBundle("org.opendaylight.controller", "sal") + .versionAsInProject(), + mavenBundle("org.opendaylight.controller", "sal.implementation") + .versionAsInProject(), + mavenBundle("org.opendaylight.controller", "protocol_plugins.stub") + .versionAsInProject(), + mavenBundle("org.opendaylight.controller", "switchmanager") + .versionAsInProject(), + mavenBundle("org.opendaylight.controller", "switchmanager.implementation") + .versionAsInProject(), + mavenBundle("org.opendaylight.controller", "statisticsmanager") + .versionAsInProject(), + mavenBundle("org.opendaylight.controller", "statisticsmanager.implementation") + .versionAsInProject(), + mavenBundle("org.opendaylight.controller", "forwardingrulesmanager") + .versionAsInProject(), + mavenBundle("org.opendaylight.controller", "connectionmanager.implementation"). + versionAsInProject(), + mavenBundle("org.opendaylight.controller", "connectionmanager"). + versionAsInProject(), + mavenBundle("org.opendaylight.controller", "sal.connection"). + versionAsInProject(), + mavenBundle("org.opendaylight.controller", "sal.connection.implementation"). + versionAsInProject(), // needed by hosttracker mavenBundle("org.opendaylight.controller", "topologymanager") .versionAsInProject(), - mavenBundle("org.jboss.spec.javax.transaction", "jboss-transaction-api_1.1_spec").versionAsInProject(), mavenBundle("org.apache.commons", "commons-lang3") @@ -223,6 +234,11 @@ public class StatisticsManagerIT { List actions = new ArrayList(); actions.add(action); flow.setActions(actions); + // as in stub + flow.setPriority((short) 3500); + flow.setIdleTimeout((short) 1000); + flow.setHardTimeout((short) 2000); + flow.setId(12345); try { Node node = new Node("STUB", 0xCAFE); @@ -318,4 +334,4 @@ public class StatisticsManagerIT { } } -} \ No newline at end of file +}