[jboss-cvs] JBossAS SVN: r82317 - in projects/ejb3/trunk/testsuite/src/test: resources and 1 other directory.
jboss-cvs-commits at lists.jboss.org
jboss-cvs-commits at lists.jboss.org
Tue Dec 16 10:41:51 EST 2008
Author: wolfc
Date: 2008-12-16 10:41:50 -0500 (Tue, 16 Dec 2008)
New Revision: 82317
Modified:
projects/ejb3/trunk/testsuite/src/test/java/org/jboss/ejb3/test/jacc/unit/JaccTestCase.java
projects/ejb3/trunk/testsuite/src/test/resources/known-issues.xml
Log:
EJBTHREE-1637: EJBAccessException is also acceptable and disregard delete failure
Modified: projects/ejb3/trunk/testsuite/src/test/java/org/jboss/ejb3/test/jacc/unit/JaccTestCase.java
===================================================================
--- projects/ejb3/trunk/testsuite/src/test/java/org/jboss/ejb3/test/jacc/unit/JaccTestCase.java 2008-12-16 14:03:36 UTC (rev 82316)
+++ projects/ejb3/trunk/testsuite/src/test/java/org/jboss/ejb3/test/jacc/unit/JaccTestCase.java 2008-12-16 15:41:50 UTC (rev 82317)
@@ -369,8 +369,6 @@
}
- System.out.println("Deleting...");
- stateless.deleteSomeEntity(e);
System.out.println("Inserting...");
e = stateless.insertSomeEntity();
@@ -423,7 +421,27 @@
}
}
-
+ public void testSomeEntityDelete() throws Exception
+ {
+ Stateless stateless = (Stateless)getInitialContext().lookup("StatelessBean/remote");
+
+ SecurityClient client = SecurityClientFactory.getSecurityClient();
+ client.setSimple(JaccTestCase.PRINCIPAL_SOMEBODY, JaccTestCase.PASSWORD_PASSWORD);
+ client.login();
+
+ SomeEntity e = stateless.insertSomeEntity();
+
+ System.out.println("Deleting...");
+ try
+ {
+ stateless.deleteSomeEntity(e);
+ }
+ catch(EJBException ex)
+ {
+ fail(ex.getMessage());
+ }
+ }
+
private void hasSecurityOrEJBAccessException(Exception e)throws FailedException
{
Throwable t = e;
@@ -433,14 +451,15 @@
//System.out.println(t);
String classname = t.getClass().getName();
if (classname.equals(SecurityException.class.getName()) ||
- classname.equals(EJBException.class.getName()) )
+ classname.equals(EJBException.class.getName()) ||
+ t instanceof EJBAccessException)
{
return;
}
t = t.getCause();
}
- throw new FailedException("SecurityException not thrown");
+ throw new FailedException("SecurityException not thrown", e);
}
@@ -457,5 +476,10 @@
{
super(msg);
}
+
+ public FailedException(String msg, Throwable cause)
+ {
+ super(msg, cause);
+ }
}
}
\ No newline at end of file
Modified: projects/ejb3/trunk/testsuite/src/test/resources/known-issues.xml
===================================================================
--- projects/ejb3/trunk/testsuite/src/test/resources/known-issues.xml 2008-12-16 14:03:36 UTC (rev 82316)
+++ projects/ejb3/trunk/testsuite/src/test/resources/known-issues.xml 2008-12-16 15:41:50 UTC (rev 82317)
@@ -35,5 +35,6 @@
<entry key="org.jboss.ejb3.test.ejbthree1624.unit.Ejb3IntoMcBeanInjectionTestCase.testRemoteBusinessInterfaceInjectionIntoMcBean">show</entry>
<entry key="org.jboss.ejb3.test.ejbthree1624.unit.Ejb3IntoMcBeanInjectionTestCase.testLocalHomeInterfaceInjectionIntoMcBean">show</entry>
<entry key="org.jboss.ejb3.test.ejbthree1624.unit.Ejb3IntoMcBeanInjectionTestCase.testRemoteHomeInterfaceInjectionIntoMcBean">show</entry>
-
+ <!-- EJBTHREE-1637 -->
+ <entry key="org.jboss.ejb3.test.jacc.unit.JaccTestCase.testSomeEntityDelete">show</entry>
</properties>
More information about the jboss-cvs-commits
mailing list