[jboss-cvs] JBossAS SVN: r82227 - in projects/ejb3/trunk/testsuite/src/test/java/org/jboss/ejb3/test/initial: unit and 1 other directory.
jboss-cvs-commits at lists.jboss.org
jboss-cvs-commits at lists.jboss.org
Thu Dec 11 07:41:50 EST 2008
Author: wolfc
Date: 2008-12-11 07:41:50 -0500 (Thu, 11 Dec 2008)
New Revision: 82227
Modified:
projects/ejb3/trunk/testsuite/src/test/java/org/jboss/ejb3/test/initial/SecurityTester.java
projects/ejb3/trunk/testsuite/src/test/java/org/jboss/ejb3/test/initial/unit/RemoteUnitTestCase.java
Log:
EJBTHREE-1241: logout before changing credentials and login again
Modified: projects/ejb3/trunk/testsuite/src/test/java/org/jboss/ejb3/test/initial/SecurityTester.java
===================================================================
--- projects/ejb3/trunk/testsuite/src/test/java/org/jboss/ejb3/test/initial/SecurityTester.java 2008-12-11 12:41:30 UTC (rev 82226)
+++ projects/ejb3/trunk/testsuite/src/test/java/org/jboss/ejb3/test/initial/SecurityTester.java 2008-12-11 12:41:50 UTC (rev 82227)
@@ -52,7 +52,9 @@
test.testDefault();
test.secured();
+ client.logout();
client.setSimple("authfail", "password");
+ client.login();
boolean securityFailure = true;
try
@@ -68,7 +70,9 @@
if (securityFailure) throw new RuntimeException("auth failure was not caught for method");
securityFailure = true;
+ client.logout();
client.setSimple("rolefail", null);
+ client.login();
try
{
test.secured();
@@ -80,7 +84,9 @@
}
if (securityFailure) throw new RuntimeException("role failure was not caught for method");
+ client.logout();
client.setSimple("somebody", null);
+ client.login();
log.info("test exclusion");
securityFailure = true;
try
@@ -94,6 +100,7 @@
}
if (securityFailure) throw new RuntimeException("excluded failure was not caught for method");
+ client.logout();
}
public void testSecurityClient() throws Exception
Modified: projects/ejb3/trunk/testsuite/src/test/java/org/jboss/ejb3/test/initial/unit/RemoteUnitTestCase.java
===================================================================
--- projects/ejb3/trunk/testsuite/src/test/java/org/jboss/ejb3/test/initial/unit/RemoteUnitTestCase.java 2008-12-11 12:41:30 UTC (rev 82226)
+++ projects/ejb3/trunk/testsuite/src/test/java/org/jboss/ejb3/test/initial/unit/RemoteUnitTestCase.java 2008-12-11 12:41:50 UTC (rev 82227)
@@ -104,9 +104,11 @@
test.testDefault();
System.out.println("Calling secured()....");
test.secured();
+ client.logout();
System.out.println("Calling security fine grain tests....");
client.setSimple("authfail", "password");
+ client.login();
boolean securityFailure = true;
try
@@ -123,7 +125,9 @@
if (securityFailure) throw new RuntimeException("auth failure was not caught for method");
securityFailure = true;
+ client.logout();
client.setSimple("rolefail", "password");
+ client.login();
try
{
test.secured();
@@ -135,7 +139,9 @@
}
if (securityFailure) throw new RuntimeException("role failure was not caught for method");
+ client.logout();
client.setSimple("somebody","password");
+ client.login();
log.info("test exclusion");
securityFailure = true;
try
@@ -148,7 +154,7 @@
securityFailure = false;
}
if (securityFailure) throw new RuntimeException("excluded failure was not caught for method");
-
+ client.logout();
}
public void testInterceptors() throws Exception
More information about the jboss-cvs-commits
mailing list