incubator-crunch-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From jwi...@apache.org
Subject [2/19] git commit: CRUNCH-17: Move Scrunch tests to the integration tests directory.
Date Sat, 14 Jul 2012 17:28:53 GMT
CRUNCH-17: Move Scrunch tests to the integration tests directory.


Project: http://git-wip-us.apache.org/repos/asf/incubator-crunch/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-crunch/commit/59194a6f
Tree: http://git-wip-us.apache.org/repos/asf/incubator-crunch/tree/59194a6f
Diff: http://git-wip-us.apache.org/repos/asf/incubator-crunch/diff/59194a6f

Branch: refs/heads/master
Commit: 59194a6ff0a86d85994816339b1ffa04c407cf77
Parents: 42c9e4e
Author: jwills <jwills@apache.org>
Authored: Fri Jul 13 14:41:54 2012 -0700
Committer: jwills <jwills@apache.org>
Committed: Fri Jul 13 14:41:54 2012 -0700

----------------------------------------------------------------------
 scrunch/pom.xml                                    |   62 +-
 scrunch/src/it/resources/log4j.properties          |   13 +
 scrunch/src/it/resources/maugham.txt               |29112 +++++++++++++++
 scrunch/src/it/resources/shakes.txt                | 3667 ++
 scrunch/src/it/resources/urls.txt                  |   11 +
 .../it/scala/org/apache/scrunch/CogroupTest.scala  |   42 +
 .../src/it/scala/org/apache/scrunch/JoinTest.scala |   46 +
 .../org/apache/scrunch/PageRankClassTest.scala     |  118 +
 .../it/scala/org/apache/scrunch/PageRankTest.scala |  105 +
 .../scala/org/apache/scrunch/PipelineAppTest.scala |   47 +
 .../src/it/scala/org/apache/scrunch/TopTest.scala  |   42 +
 .../it/scala/org/apache/scrunch/UnionTest.scala    |   50 +
 .../scala/org/apache/scrunch/WordCountTest.scala   |   45 +
 .../scrunch/interpreter/InterpreterJarTest.scala   |   70 +
 scrunch/src/test/resources/log4j.properties        |   13 -
 scrunch/src/test/resources/maugham.txt             |29112 ---------------
 scrunch/src/test/resources/shakes.txt              | 3667 --
 scrunch/src/test/resources/urls.txt                |   11 -
 .../scala/org/apache/scrunch/CogroupTest.scala     |   42 -
 .../test/scala/org/apache/scrunch/JoinTest.scala   |   46 -
 .../org/apache/scrunch/PageRankClassTest.scala     |  118 -
 .../scala/org/apache/scrunch/PageRankTest.scala    |  105 -
 .../scala/org/apache/scrunch/PipelineAppTest.scala |   47 -
 .../test/scala/org/apache/scrunch/TopTest.scala    |   42 -
 .../test/scala/org/apache/scrunch/UnionTest.scala  |   50 -
 .../scala/org/apache/scrunch/WordCountTest.scala   |   45 -
 .../scrunch/interpreter/InterpreterJarTest.scala   |   70 -
 27 files changed, 33429 insertions(+), 33369 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-crunch/blob/59194a6f/scrunch/pom.xml
----------------------------------------------------------------------
diff --git a/scrunch/pom.xml b/scrunch/pom.xml
index c02db7b..50c5ab1 100644
--- a/scrunch/pom.xml
+++ b/scrunch/pom.xml
@@ -140,16 +140,76 @@ under the License.
       <plugin>
         <groupId>org.apache.maven.plugins</groupId>
         <artifactId>maven-surefire-plugin</artifactId>
-        <version>2.6</version>
+        <version>2.10</version>
         <configuration>
           <useFile>false</useFile>
           <disableXmlReport>true</disableXmlReport>
+          <includes>
+            <include>${project.build.testSourceDirectory}/**/*Test.*</include>
+            <include>${project.build.testSourceDirectory}/**/*Suite.*</include>
+          </includes>
+        </configuration>
+      </plugin>
+      <!-- We put slow-running tests into src/it and run them during the
+           integration-test phase using the failsafe plugin. This way
+           developers can run unit tests conveniently from the IDE or via
+           "mvn package" from the command line without triggering time
+           consuming integration tests. -->
+      <plugin>
+        <groupId>org.codehaus.mojo</groupId>
+        <artifactId>build-helper-maven-plugin</artifactId>
+        <version>1.7</version>
+        <executions>
+          <execution>
+            <id>add-test-source</id>
+            <phase>validate</phase>
+            <goals>
+              <goal>add-test-source</goal>
+            </goals>
+            <configuration>
+              <sources>
+                <source>src/it/scala</source>
+              </sources>
+            </configuration>
+          </execution>
+          <execution>
+            <id>add-test-resource</id>
+            <phase>validate</phase>
+            <goals>
+              <goal>add-test-resource</goal>
+            </goals>
+            <configuration>
+              <resources>
+                  <resource>
+                    <directory>src/it/resources</directory>
+                  </resource>
+              </resources>
+            </configuration>
+          </execution>
+        </executions>
+      </plugin>
+      <plugin>
+        <groupId>org.apache.maven.plugins</groupId>
+        <artifactId>maven-failsafe-plugin</artifactId>
+        <version>2.12</version>
+        <configuration>
+          <testSourceDirectory>src/it/scala</testSourceDirectory>
+          <useFile>false</useFile>
+          <disableXmlReport>true</disableXmlReport>
           <argLine>-Xmx512m</argLine>
           <includes>
             <include>**/*Test.*</include>
             <include>**/*Suite.*</include>
           </includes>
         </configuration>
+        <executions>
+          <execution>
+            <goals>
+              <goal>integration-test</goal>
+              <goal>verify</goal>
+            </goals>
+          </execution>
+        </executions>
       </plugin>
     </plugins>
   </build>

http://git-wip-us.apache.org/repos/asf/incubator-crunch/blob/59194a6f/scrunch/src/it/resources/log4j.properties
----------------------------------------------------------------------
diff --git a/scrunch/src/it/resources/log4j.properties b/scrunch/src/it/resources/log4j.properties
new file mode 100644
index 0000000..985a2eb
--- /dev/null
+++ b/scrunch/src/it/resources/log4j.properties
@@ -0,0 +1,13 @@
+# ***** Set root logger level to INFO and its only appender to A.
+log4j.logger.org.apache.crunch=info, A
+log4j.logger.org.apache.scrunch=info, A
+
+# Log warnings on Hadoop for the local runner when testing
+log4j.logger.org.apache.hadoop=warn, A
+
+# ***** A is set to be a ConsoleAppender.
+log4j.appender.A=org.apache.log4j.ConsoleAppender
+# ***** A uses PatternLayout.
+log4j.appender.A.layout=org.apache.log4j.PatternLayout
+log4j.appender.A.layout.ConversionPattern=%-4r [%t] %-5p %c %x - %m%n
+


Mime
View raw message