You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@slider.apache.org by el...@apache.org on 2016/06/23 03:28:57 UTC

[1/3] incubator-slider git commit: SLIDER-1148 Use dist-dev not dist-release

Repository: incubator-slider
Updated Branches:
  refs/heads/branches/branch-0.91 b9c4e8470 -> 9f491ef80


SLIDER-1148 Use dist-dev not dist-release


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

Branch: refs/heads/branches/branch-0.91
Commit: b895f5be9be49ae04d6680af76f0c17822b5ce8d
Parents: 47c1e94
Author: Josh Elser <el...@apache.org>
Authored: Wed Jun 22 23:06:46 2016 -0400
Committer: Josh Elser <el...@apache.org>
Committed: Wed Jun 22 23:19:07 2016 -0400

----------------------------------------------------------------------
 bin/release.xml | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-slider/blob/b895f5be/bin/release.xml
----------------------------------------------------------------------
diff --git a/bin/release.xml b/bin/release.xml
index 603d1fc..518caf7 100644
--- a/bin/release.xml
+++ b/bin/release.xml
@@ -99,7 +99,7 @@
 
     <!-- SVN properties-->
     <property name="incubator.svn.url"
-      value="https://dist.apache.org/repos/dist/release/incubator" />
+      value="https://dist.apache.org/repos/dist/dev/incubator" />
     
     <!-- RC release properties-->
     <property name="svn.rc.dir" value="${svn.publish.dir}/${rc.name}" />


[2/3] incubator-slider git commit: SLIDER-1146 Remove unnecessary test.failIfNoTests property

Posted by el...@apache.org.
SLIDER-1146 Remove unnecessary test.failIfNoTests property

Use the existing failIfNoTests property to control whether the build
should fail if no unit tests are executed (via surefire)


Project: http://git-wip-us.apache.org/repos/asf/incubator-slider/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-slider/commit/47c1e946
Tree: http://git-wip-us.apache.org/repos/asf/incubator-slider/tree/47c1e946
Diff: http://git-wip-us.apache.org/repos/asf/incubator-slider/diff/47c1e946

Branch: refs/heads/branches/branch-0.91
Commit: 47c1e946b13e535bcd0c905040fe025ea955b2b0
Parents: b9c4e84
Author: Josh Elser <el...@apache.org>
Authored: Wed Jun 22 19:12:41 2016 -0400
Committer: Josh Elser <el...@apache.org>
Committed: Wed Jun 22 23:19:07 2016 -0400

----------------------------------------------------------------------
 pom.xml             | 1 -
 slider-core/pom.xml | 2 +-
 2 files changed, 1 insertion(+), 2 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-slider/blob/47c1e946/pom.xml
----------------------------------------------------------------------
diff --git a/pom.xml b/pom.xml
index 0eaff0e..b7975a3 100644
--- a/pom.xml
+++ b/pom.xml
@@ -123,7 +123,6 @@
     <test.forkedProcessTimeoutInSeconds>18000</test.forkedProcessTimeoutInSeconds>
     <test.argLine>-Xmx1024m -XX:+HeapDumpOnOutOfMemoryError</test.argLine>
     <test.reuseForks>false</test.reuseForks>
-    <test.failIfNoTests>true</test.failIfNoTests>
     <test.funtests.failIfNoTests>false</test.funtests.failIfNoTests>
     <test.forkMode>always</test.forkMode>
     <!-- path environment variable -->

http://git-wip-us.apache.org/repos/asf/incubator-slider/blob/47c1e946/slider-core/pom.xml
----------------------------------------------------------------------
diff --git a/slider-core/pom.xml b/slider-core/pom.xml
index 3b7616d..9b6c309 100644
--- a/slider-core/pom.xml
+++ b/slider-core/pom.xml
@@ -114,7 +114,7 @@
           </forkedProcessTimeoutInSeconds>
           <threadCount>1</threadCount>
           <argLine>${test.argLine}</argLine>
-          <failIfNoTests>${test.failIfNoTests}</failIfNoTests>
+          <failIfNoTests>true</failIfNoTests>
           <redirectTestOutputToFile>${build.redirect.test.output.to.file}</redirectTestOutputToFile>
           <environmentVariables>
             <PATH>${test.env.path}</PATH>


[3/3] incubator-slider git commit: SLIDER-1147 Dynamically build tomcat test WAR at runtime

