Author: felipeal
Date: Fri Oct 21 08:56:56 2005
New Revision: 327212

URL: http://svn.apache.org/viewcvs?rev=327212&view=rev
Log:
CACTUS-231: added new property cactus.containerSet.timeout

Added:
    
jakarta/cactus/branches/CACTUS_17_BRANCH/integration/maven/src/plugin-test/testTimeout/
    
jakarta/cactus/branches/CACTUS_17_BRANCH/integration/maven/src/plugin-test/testTimeout/maven.xml
    
jakarta/cactus/branches/CACTUS_17_BRANCH/integration/maven/src/plugin-test/testTimeout/project.xml
Modified:
    jakarta/cactus/branches/CACTUS_17_BRANCH/integration/maven/plugin.jelly
    jakarta/cactus/branches/CACTUS_17_BRANCH/integration/maven/plugin.properties
    
jakarta/cactus/branches/CACTUS_17_BRANCH/integration/maven/xdocs/properties.xml

Modified: 
jakarta/cactus/branches/CACTUS_17_BRANCH/integration/maven/plugin.jelly
URL: 
http://svn.apache.org/viewcvs/jakarta/cactus/branches/CACTUS_17_BRANCH/integration/maven/plugin.jelly?rev=327212&r1=327211&r2=327212&view=diff
==============================================================================
--- jakarta/cactus/branches/CACTUS_17_BRANCH/integration/maven/plugin.jelly 
(original)
+++ jakarta/cactus/branches/CACTUS_17_BRANCH/integration/maven/plugin.jelly Fri 
Oct 21 08:56:56 2005
@@ -466,7 +466,8 @@
         <ant:path refid="cactus.classpath"/>
       </ant:classpath>
 
-      <containerset>
+      <ant:echo>Setting timeout to ${cactus.containerSet.timeout} ms</ant:echo>
+      <containerset timeout="${cactus.containerSet.timeout}">
 
         <!-- Note: The port attribute for JBoss is only used for custom 
              configs -->
@@ -660,7 +661,8 @@
           <ant:path refid="cactus.classpath"/>
         </ant:classpath>
 
-        <containerset>
+      <ant:echo>Setting timeout to ${cactus.containerSet.timeout} ms</ant:echo>
+      <containerset timeout="${cactus.containerSet.timeout}">
 
         <!-- Note: The port attribute for JBoss is only used for custom 
              configs -->
@@ -845,7 +847,8 @@
           <ant:path refid="cactus.classpath"/>
         </ant:classpath>
 
-        <containerset>
+      <ant:echo>Setting timeout to ${cactus.containerSet.timeout} ms</ant:echo>
+      <containerset timeout="${cactus.containerSet.timeout}">
 
         <!-- Note: The port attribute for JBoss is only used for custom 
              configs -->
@@ -1113,7 +1116,8 @@
         <ant:path refid="cactus.classpath"/>
       </ant:classpath>
 
-      <containerset>
+      <ant:echo>Setting timeout to ${cactus.containerSet.timeout} ms</ant:echo>
+      <containerset timeout="${cactus.containerSet.timeout}">
 
         <!-- Note: The port attribute for JBoss is only used for custom 
              configs -->

Modified: 
jakarta/cactus/branches/CACTUS_17_BRANCH/integration/maven/plugin.properties
URL: 
http://svn.apache.org/viewcvs/jakarta/cactus/branches/CACTUS_17_BRANCH/integration/maven/plugin.properties?rev=327212&r1=327211&r2=327212&view=diff
==============================================================================
--- 
jakarta/cactus/branches/CACTUS_17_BRANCH/integration/maven/plugin.properties 
(original)
+++ 
jakarta/cactus/branches/CACTUS_17_BRANCH/integration/maven/plugin.properties 
Fri Oct 21 08:56:56 2005
@@ -140,6 +140,11 @@
 # Arguments to be passed to the container's JVM
 #cactus.genericContainer.jvmArgs
 
+# Timeout after which connecting to a container will be given up.
+# Notice that currently is not possible to pass diferente values for each
+# individual container
+cactus.containerSet.timeout=-1
+
 ## Container-specific properties
  
 # Name of the JBoss server configuration to use.

Added: 
jakarta/cactus/branches/CACTUS_17_BRANCH/integration/maven/src/plugin-test/testTimeout/maven.xml
URL: 
http://svn.apache.org/viewcvs/jakarta/cactus/branches/CACTUS_17_BRANCH/integration/maven/src/plugin-test/testTimeout/maven.xml?rev=327212&view=auto
==============================================================================
--- 
jakarta/cactus/branches/CACTUS_17_BRANCH/integration/maven/src/plugin-test/testTimeout/maven.xml
 (added)
