[jboss-cvs] JBossAS SVN: r65796 - in branches/Branch_4_2/ejb3: src/resources/test and 1 other directories.
jboss-cvs-commits at lists.jboss.org
jboss-cvs-commits at lists.jboss.org
Wed Oct 3 06:53:41 EDT 2007
Author: wolfc
Date: 2007-10-03 06:53:41 -0400 (Wed, 03 Oct 2007)
New Revision: 65796
Added:
branches/Branch_4_2/ejb3/src/resources/test/known-issues.xml
Modified:
branches/Branch_4_2/ejb3/build-test.xml
branches/Branch_4_2/ejb3/src/test/org/jboss/ejb3/test/JBossWithKnownIssuesTestCase.java
Log:
Allow for known issues configuration
Modified: branches/Branch_4_2/ejb3/build-test.xml
===================================================================
--- branches/Branch_4_2/ejb3/build-test.xml 2007-10-03 10:16:25 UTC (rev 65795)
+++ branches/Branch_4_2/ejb3/build-test.xml 2007-10-03 10:53:41 UTC (rev 65796)
@@ -309,6 +309,8 @@
<import file="imports/build-simple.xml"/>
+ <property name="knownIssuesFile" value="${resources}/test/known-issues.xml"/>
+
<target name="init">
<record name="${basedir}/build.log" append="yes" action="start" loglevel="error"/>
<!-- Setup the version 1 classes so the tests compile -->
@@ -3459,6 +3461,7 @@
<sysproperty key="jbosstest.cluster.node1.jndi.url" value="${node1.jndi.url}"/>
<sysproperty key="java.naming.provider.url" value="${test.jndi.url}"/>
+ <sysproperty key="knownIssuesFile" value="${knownIssuesFile}"/>
<jvmarg line="${jvmargs}" />
@@ -3551,6 +3554,8 @@
<sysproperty key="jbosstest.cluster.node1.http.url" value="${node1.http.url}"/>
<sysproperty key="jbosstest.cluster.node1.jndi.url" value="${node1.jndi.url}"/>
<sysproperty key="java.naming.provider.url" value="${node0.jndi.url}"/>
+
+ <sysproperty key="knownIssuesFile" value="${knownIssuesFile}"/>
<jvmarg line="${jvmargs}" />
Added: branches/Branch_4_2/ejb3/src/resources/test/known-issues.xml
===================================================================
--- branches/Branch_4_2/ejb3/src/resources/test/known-issues.xml (rev 0)
+++ branches/Branch_4_2/ejb3/src/resources/test/known-issues.xml 2007-10-03 10:53:41 UTC (rev 65796)
@@ -0,0 +1,23 @@
+<!DOCTYPE properties SYSTEM "http://java.sun.com/dtd/properties.dtd">
+<properties>
+ <comment>
+ This file contains the action to take when a known issue is encountered.
+
+ The following actions are allowed:
+ - fail : fail the test (set this when an issue is resolved)
+ - ignore : do nothing
+ - show : show the issue on System.err
+ </comment>
+ <!-- does JAX-RPC with EJB 3 work? -->
+ <entry key="EJBTHREE-757">fail</entry>
+ <entry key="EJBTHREE-832">show</entry>
+ <entry key="EJBTHREE-892">show</entry>
+ <entry key="EJBTHREE-894">show</entry>
+ <entry key="EJBTHREE-896">show</entry>
+ <!-- web service ref injection via dd should work -->
+ <entry key="EJBTHREE-899">fail</entry>
+ <!-- with the introduction of WS 2.0 encountering EJBTHREE-900 is a failure -->
+ <entry key="EJBTHREE-900">fail</entry>
+ <!--entry key="EJBTHREE-1053">show</entry-->
+ <entry key="EJBTHREE-1055">fail</entry>
+</properties>
\ No newline at end of file
Property changes on: branches/Branch_4_2/ejb3/src/resources/test/known-issues.xml
___________________________________________________________________
Name: svn:keywords
+ Author Date Id Revision
Name: svn:eol-style
+ native
Modified: branches/Branch_4_2/ejb3/src/test/org/jboss/ejb3/test/JBossWithKnownIssuesTestCase.java
===================================================================
--- branches/Branch_4_2/ejb3/src/test/org/jboss/ejb3/test/JBossWithKnownIssuesTestCase.java 2007-10-03 10:16:25 UTC (rev 65795)
+++ branches/Branch_4_2/ejb3/src/test/org/jboss/ejb3/test/JBossWithKnownIssuesTestCase.java 2007-10-03 10:53:41 UTC (rev 65796)
@@ -21,14 +21,39 @@
*/
package org.jboss.ejb3.test;
+import java.io.File;
+import java.io.FileInputStream;
+import java.io.IOException;
+import java.util.Properties;
+
import org.jboss.test.JBossTestCase;
/**
+ *
+ * Per default all known issues will fail. To override specify
+ * a known issues properties file via -DknownIssues=filename.
+ *
+ * This file contains the action to take when a known issue is encountered.
+ *
+ * The following actions are allowed:
+ * - fail : fail the test (set this when an issue is resolved)
+ * - ignore : do nothing
+ * - show : show the issue on System.err
+ *
* @author <a href="mailto:carlo.dewolf at jboss.com">Carlo de Wolf</a>
* @version $Revision: $
*/
public abstract class JBossWithKnownIssuesTestCase extends JBossTestCase
{
+ private static enum Action
+ {
+ FAIL,
+ IGNORE,
+ SHOW
+ };
+
+ private static Properties actions = null;
+
/**
* @param name
*/
@@ -37,8 +62,69 @@
super(name);
}
- public static void showKnownIssue(String msg)
+ private static Action getAction(String issue)
{
- fail(msg);
+ Properties actions = getActions();
+ if(actions == null)
+ return Action.FAIL;
+ String action = actions.getProperty(issue);
+ if(action == null)
+ return Action.FAIL;
+ action = action.toUpperCase();
+ return Action.valueOf(action);
}
+
+ private static Properties getActions()
+ {
+ if(actions != null)
+ return actions;
+
+ actions = new Properties();
+ String fileName = System.getProperty("knownIssuesFile");
+ if(fileName == null || fileName.length() == 0)
+ return actions;
+
+ try
+ {
+ File file = new File(fileName);
+ FileInputStream in = new FileInputStream(file.getAbsolutePath());
+ try
+ {
+ if(fileName.endsWith(".xml"))
+ actions.loadFromXML(in);
+ else
+ actions.load(in);
+ }
+ finally
+ {
+ in.close();
+ }
+ return actions;
+ }
+ catch(IOException e)
+ {
+ throw new RuntimeException(e);
+ }
+ }
+
+ public static void showKnownIssue(String issue)
+ {
+ showKnownIssue(issue, issue);
+ }
+
+ public static void showKnownIssue(String issue, String msg)
+ {
+ Action action = getAction(issue);
+ switch(action)
+ {
+ case FAIL:
+ fail(msg);
+ break;
+ case IGNORE:
+ break;
+ case SHOW:
+ System.err.println(msg);
+ break;
+ }
+ }
}
More information about the jboss-cvs-commits
mailing list