Posted by el...@apache.org.
SLIDER-1147 Dynamically build tomcat test WAR at runtime

We build the test-war as a separate maven module and then
do a copy-resources to get at the artifact. Everything else
is the same for the groovy IT.


Project: http://git-wip-us.apache.org/repos/asf/incubator-slider/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-slider/commit/9f491ef8
Tree: http://git-wip-us.apache.org/repos/asf/incubator-slider/tree/9f491ef8
Diff: http://git-wip-us.apache.org/repos/asf/incubator-slider/diff/9f491ef8

Branch: refs/heads/branches/branch-0.91
Commit: 9f491ef80c7da92c4f5d93ccdcf3ebbb93a9771d
Parents: b895f5b
Author: Josh Elser <el...@apache.org>
Authored: Wed Jun 22 18:54:41 2016 -0400
Committer: Josh Elser <el...@apache.org>
Committed: Wed Jun 22 23:27:43 2016 -0400

----------------------------------------------------------------------
 app-packages/pom.xml                            |   2 +
 app-packages/tomcat-test-war/pom.xml            |  68 +++++++++++++++++++
 .../org/apache/slider/war/RootResource.java     |  41 +++++++++++
 .../src/main/webapp/WEB-INF/web.xml             |  35 ++++++++++
 app-packages/tomcat/README.md                   |   5 --
 app-packages/tomcat/appConfig-default.json      |   3 +-
 app-packages/tomcat/pom.xml                     |  34 +++++++++-
 .../slider/funtest/tomcat/TomcatBasicIT.groovy  |   4 +-
 .../src/test/resources/appConfig-default.json   |  23 -------
 .../tomcat/src/test/resources/slider-test.war   | Bin 3694967 -> 0 bytes
 10 files changed, 183 insertions(+), 32 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-slider/blob/9f491ef8/app-packages/pom.xml
----------------------------------------------------------------------
diff --git a/app-packages/pom.xml b/app-packages/pom.xml
index 013481e..f7b17eb 100644
--- a/app-packages/pom.xml
+++ b/app-packages/pom.xml
@@ -54,6 +54,7 @@
           <module>hbase</module>
           <module>kafka</module>
           <module>storm</module>
+          <module>tomcat-test-war</module>
           <module>tomcat</module>
         </modules>
       </profile>
@@ -88,6 +89,7 @@
           <module>storm</module>
           <module>hbase-win</module>
           <module>storm-win</module>
+          <module>tomcat-test-war</module>
           <module>tomcat</module>
         </modules>
       </profile>

http://git-wip-us.apache.org/repos/asf/incubator-slider/blob/9f491ef8/app-packages/tomcat-test-war/pom.xml
----------------------------------------------------------------------
diff --git a/app-packages/tomcat-test-war/pom.xml b/app-packages/tomcat-test-war/pom.xml
new file mode 100644
index 0000000..9ad2b6e
--- /dev/null
+++ b/app-packages/tomcat-test-war/pom.xml
@@ -0,0 +1,68 @@
+<?xml version="1.0"?>
+<!--
+ Licensed to the Apache Software Foundation (ASF) under one or more
+ contributor license agreements.  See the NOTICE file distributed with
+ this work for additional information regarding copyright ownership.
+ The ASF licenses this file to You under the Apache License, Version 2.0
+ (the "License"); you may not use this file except in compliance with
+ the License.  You may obtain a copy of the License at
+
+     http://www.apache.org/licenses/LICENSE-2.0
+
+ Unless required by applicable law or agreed to in writing, software
+ distributed under the License is distributed on an "AS IS" BASIS,
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ See the License for the specific language governing permissions and
+ limitations under the License.
+-->
+<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/maven-v4_0_0.xsd">
+  <parent>
+    <groupId>org.apache.slider.packages</groupId>
+    <artifactId>slider-app-packages</artifactId>
+    <version>0.91.0-incubating</version>
+    <relativePath>../pom.xml</relativePath>
+  </parent>
+  <modelVersion>4.0.0</modelVersion>
+  <artifactId>slider-tomcat-app-package-test-war</artifactId>
+  <packaging>war</packaging>
+  <name>Slider Tomcat App Package Testing WAR file</name>
+  <description>A WAR file that can be used to test the Tomcat app package.</description>
+  <build>
+    <plugins>
+      <plugin>
+        <artifactId>maven-compiler-plugin</artifactId>
+        <version>${maven-compiler-plugin.version}</version>
+        <dependencies>
+          <dependency>
+            <groupId>org.codehaus.groovy</groupId>
+            <artifactId>groovy-eclipse-compiler</artifactId>
+            <version>${groovy-eclipse-compiler.version}</version>
+          </dependency>
+          <dependency>
+            <groupId>org.codehaus.groovy</groupId>
+            <artifactId>groovy-eclipse-batch</artifactId>
+            <version>${groovy-eclipse-batch.version}</version>
+          </dependency>
+        </dependencies>
+      </plugin>
+      <plugin>
+        <artifactId>maven-war-plugin</artifactId>
+        <configuration>
+          <classifier>test</classifier>
+        </configuration>
+      </plugin>
+    </plugins>
+  </build>
+  <dependencies>
+    <dependency>
+      <groupId>javax.ws.rs</groupId>
+      <artifactId>javax.ws.rs-api</artifactId>
+      <version>2.0.1</version>
+    </dependency>
+    <dependency>
+      <groupId>org.glassfish.jersey.containers</groupId>
+      <artifactId>jersey-container-servlet-core</artifactId>
+      <version>2.13</version>
+    </dependency>
+  </dependencies>
+</project>

