[jboss-cvs] JBossAS SVN: r64948 - trunk/ejb3/src/test/org/jboss/ejb3/test/ejbthree751/unit.
jboss-cvs-commits at lists.jboss.org
jboss-cvs-commits at lists.jboss.org
Wed Aug 29 10:14:34 EDT 2007
Author: ALRubinger
Date: 2007-08-29 10:14:34 -0400 (Wed, 29 Aug 2007)
New Revision: 64948
Modified:
trunk/ejb3/src/test/org/jboss/ejb3/test/ejbthree751/unit/FailLocalRemoteSameInterfaceUnitTestCase.java
Log:
Reverted as requested by Carlo; will fail until originally specified error message is accessible from thrown exception
Modified: trunk/ejb3/src/test/org/jboss/ejb3/test/ejbthree751/unit/FailLocalRemoteSameInterfaceUnitTestCase.java
===================================================================
--- trunk/ejb3/src/test/org/jboss/ejb3/test/ejbthree751/unit/FailLocalRemoteSameInterfaceUnitTestCase.java 2007-08-29 13:41:14 UTC (rev 64947)
+++ trunk/ejb3/src/test/org/jboss/ejb3/test/ejbthree751/unit/FailLocalRemoteSameInterfaceUnitTestCase.java 2007-08-29 14:14:34 UTC (rev 64948)
@@ -23,7 +23,6 @@
import junit.framework.Test;
-import org.jboss.deployment.DeploymentException;
import org.jboss.test.JBossTestCase;
/**
@@ -44,37 +43,31 @@
// do not deploy any jars
return getDeploySetup(FailLocalRemoteSameInterfaceUnitTestCase.class, null);
}
-
+
@Override
protected void tearDown() throws Exception
{
undeploy("ejbthree751-fail.jar");
super.tearDown();
}
-
+
public void testDeploymentFailure() throws Exception
{
- // Define expected exception
- Class exceptionExpected = DeploymentException.class;
-
try
{
redeploy("ejbthree751-fail.jar");
fail("should throw an exception");
}
- catch (Exception e)
+ catch(Exception e)
{
- // Ensure expected error is thrown
- if (e.getClass().equals(exceptionExpected))
+ for(Throwable t = e;t != null; t = t.getCause())
{
- // Log Success for clarity
- log.info("testDeploymentFailure SUCCESS; \"" + exceptionExpected.getName() + "\" received");
- return;
+ // See ProxyFactoryHelper.getLocalInterfaces
+ if(t.getMessage().contains("EJB3 Spec 4.6.7, Bullet 5.4"))
+ return;
}
-
- // Proper exception was not thrown
- log.error(e);
- fail("Exception received, " + e.getClass().getName() + ", was not expected : " + exceptionExpected.getName());
+ e.printStackTrace();
+ fail("Exception did not contain expected message");
}
}
-}
+}
\ No newline at end of file
More information about the jboss-cvs-commits
mailing list