</dependency>
</dependencies>
+ <profiles>
+ <profile>
+ <id>viewbuild</id>
+ <activation>
+ <activeByDefault>true</activeByDefault>
+ </activation>
+ <properties>
+ <build.suffix>${project.version}</build.suffix>
+ <vtn.build.id />
+ </properties>
+ </profile>
+ <profile>
+ <id>jenkins</id>
+ <activation>
+ <property>
+ <name>BUILDSUFFIX</name>
+ </property>
+ </activation>
+ <properties>
+ <build.suffix>${BUILDSUFFIX}</build.suffix>
+ <vtn.build.id>${BUILDSUFFIX}</vtn.build.id>
+ </properties>
+ </profile>
+ </profiles>
+
</project>
<profiles>
<profile>
- <id>viewbuild</id>
+ <id>integrationtests</id>
<activation>
- <activeByDefault>true</activeByDefault>
+ <activeByDefault>false</activeByDefault>
</activation>
+ <!-- Run all tests. -->
<properties>
- <build.suffix>${project.version}</build.suffix>
- <vtn.build.id />
- </properties>
- </profile>
- <profile>
- <id>jenkins</id>
- <activation>
- <property>
- <name>BUILDSUFFIX</name>
- </property>
- </activation>
- <properties>
- <build.suffix>${BUILDSUFFIX}</build.suffix>
- <vtn.build.id>${BUILDSUFFIX}</vtn.build.id>
+ <maven.test.skip>false</maven.test.skip>
</properties>
</profile>
</profiles>
<execplugin.version>1.1.1</execplugin.version>
<buildhelper.version>1.8</buildhelper.version>
- <!-- Run tests by default. -->
+ <!-- Skip tests entirely unless integrationtests profile is active. -->
<skipTests>false</skipTests>
- <maven.test.skip>false</maven.test.skip>
+ <maven.test.skip>true</maven.test.skip>
<vtn.java.libdir>${basedir}/target/java</vtn.java.libdir>
<vtn.gson.version>2.2.2</vtn.gson.version>
<javadoc.exclude>*.internal</javadoc.exclude>
</properties>
- <profiles>
- <profile>
- <id>viewbuild</id>
- <activation>
- <activeByDefault>true</activeByDefault>
- </activation>
- <properties>
- <build.suffix>${project.version}</build.suffix>
- </properties>
- </profile>
-
- <profile>
- <id>jenkins</id>
- <activation>
- <property>
- <name>BUILDSUFFIX</name>
- </property>
- </activation>
- <properties>
- <build.suffix>${BUILDSUFFIX}</build.suffix>
- </properties>
- </profile>
-
- <profile>
- <id>fastreassembly</id>
- <build>
- <plugins>
- <plugin>
- <groupId>org.apache.maven.plugins</groupId>
- <artifactId>maven-dependency-plugin</artifactId>
- <version>${maven-dependency.version}</version>
- <executions>
- <execution>
- <id>copyfastreassembly</id>
- <phase>install</phase>
- <goals>
- <goal>copy</goal>
- </goals>
- <configuration>
- <artifactItems>
- <artifactItem>
- <groupId>${project.groupId}</groupId>
- <artifactId>${project.artifactId}</artifactId>
- <version>${project.version}</version>
- <destFileName>${project.groupId}.${project.artifactId}-${project.version}.jar</destFileName>
- </artifactItem>
- </artifactItems>
- <outputDirectory>${fastreassembly.directory}</outputDirectory>
- </configuration>
- </execution>
- </executions>
- </plugin>
- </plugins>
- </build>
- </profile>
- </profiles>
-
<repositories>
<!-- OpenDayLight repository mirror -->
<repository>
<module>../neutron</module>
<module>../northbound</module>
- <!-- Tests -->
- <module>../integrationtest</module>
- <module>../northboundIT</module>
-
<!-- Parents -->
<module>../checkstyle</module>
<module>../common</module>
- <module>../common.it</module>
<module>../../common</module>
</modules>
</plugin>
</plugins>
</build>
+
+ <profiles>
+ <profile>
+ <id>integrationtests</id>
+ <activation>
+ <activeByDefault>false</activeByDefault>
+ </activation>
+ <modules>
+ <!-- Run integration tests if integrationtests profile is active. -->
+ <module>../integrationtest</module>
+ <module>../northboundIT</module>
+ <module>../common.it</module>
+ </modules>
+ </profile>
+ </profiles>
</project>
<!--
#
-# Copyright (c) 2013 NEC Corporation
+# Copyright (c) 2013-2014 NEC Corporation
# All rights reserved.
#
# This program and the accompanying materials are made available under the
<sonar.jacoco.Reportpath>target/jacoco.exec</sonar.jacoco.Reportpath>
<sonar.jacoco.itReportPath>target/jacoco-it.exec</sonar.jacoco.itReportPath>
<sonar.language>java</sonar.language>
+
+ <!-- Skip slow tests unless integrationtests profile is active. -->
+ <vtn.test.slowtest>
+ org.opendaylight.vtn.manager.internal.SlowTest
+ </vtn.test.slowtest>
</properties>
+ <profiles>
+ <profile>
+ <id>integrationtests</id>
+ <activation>
+ <activeByDefault>false</activeByDefault>
+ </activation>
+ <properties>
+ <!-- Run all tests. -->
+ <vtn.test.slowtest />
+ </properties>
+ </profile>
+ </profiles>
+
<build>
<plugins>
+ <plugin>
+ <groupId>org.apache.maven.plugins</groupId>
+ <artifactId>maven-surefire-plugin</artifactId>
+ <configuration>
+ <argLine>${testvm.argLine}</argLine>
+ <excludedGroups>${vtn.test.slowtest}</excludedGroups>
+ </configuration>
+ </plugin>
+
<plugin>
<groupId>org.apache.felix</groupId>
<artifactId>maven-bundle-plugin</artifactId>
import java.util.Set;
import org.junit.Test;
+import org.junit.experimental.categories.Category;
import org.opendaylight.controller.hosttracker.hostAware.HostNodeConnector;
import org.opendaylight.controller.sal.core.ConstructionException;
/**
* JUnit test for {@link ArpHandler}
*/
+@Category(SlowTest.class)
public class ArpHandlerTest extends VTNManagerImplTestCommon {
/**
/*
- * Copyright (c) 2013 NEC Corporation
+ * Copyright (c) 2013-2014 NEC Corporation
* 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.vtn.manager.internal;
import java.util.Set;
import org.junit.After;
import org.junit.Before;
import org.junit.Test;
+import org.junit.experimental.categories.Category;
+
import org.opendaylight.controller.forwardingrulesmanager.FlowEntry;
import org.opendaylight.controller.sal.core.Node;
import org.opendaylight.controller.sal.core.NodeConnector;
/**
* test for {@link ClusterFlowAddTask} and {@link ClusterFlowRemoveTask}.
*/
+@Category(SlowTest.class)
public class ClusterFlowTaskTest extends FlowModTaskTestBase {
@Before
/*
- * Copyright (c) 2013 NEC Corporation
+ * Copyright (c) 2013-2014 NEC Corporation
* 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.vtn.manager.internal;
import java.util.ArrayList;
import org.junit.After;
import org.junit.Before;
import org.junit.Test;
+import org.junit.experimental.categories.Category;
+
import org.opendaylight.controller.forwardingrulesmanager.FlowEntry;
import org.opendaylight.controller.sal.core.Node;
import org.opendaylight.controller.sal.core.NodeConnector;
/**
* test for {@link FlowAddTask} and {@link FlowRemoveTask}.
*/
+@Category(SlowTest.class)
public class FlowTaskTest extends FlowModTaskTestBase {
@Before
/*
- * Copyright (c) 2013 NEC Corporation
+ * Copyright (c) 2013-2014 NEC Corporation
* 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.vtn.manager.internal;
import java.util.Set;
import org.junit.After;
import org.junit.Before;
import org.junit.Test;
+import org.junit.experimental.categories.Category;
+
import org.opendaylight.controller.forwardingrulesmanager.FlowEntry;
import org.opendaylight.controller.sal.core.Node;
import org.opendaylight.controller.sal.core.NodeConnector;
/**
* JUnit test for {@link LocalFlowAddTask} and {@link LocalFlowRemoveTask}.
*/
+@Category(SlowTest.class)
public class LocalFlowTaskTest extends FlowModTaskTestBase {
@Before
import org.apache.felix.dm.impl.ComponentImpl;
import org.junit.Test;
+import org.junit.experimental.categories.Category;
import org.opendaylight.controller.sal.core.ConstructionException;
import org.opendaylight.controller.sal.core.Node;
/**
* JUnit test for {@link MacAddressTable}.
*/
+@Category(SlowTest.class)
public class MacAddressTableTest extends TestUseVTNManagerBase {
// The Test class which implemented DataLinkAddress class.
--- /dev/null
+/*
+ * Copyright (c) 2014 NEC Corporation
+ * 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.vtn.manager.internal;
+
+/**
+ * An interface which indicates slow tests.
+ *
+ * <p>
+ * This interface is used to categorize JUnit tests which takes long time.
+ * </p>
+ */
+public interface SlowTest {
+}
import org.junit.Before;
import org.junit.Test;
+import org.junit.experimental.categories.Category;
import org.opendaylight.controller.forwardingrulesmanager.FlowEntry;
import org.opendaylight.controller.sal.connection.ConnectionLocality;
* on the environment some nodes exist in cluster mode.
* </p>
*/
+@Category(SlowTest.class)
public class VTNManagerImplClusterTest extends VTNManagerImplTestCommon {
/**
* Construct a new instance.
import org.apache.felix.dm.impl.ComponentImpl;
import org.junit.Test;
+import org.junit.experimental.categories.Category;
import org.opendaylight.vtn.manager.IVTNManagerAware;
import org.opendaylight.vtn.manager.IVTNModeListener;
* {@link VlanMapImpl} are also implemented in this class.
* </p>
*/
+@Category(SlowTest.class)
public class VTNManagerImplTest extends VTNManagerImplTestCommon {
/**
* Construct a new instance.
import org.apache.felix.dm.impl.ComponentImpl;
import org.junit.Test;
+import org.junit.experimental.categories.Category;
import org.opendaylight.controller.clustering.services.IClusterContainerServices;
import org.opendaylight.controller.forwardingrulesmanager.FlowEntry;
* {@link VlanMapImpl} are also implemented in this class.
* </p>
*/
+@Category(SlowTest.class)
public class VTNManagerImplWithNodesTest extends VTNManagerImplTestCommon {
/**
* Construct a new instance.
/*
- * Copyright (c) 2013 NEC Corporation
+ * Copyright (c) 2013-2014 NEC Corporation
* 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.vtn.manager.internal.cluster;
import java.util.Hashtable;
import org.apache.felix.dm.impl.ComponentImpl;
import org.junit.Test;
+import org.junit.experimental.categories.Category;
import org.opendaylight.controller.forwardingrulesmanager.FlowEntry;
import org.opendaylight.controller.sal.core.Node;
import org.opendaylight.controller.sal.core.NodeConnector;
import org.opendaylight.vtn.manager.internal.VTNFlowDatabase;
import org.opendaylight.vtn.manager.internal.VTNManagerImpl;
+import org.opendaylight.vtn.manager.internal.SlowTest;
+
/**
* JUnit test for {@link FlowModResultEvent}.
*/
+@Category(SlowTest.class)
public class FlowModResultEventTest extends FlowModTaskTestBase {
/**
import java.util.Set;
import org.junit.Test;
+import org.junit.experimental.categories.Category;
import org.opendaylight.vtn.manager.VBridgeIfPath;
import org.opendaylight.vtn.manager.VBridgePath;
import org.opendaylight.vtn.manager.internal.FlowModTaskTestBase;
import org.opendaylight.vtn.manager.internal.L2Host;
+import org.opendaylight.vtn.manager.internal.SlowTest;
+
import org.opendaylight.controller.forwardingrulesmanager.FlowEntry;
import org.opendaylight.controller.sal.action.Action;
import org.opendaylight.controller.sal.action.SetDlDst;
/**
* JUnit Test for {@link VTNFlow}
*/
+@Category(SlowTest.class)
public class VTNFlowTest extends FlowModTaskTestBase {
/**
* Test case for getter methods.