|
From: <ble...@us...> - 2010-10-05 20:18:42
|
Revision: 3731
http://bigdata.svn.sourceforge.net/bigdata/?rev=3731&view=rev
Author: blevine218
Date: 2010-10-05 20:18:36 +0000 (Tue, 05 Oct 2010)
Log Message:
-----------
Execute unit tests using surefire plugin (part 2)
- Unit tests now run as part of the build lifecycle.
- Unit tests can be skipped by adding -DskipTests to the mvn command-line
- log4j.configuration and log4j.path now point to new, less verbose log4j.properties file located in .../testing/conf/log4j.properties
Modified Paths:
--------------
branches/maven_scaleout/bigdata-core/pom.xml
branches/maven_scaleout/bigdata-integ/pom.xml
branches/maven_scaleout/pom.xml
Added Paths:
-----------
branches/maven_scaleout/bigdata-core/src/test/deploy/testing/conf/log4j.properties
Modified: branches/maven_scaleout/bigdata-core/pom.xml
===================================================================
--- branches/maven_scaleout/bigdata-core/pom.xml 2010-10-05 19:57:25 UTC (rev 3730)
+++ branches/maven_scaleout/bigdata-core/pom.xml 2010-10-05 20:18:36 UTC (rev 3731)
@@ -14,38 +14,37 @@
<name>Bigdata Core</name>
<url>http://www.bigdata.com</url>
+ <description>The Bigdata Core</description>
- <properties>
- <!-- group ID for non-public bigdata dependencies. -->
+ <properties>
+ <!-- group ID for non-public bigdata dependencies. -->
<thirdParty.groupId>com.bigdata.thirdparty</thirdParty.groupId>
-
- <!-- These properties are used to set system properties that are required by the unit
- tests. See the surefire plugin configuration below. Any of these can be overridden on
- the command-line by adding -D<property-name>=<propert-value>.
- -->
-
- <!-- Skip running unit tests by default until we get the kinks worked out. Can be overridden
- by adding '-DskipTests=false' to the command-line -->
- <skipTests>true</skipTests>
-
- <!-- This directory is created when the deployment tarball is created
- during the 'package' phase by the maven assembly plugin. If the naming
- convention as defined in src/main/assembly/deploy.xml changes, this property
- needs to change as well. -->
+
+ <!--
+ These properties are used to set system properties that are required by the unit tests. See the surefire plugin configuration below. Any of these can be overridden on the command-line by
+ adding -D<property-name>=<propert-value>.
+ -->
+
+ <!--
+ This directory is created when the deployment tarball is created during the 'package' phase by the maven assembly plugin. If the naming convention as defined in
+ src/main/assembly/deploy.xml changes, this property needs to change as well.
+
+ TODO: May want to see if these can be promoted to the parent POM and shared with the bigdata-integ module
+ -->
<deploy.root.dir>${project.build.directory}/${project.artifactId}-${project.version}-deploy</deploy.root.dir>
-
+
<deploy.dir>${deploy.root.dir}/${project.artifactId}-${project.version}</deploy.dir>
<app.home>${deploy.dir}</app.home>
<test.dir>${deploy.dir}/testing</test.dir>
- <deploy.conf.dir>${test.dir}/conf</deploy.conf.dir>
+ <test.conf.dir>${test.dir}/conf</test.conf.dir>
<deploy.lib>${deploy.dir}/lib</deploy.lib>
<test.codebase.dir>${deploy.lib.dl}</test.codebase.dir>
<test.codebase.port>23333</test.codebase.port>
- <java.security.policy>${deploy.conf.dir}/policy.all</java.security.policy>
- <log4j.configuration>${deploy.dir}/var/config/logging/log4j.properties</log4j.configuration>
+ <java.security.policy>${test.conf.dir}/policy.all</java.security.policy>
+ <log4j.configuration>${test.conf.dir}/log4j.properties</log4j.configuration>
<java.net.preferIPv4Stack>true</java.net.preferIPv4Stack>
<default.nic>eth0</default.nic>
-
+
<!-- Set to empty string to indicate "unset." Application code will set a reasonable default -->
<federation.name></federation.name>
</properties>
@@ -56,8 +55,10 @@
<artifactId>maven-compiler-plugin</artifactId>
<configuration>
<compilerArguments>
- <!-- Apparently Javac may compile java source files inside jars put on the classpath. Weird. Zookeeper 3.2.1 jar contained classes and sources, and under some circumstances, the
- java files were getting recompiled and put into the bigdata jar. This setting forces javac to only look for source in the current maven source directory. -->
+ <!--
+ Apparently Javac may compile java source files inside jars put on the classpath. Weird. Zookeeper 3.2.1 jar contained classes and sources, and under some circumstances, the
+ java files were getting recompiled and put into the bigdata jar. This setting forces javac to only look for source in the current maven source directory.
+ -->
<sourcepath>${project.build.sourceDirectory}</sourcepath>
</compilerArguments>
</configuration>
@@ -110,9 +111,10 @@
</executions>
</plugin>
- <!-- Configure the surefire plugin to run in the 'integration-test' phase rather than the 'test' phase.
- This allows us to run the unit tests after packaging has been done, but before the build artifacts
- are installed during the 'install' phase -->
+ <!--
+ Configure the surefire plugin to run in the 'integration-test' phase rather than the 'test' phase. This allows us to run the unit tests after packaging has been done, but before the
+ build artifacts are installed during the 'install' phase
+ -->
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-surefire-plugin</artifactId>
@@ -127,10 +129,11 @@
<goal>test</goal>
</goals>
<configuration>
+ <testFailureIgnore>true</testFailureIgnore>
<skip>false</skip>
<!-- Run only the top-level suite which in turn runs the other suites and tests -->
<test>com.bigdata.TestAll</test>
-
+
<!-- These system properties are required by the unit tests. -->
<systemPropertyVariables>
<java.security.policy>${java.security.policy}</java.security.policy>
@@ -141,7 +144,7 @@
<log4j.path>${log4j.configuration}</log4j.path>
<default.nic>${default.nic}</default.nic>
<federation.name>${federation.name}</federation.name>
-
+
<classserver.jar>${deploy.lib}/classserver.jar</classserver.jar>
<colt.jar>${deploy.lib}/colt.jar</colt.jar>
<ctc_utils.jar>${deploy.lib}/ctc_utils.jar</ctc_utils.jar>
@@ -429,8 +432,10 @@
<groupId>log4j</groupId>
<artifactId>log4j</artifactId>
<version>1.2.15</version>
- <!-- These exclusions are to address the fact that 1.2.15 added new features that depends on Sun specific jars, but these jars cannot be made available due to Sun's click-through requirement
- on them. We aren't using the new features anyway, so they are safe to exclude. log4j should have made these optional in their POM. -->
+ <!--
+ These exclusions are to address the fact that 1.2.15 added new features that depends on Sun specific jars, but these jars cannot be made available due to Sun's click-through
+ requirement on them. We aren't using the new features anyway, so they are safe to exclude. log4j should have made these optional in their POM.
+ -->
<exclusions>
<exclusion>
<groupId>javax.mail</groupId>
@@ -590,7 +595,13 @@
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-surefire-report-plugin</artifactId>
- <version>2.5</version>
+ <reportSets>
+ <reportSet>
+ <reports>
+ <report>report-only</report>
+ </reports>
+ </reportSet>
+ </reportSets>
</plugin>
<plugin>
Added: branches/maven_scaleout/bigdata-core/src/test/deploy/testing/conf/log4j.properties
===================================================================
--- branches/maven_scaleout/bigdata-core/src/test/deploy/testing/conf/log4j.properties (rev 0)
+++ branches/maven_scaleout/bigdata-core/src/test/deploy/testing/conf/log4j.properties 2010-10-05 20:18:36 UTC (rev 3731)
@@ -0,0 +1,35 @@
+# Default log4j configuration. See the individual classes for the
+# specific loggers, but generally they are named for the class in
+# which they are defined.
+
+# Default log4j configuration for testing purposes.
+#
+# You probably want to set the default log level to ERROR.
+
+#log4j.rootCategory=ALL, dest2
+log4j.rootCategory=ERROR, dest2
+
+# Loggers.
+# Note: logging here at INFO or DEBUG will significantly impact throughput!
+#log4j.logger.com.bigdata=ERROR
+#log4j.logger.org.apache=ERROR
+#log4j.junit=ERROR
+
+# dest1
+log4j.appender.dest1=org.apache.log4j.ConsoleAppender
+log4j.appender.dest1.layout=org.apache.log4j.PatternLayout
+log4j.appender.dest1.layout.ConversionPattern=%-5p: %r %l: %m%n
+#log4j.appender.dest1.layout.ConversionPattern=%-5p: %m%n
+#log4j.appender.dest1.layout.ConversionPattern=%-4r [%t] %-5p %c %x - %m%n
+#log4j.appender.dest1.layout.ConversionPattern=%-4r(%d) [%t] %-5p %c(%l:%M) %x - %m%n
+
+# dest2 includes the thread name and elapsed milliseconds.
+# Note: %r is elapsed milliseconds.
+# Note: %t is the thread name.
+# See http://logging.apache.org/log4j/1.2/apidocs/org/apache/log4j/PatternLayout.html
+log4j.appender.dest2=org.apache.log4j.ConsoleAppender
+log4j.appender.dest2.layout=org.apache.log4j.PatternLayout
+log4j.appender.dest2.layout.ConversionPattern=%-5p: %r %X{hostname} %X{serviceUUID} %X{taskname} %X{timestamp} %X{resources} %t %l: %m%n
+
+
+
Modified: branches/maven_scaleout/bigdata-integ/pom.xml
===================================================================
--- branches/maven_scaleout/bigdata-integ/pom.xml 2010-10-05 19:57:25 UTC (rev 3730)
+++ branches/maven_scaleout/bigdata-integ/pom.xml 2010-10-05 20:18:36 UTC (rev 3731)
@@ -10,6 +10,7 @@
<groupId>com.bigdata</groupId>
<artifactId>bigdata-integration-test</artifactId>
<name>bigdata Integration Tests</name>
+ <description>The Bigdata Integration Tests</description>
<!--
Note: Most properties include the "integ." prefix so that they
@@ -221,7 +222,6 @@
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-surefire-report-plugin</artifactId>
- <version>2.6</version>
<reportSets>
<reportSet>
<id>integration-tests</id>
Modified: branches/maven_scaleout/pom.xml
===================================================================
--- branches/maven_scaleout/pom.xml 2010-10-05 19:57:25 UTC (rev 3730)
+++ branches/maven_scaleout/pom.xml 2010-10-05 20:18:36 UTC (rev 3731)
@@ -1,5 +1,4 @@
-<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
- xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
+<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
<modelVersion>4.0.0</modelVersion>
<groupId>com.bigdata</groupId>
@@ -49,13 +48,13 @@
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-surefire-plugin</artifactId>
- <version>2.5</version>
+ <version>2.6</version>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-failsafe-plugin</artifactId>
- <version>2.5</version>
+ <version>2.6</version>
</plugin>
<plugin>
@@ -84,11 +83,11 @@
<dependencyManagement>
<dependencies>
<dependency>
- <groupId>junit</groupId>
- <artifactId>junit</artifactId>
- <version>4.8.1</version>
- <scope>test</scope>
- </dependency>
+ <groupId>junit</groupId>
+ <artifactId>junit</artifactId>
+ <version>4.8.1</version>
+ <scope>test</scope>
+ </dependency>
<!-- slf4j -->
@@ -106,7 +105,10 @@
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-surefire-report-plugin</artifactId>
- <version>2.5</version>
+ <version>2.6</version>
+ <configuration>
+ <xrefLocation>${project.reporting.outputDirectory}/../xref-test</xrefLocation>
+ </configuration>
</plugin>
</plugins>
</reporting>
@@ -148,14 +150,16 @@
<configuration>
<jdk>1.5</jdk>
<!--
- To use clover with bigdata, you should
- add the following to your maven settings
- file, .m2/settings.xml <profile>
- <id>bigdata-clover</id> <activation>
- <activeByDefault>true</activeByDefault>
- </activation> <properties>
- <maven.clover.licenseLocation>/your/path/to/clover.license</maven.clover.licenseLocation>
- </properties> </profile>
+ To use clover with bigdata, you should add the following to your maven settings file, .m2/settings.xml
+ <profile>
+ <id>bigdata-clover</id>
+ <activation>
+ <activeByDefault>true</activeByDefault>
+ </activation>
+ <properties>
+ <maven.clover.licenseLocation>/your/path/to/clover.license</maven.clover.licenseLocation>
+ </properties>
+ </profile>
-->
</configuration>
</plugin>
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|