[jboss-cvs] JBossAS SVN: r81284 - in projects/ejb3/trunk/testsuite: src/test/java/org/jboss/ejb3/test/persistenceunits/unit and 1 other directories.
jboss-cvs-commits at lists.jboss.org
jboss-cvs-commits at lists.jboss.org
Wed Nov 19 07:34:51 EST 2008
Author: wolfc
Date: 2008-11-19 07:34:51 -0500 (Wed, 19 Nov 2008)
New Revision: 81284
Modified:
projects/ejb3/trunk/testsuite/build-test.xml
projects/ejb3/trunk/testsuite/src/test/java/org/jboss/ejb3/test/persistenceunits/unit/MultipleEarTestCase.java
projects/ejb3/trunk/testsuite/src/test/resources/test/persistenceunits/application.xml
projects/ejb3/trunk/testsuite/src/test/resources/test/persistenceunits/application1.xml
projects/ejb3/trunk/testsuite/src/test/resources/test/persistenceunits/application2.xml
projects/ejb3/trunk/testsuite/src/test/resources/test/persistenceunits/sharedEntityApplication.xml
Log:
EJBTHREE-1241: fixed packaging and better check on the deployment error
Modified: projects/ejb3/trunk/testsuite/build-test.xml
===================================================================
--- projects/ejb3/trunk/testsuite/build-test.xml 2008-11-19 12:11:44 UTC (rev 81283)
+++ projects/ejb3/trunk/testsuite/build-test.xml 2008-11-19 12:34:51 UTC (rev 81284)
@@ -2903,7 +2903,7 @@
</jar>
<ear earfile="${build.lib}/persistenceunitscope-test.ear" appxml="${resources}/test/persistenceunits/application.xml">
- <zipfileset dir="${build.lib}" prefix="lib">
+ <zipfileset dir="${build.lib}">
<include name="persistenceunitscope.jar"/>
</zipfileset>
<fileset dir="${resources}/test/persistenceunits">
@@ -2912,7 +2912,7 @@
</ear>
<ear earfile="${build.lib}/persistenceunitscope-test1.ear" appxml="${resources}/test/persistenceunits/application1.xml">
- <zipfileset dir="${build.lib}" prefix="lib">
+ <zipfileset dir="${build.lib}">
<include name="persistenceunitscope1.jar"/>
<include name="persistenceunitscope-slsb.jar"/>
</zipfileset>
@@ -2922,7 +2922,7 @@
</ear>
<ear earfile="${build.lib}/persistenceunitscope-test2.ear" appxml="${resources}/test/persistenceunits/application2.xml">
- <zipfileset dir="${build.lib}" prefix="lib">
+ <zipfileset dir="${build.lib}">
<include name="persistenceunitscope2.jar"/>
<include name="persistenceunitscope-slsb.jar"/>
</zipfileset>
@@ -2951,7 +2951,7 @@
</jar>
<ear earfile="${build.lib}/persistenceunitsharedentity-test.ear" appxml="${resources}/test/persistenceunits/sharedEntityApplication.xml">
- <zipfileset dir="${build.lib}" prefix="lib">
+ <zipfileset dir="${build.lib}">
<include name="persistenceunitsharedentity1.jar"/>
<include name="persistenceunitsharedentity2.jar"/>
</zipfileset>
Modified: projects/ejb3/trunk/testsuite/src/test/java/org/jboss/ejb3/test/persistenceunits/unit/MultipleEarTestCase.java
===================================================================
--- projects/ejb3/trunk/testsuite/src/test/java/org/jboss/ejb3/test/persistenceunits/unit/MultipleEarTestCase.java 2008-11-19 12:11:44 UTC (rev 81283)
+++ projects/ejb3/trunk/testsuite/src/test/java/org/jboss/ejb3/test/persistenceunits/unit/MultipleEarTestCase.java 2008-11-19 12:34:51 UTC (rev 81284)
@@ -21,18 +21,23 @@
*/
package org.jboss.ejb3.test.persistenceunits.unit;
+import java.util.Map;
+
+import junit.framework.Test;
+
+import org.jboss.deployers.client.spi.IncompleteDeploymentException;
+import org.jboss.deployers.client.spi.IncompleteDeployments;
+import org.jboss.deployers.spi.DeploymentException;
import org.jboss.ejb3.test.persistenceunits.Entity1;
import org.jboss.ejb3.test.persistenceunits.Entity2;
import org.jboss.ejb3.test.persistenceunits.EntityTest;
import org.jboss.logging.Logger;
import org.jboss.test.JBossTestCase;
-import junit.framework.Test;
/**
* @author <a href="mailto:bdecoste at jboss.com">William DeCoste</a>
*/
-public class MultipleEarTestCase
-extends JBossTestCase
+public class MultipleEarTestCase extends JBossTestCase
{
private static final Logger log = Logger.getLogger(MultipleEarTestCase.class);
@@ -71,6 +76,23 @@
}
}
+ public void testServerFound() throws Exception
+ {
+ try
+ {
+ serverFound();
+ }
+ catch(DeploymentException e)
+ {
+ IncompleteDeploymentException cause = (IncompleteDeploymentException) e.getCause();
+ IncompleteDeployments incomplete = cause.getIncompleteDeployments();
+ Map<String, Throwable> deploymentsInError = incomplete.getDeploymentsInError();
+ assertEquals("only persistenceunitscope-test2.ear should have failed", 1, deploymentsInError.size());
+ Map.Entry<String, Throwable> entry = deploymentsInError.entrySet().iterator().next();
+ assertTrue(entry.getKey().endsWith("persistenceunitscope-test2.ear"));
+ assertTrue(entry.getValue().getMessage().contains("Can't find a persistence unit named 'Entity1'"));
+ }
+ }
public static Test suite() throws Exception
{
Modified: projects/ejb3/trunk/testsuite/src/test/resources/test/persistenceunits/application.xml
===================================================================
--- projects/ejb3/trunk/testsuite/src/test/resources/test/persistenceunits/application.xml 2008-11-19 12:11:44 UTC (rev 81283)
+++ projects/ejb3/trunk/testsuite/src/test/resources/test/persistenceunits/application.xml 2008-11-19 12:34:51 UTC (rev 81284)
@@ -5,7 +5,7 @@
<display-name>EAR test</display-name>
<module>
- <ejb>lib/persistenceunitscope.jar</ejb>
+ <ejb>persistenceunitscope.jar</ejb>
</module>
</application>
Modified: projects/ejb3/trunk/testsuite/src/test/resources/test/persistenceunits/application1.xml
===================================================================
--- projects/ejb3/trunk/testsuite/src/test/resources/test/persistenceunits/application1.xml 2008-11-19 12:11:44 UTC (rev 81283)
+++ projects/ejb3/trunk/testsuite/src/test/resources/test/persistenceunits/application1.xml 2008-11-19 12:34:51 UTC (rev 81284)
@@ -5,11 +5,11 @@
<display-name>EAR test</display-name>
<module>
- <ejb>lib/persistenceunitscope1.jar</ejb>
+ <ejb>persistenceunitscope1.jar</ejb>
</module>
<module>
- <ejb>lib/persistenceunitscope-slsb.jar</ejb>
+ <ejb>persistenceunitscope-slsb.jar</ejb>
</module>
</application>
Modified: projects/ejb3/trunk/testsuite/src/test/resources/test/persistenceunits/application2.xml
===================================================================
--- projects/ejb3/trunk/testsuite/src/test/resources/test/persistenceunits/application2.xml 2008-11-19 12:11:44 UTC (rev 81283)
+++ projects/ejb3/trunk/testsuite/src/test/resources/test/persistenceunits/application2.xml 2008-11-19 12:34:51 UTC (rev 81284)
@@ -5,11 +5,11 @@
<display-name>EAR test</display-name>
<module>
- <ejb>lib/persistenceunitscope2.jar</ejb>
+ <ejb>persistenceunitscope2.jar</ejb>
</module>
<module>
- <ejb>lib/persistenceunitscope-slsb.jar</ejb>
+ <ejb>persistenceunitscope-slsb.jar</ejb>
</module>
</application>
Modified: projects/ejb3/trunk/testsuite/src/test/resources/test/persistenceunits/sharedEntityApplication.xml
===================================================================
--- projects/ejb3/trunk/testsuite/src/test/resources/test/persistenceunits/sharedEntityApplication.xml 2008-11-19 12:11:44 UTC (rev 81283)
+++ projects/ejb3/trunk/testsuite/src/test/resources/test/persistenceunits/sharedEntityApplication.xml 2008-11-19 12:34:51 UTC (rev 81284)
@@ -5,11 +5,11 @@
<display-name>EAR test</display-name>
<module>
- <ejb>lib/persistenceunitsharedentity1.jar</ejb>
+ <ejb>persistenceunitsharedentity1.jar</ejb>
</module>
<module>
- <ejb>lib/persistenceunitsharedentity2.jar</ejb>
+ <ejb>persistenceunitsharedentity2.jar</ejb>
</module>
</application>
More information about the jboss-cvs-commits
mailing list