+++ 
jakarta/cactus/branches/CACTUS_17_BRANCH/integration/maven/src/plugin-test/testTimeout/maven.xml
 Fri Oct 21 08:56:56 2005
@@ -0,0 +1,62 @@
+<!-- 
+/*
+ * Copyright 2005 The Apache Software Foundation.
+ * 
+ * Licensed 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 default="testPlugin"
+         xmlns:j="jelly:core"
+>        
+  <goal name="testPlugin" prereqs="clean,testWar,testEar,testSingle,test">
+  </goal>
+
+  <goal name="testWar">
+    <j:set var="goal" value="cactus:test-war"/>
+    <attainGoal name="testIt"/>
+  </goal>
+
+  <goal name="testEar">
+    <j:set var="goal" value="cactus:test-ear"/>
+    <attainGoal name="testIt"/>
+  </goal>
+
+  <goal name="testSingle">
+    <j:set var="goal" value="cactus:single"/>
+    <j:set var="testcase" 
value="org.apache.cactus.integration.maven.test.TestTimeout"/>
+    <attainGoal name="testIt"/>
+  </goal>
+
+  <goal name="testMatch">
+    <j:set var="goal" value="cactus:match"/>
+    <j:set var="testmatch" 
value="org.apache.cactus.integration.maven.test.TestTimeout"/>
+    <attainGoal name="testIt"/>
+  </goal>
+
+  <goal name="testIt">
+    <echo>Testing goal ${goal}</echo>
+    <echo>NOTE: this test is only effective if you set at least one container 
to run cactus tests</echo>
+
+    <j:set var="cactus.containerSet.timeout" value="1"/>
+    <j:catch var="timeoutException">
+      <attainGoal name="${goal}"/>
+    </j:catch>
+    <j:if test="${empty(timeoutException)}">
+       <fail>Goal ${goal} should have failed due to timeout!</fail>
+    </j:if>
+    <echo>Got exception: ${timeoutException.message}</echo>
+
+  </goal>
+
+
+</project>

Added: 
jakarta/cactus/branches/CACTUS_17_BRANCH/integration/maven/src/plugin-test/testTimeout/project.xml
URL: 
http://svn.apache.org/viewcvs/jakarta/cactus/branches/CACTUS_17_BRANCH/integration/maven/src/plugin-test/testTimeout/project.xml?rev=327212&view=auto
==============================================================================
--- 
jakarta/cactus/branches/CACTUS_17_BRANCH/integration/maven/src/plugin-test/testTimeout/project.xml
 (added)
+++ 
jakarta/cactus/branches/CACTUS_17_BRANCH/integration/maven/src/plugin-test/testTimeout/project.xml
 Fri Oct 21 08:56:56 2005
@@ -0,0 +1,29 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!-- 
+/*
+ * Copyright 2005 The Apache Software Foundation.
+ * 
+ * Licensed 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>
+  <pomVersion>3</pomVersion>
+  <extend>../project.xml</extend>
+  <artifactId>testTimeout</artifactId>
+  <name>testTimeout</name>
+  <shortDescription>Tests timeout</shortDescription>
+  <description>Tests if the container is timing out</description>
+
+</project>

Modified: 
jakarta/cactus/branches/CACTUS_17_BRANCH/integration/maven/xdocs/properties.xml
URL: 
http://svn.apache.org/viewcvs/jakarta/cactus/branches/CACTUS_17_BRANCH/integration/maven/xdocs/properties.xml?rev=327212&r1=327211&r2=327212&view=diff
==============================================================================
--- 
jakarta/cactus/branches/CACTUS_17_BRANCH/integration/maven/xdocs/properties.xml 
(original)
+++ 
jakarta/cactus/branches/CACTUS_17_BRANCH/integration/maven/xdocs/properties.xml 
Fri Oct 21 08:56:56 2005
@@ -355,6 +355,18 @@
             </p>
           </td>
         </tr>
+        <tr>
+          <td>cactus.containerSet.timeout</td>
+          <td>Yes</td>
+          <td>
+            <p>
+              Timeout after which connecting to a container will be given up.
+              Notice that currently is not possible to pass diferente values 
+              for each individual container. Default value is <code>-1</code>;
+              values less or equal to 0 means no timeout.
+            </p>
+          </td>
+        </tr>
       </table>
     </section>
 



---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to