http://git-wip-us.apache.org/repos/asf/incubator-slider/blob/9f491ef8/app-packages/tomcat-test-war/src/main/java/org/apache/slider/war/RootResource.java
----------------------------------------------------------------------
diff --git a/app-packages/tomcat-test-war/src/main/java/org/apache/slider/war/RootResource.java b/app-packages/tomcat-test-war/src/main/java/org/apache/slider/war/RootResource.java
new file mode 100644
index 0000000..fe098c8
--- /dev/null
+++ b/app-packages/tomcat-test-war/src/main/java/org/apache/slider/war/RootResource.java
@@ -0,0 +1,41 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to you under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.apache.slider.packages.tomcat.war;
+
+import javax.ws.rs.GET;
+import javax.ws.rs.Path;
+import javax.ws.rs.Produces;
+import javax.ws.rs.core.MediaType;
+
+/**
+ * Root resource
+ */
+@Path("/")
+public class RootResource {
+
+    /**
+     * Method handling HTTP GET requests. The returned object will be sent
+     * to the client as "text/plain" media type.
+     *
+     * @return String that will be returned as a text/plain response.
+     */
+    @GET
+    @Produces(MediaType.TEXT_PLAIN)
+    public String getIt() {
+        return "Success";
+    }
+}

http://git-wip-us.apache.org/repos/asf/incubator-slider/blob/9f491ef8/app-packages/tomcat-test-war/src/main/webapp/WEB-INF/web.xml
----------------------------------------------------------------------
diff --git a/app-packages/tomcat-test-war/src/main/webapp/WEB-INF/web.xml b/app-packages/tomcat-test-war/src/main/webapp/WEB-INF/web.xml
new file mode 100644
index 0000000..3c0b696
--- /dev/null
+++ b/app-packages/tomcat-test-war/src/main/webapp/WEB-INF/web.xml
@@ -0,0 +1,35 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+     Licensed to the Apache Software Foundation (ASF) under one or more
+     contributor license agreements.  See the NOTICE file distributed with
+     this work for additional information regarding copyright ownership.
+     The ASF licenses this file to you under the Apache License, Version 2.0
+     (the "License"); you may not use this file except in compliance with
+     the License.  You may obtain a copy of the License at
+
+     http://www.apache.org/licenses/LICENSE-2.0
+
+     Unless required by applicable law or agreed to in writing, software
+     distributed under the License is distributed on an "AS IS" BASIS,
+     WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+     See the License for the specific language governing permissions and
+     limitations under the License.
+     -->
+<!-- This web.xml file is not required when using Servlet 3.0 container,
+     see implementation details http://jersey.java.net/nonav/documentation/latest/jax-rs.html -->
+<web-app version="2.5" xmlns="http://java.sun.com/xml/ns/javaee" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://java.sun.com/xml/ns/javaee http://java.sun.com/xml/ns/javaee/web-app_2_5.xsd">
+    <display-name>Apache Slider (incubating) Test WAR</display-name>
+    <servlet>
+        <servlet-name>Jersey Web Application</servlet-name>
+        <servlet-class>org.glassfish.jersey.servlet.ServletContainer</servlet-class>
+        <init-param>
+            <param-name>jersey.config.server.provider.packages</param-name>
+            <param-value>org.apache.slider.packages.tomcat.war</param-value>
+        </init-param>
+        <load-on-startup>1</load-on-startup>
+    </servlet>
+    <servlet-mapping>
+        <servlet-name>Jersey Web Application</servlet-name>
+        <url-pattern>/*</url-pattern>
+    </servlet-mapping>
+</web-app>

http://git-wip-us.apache.org/repos/asf/incubator-slider/blob/9f491ef8/app-packages/tomcat/README.md
----------------------------------------------------------------------
diff --git a/app-packages/tomcat/README.md b/app-packages/tomcat/README.md
index ff77c80..bfabc07 100644
--- a/app-packages/tomcat/README.md
+++ b/app-packages/tomcat/README.md
@@ -57,8 +57,3 @@ The name of the cluster is user defined and must be unique: this example uses "t
 Check the Slider Application Master page on the Hadoop YARN status page. You should see
 the application running and without failures. The address of the Tomcat servers will be listed
 as exports on the AppMaster's web UI.
-
-# Slider Automated Testing
-
-The provided slider-test.war is built using https://github.com/joshelser/simple-rest-war. Modifications
-of that WAR file can be made using that codebase and including the binary test resource here.

http://git-wip-us.apache.org/repos/asf/incubator-slider/blob/9f491ef8/app-packages/tomcat/appConfig-default.json
----------------------------------------------------------------------
diff --git a/app-packages/tomcat/appConfig-default.json b/app-packages/tomcat/appConfig-default.json
index 84183ca..5004b68 100644
--- a/app-packages/tomcat/appConfig-default.json
+++ b/app-packages/tomcat/appConfig-default.json
@@ -13,7 +13,8 @@
     "site.server-xml.http.port":"${TOMCAT.ALLOCATED_PORT}{PER_CONTAINER}",
     "site.server-xml.connection.timeout":"20000",
     "site.tomcat-users-xml.ui_user": "tomcat",
-    "site.tomcat-users-xml.ui_password": "password"
+    "site.tomcat-users-xml.ui_password": "password",
+    "agent.python.exec.path": "/usr/local/bin/python"
   },
   "components": {
     "slider-appmaster": {

http://git-wip-us.apache.org/repos/asf/incubator-slider/blob/9f491ef8/app-packages/tomcat/pom.xml
----------------------------------------------------------------------
diff --git a/app-packages/tomcat/pom.xml b/app-packages/tomcat/pom.xml
index a94aa50..c2be868 100644
--- a/app-packages/tomcat/pom.xml
+++ b/app-packages/tomcat/pom.xml
@@ -112,6 +112,7 @@
               <systemPropertyVariables>
                 <java.net.preferIPv4Stack>true</java.net.preferIPv4Stack>
                 <java.awt.headless>true</java.awt.headless>
+                <project.build.directory>${project.build.directory}</project.build.directory>
                 <!-- this property must be supplied-->
                 <slider.conf.dir>${slider.conf.dir}</slider.conf.dir>
                 <slider.bin.dir>${slider.bin.dir}</slider.bin.dir>
@@ -147,7 +148,6 @@
             <configuration>
               <excludes>
                 <exclude>**/*.json</exclude>
-                <exclude>src/test/resources/slider-test.war</exclude>
                 <exclude>**/*.iml</exclude>
               </excludes>
             </configuration>
@@ -192,6 +192,31 @@
           </dependency>
         </dependencies>
       </plugin>
+      <plugin>
+        <artifactId>maven-dependency-plugin</artifactId>
+        <executions>
+          <execution>
+            <id>copy-test-war</id>
+            <phase>pre-integration-test</phase>
+            <goals>
+              <goal>copy</goal>
+            </goals>
+            <configuration>
+              <artifactItems>
+                <artifactItem>
+                  <groupId>org.apache.slider.packages</groupId>
+                  <artifactId>slider-tomcat-app-package-test-war</artifactId>
+                  <version>${project.version}</version>
+                  <classifier>test</classifier>
+                  <type>war</type>
+                  <destFileName>slider-test.war</destFileName>
+                </artifactItem>
+              </artifactItems>
+              <outputDirectory>${project.build.directory}</outputDirectory>
+            </configuration>
+          </execution>
+        </executions>
+      </plugin>
     </plugins>
   </build>
   <dependencies>
@@ -237,5 +262,12 @@
       <artifactId>slf4j-api</artifactId>
       <scope>test</scope>
     </dependency>
+    <dependency>
+      <groupId>org.apache.slider.packages</groupId>
+      <artifactId>slider-tomcat-app-package-test-war</artifactId>
+      <version>${project.version}</version>
+      <type>war</type>
+      <scope>test</scope>
+    </dependency>
   </dependencies>
 </project>

http://git-wip-us.apache.org/repos/asf/incubator-slider/blob/9f491ef8/app-packages/tomcat/src/test/groovy/org/apache/slider/funtest/tomcat/TomcatBasicIT.groovy
----------------------------------------------------------------------
diff --git a/app-packages/tomcat/src/test/groovy/org/apache/slider/funtest/tomcat/TomcatBasicIT.groovy b/app-packages/tomcat/src/test/groovy/org/apache/slider/funtest/tomcat/TomcatBasicIT.groovy
index d77897f..369c96f 100644
--- a/app-packages/tomcat/src/test/groovy/org/apache/slider/funtest/tomcat/TomcatBasicIT.groovy
+++ b/app-packages/tomcat/src/test/groovy/org/apache/slider/funtest/tomcat/TomcatBasicIT.groovy
@@ -74,7 +74,7 @@ class TomcatBasicIT extends TomcatAgentCommandTestBase {
     Configuration conf = new Configuration()
     FileSystem fs = FileSystem.getLocal(conf)
     // The path from the local filesystem of the war (copied to target/test-classes from src/test/resources)
-    Path sourcePath = fs.makeQualified(new Path(sysprop("test-classes.dir") + "/slider-test.war"))
+    Path sourcePath = fs.makeQualified(new Path(sysprop("project.build.directory"), "slider-test.war"))
     // Path in HDFS we'll put the WAR
     Path targetPath = clusterFS.makeQualified(new Path("/tmp/slider-test.war"))
     if (clusterFS.exists(targetPath)) {
@@ -185,7 +185,7 @@ class TomcatBasicIT extends TomcatAgentCommandTestBase {
         return httpAddress
       } catch (Exception e) {
         caught = e;
-        log.info("Got exception trying to read quicklinks")
+        log.info("Got exception trying to read quicklinks", e)
         if (tries-- == 0) {
           break
         }

http://git-wip-us.apache.org/repos/asf/incubator-slider/blob/9f491ef8/app-packages/tomcat/src/test/resources/appConfig-default.json
----------------------------------------------------------------------
diff --git a/app-packages/tomcat/src/test/resources/appConfig-default.json b/app-packages/tomcat/src/test/resources/appConfig-default.json
deleted file mode 100644
index 009838c..0000000
--- a/app-packages/tomcat/src/test/resources/appConfig-default.json
+++ /dev/null
@@ -1,23 +0,0 @@
-{
-  "schema": "http://example.org/specification/v2.0.0",
-  "metadata": {
-  },
-  "global": {
-    "application.def": ".slider/package/tomcat/slider-tomcat-app-package.zip",
-    "java_home": "/usr/jdk64/jdk1.7.0_67",
-    "application.resources": "hdfs://localhost:8020/user/jelser/my_application.war",
-
-    "site.global.xmx_val": "1g",
-    "site.global.xms_val": "128m",
-    "site.global.memory_val": "200M",
-    "site.server-xml.http.port":"${TOMCAT.ALLOCATED_PORT}",
-    "site.server-xml.connection.timeout":"20000",
-    "site.tomcat-users-xml.ui.user": "tomcat",
-    "site.tomcat-users-xml.ui.password": "password"
-  },
-  "components": {
-    "slider-appmaster": {
-      "jvm.heapsize": "128M"
-    }
-  }
-}

http://git-wip-us.apache.org/repos/asf/incubator-slider/blob/9f491ef8/app-packages/tomcat/src/test/resources/slider-test.war
----------------------------------------------------------------------
diff --git a/app-packages/tomcat/src/test/resources/slider-test.war b/app-packages/tomcat/src/test/resources/slider-test.war
deleted file mode 100644
index 7410435..0000000
Binary files a/app-packages/tomcat/src/test/resources/slider-test.war and /dev/null differ